The OS Scheduler with Memory Allocation is dedicated to implementing a CPU scheduler for operating systems. This project orchestrates the execution order of processes, employing an efficient data structure to monitor process statuses within the system. Additionally, it integrates dynamic memory allocation, optimizing memory usage by allocating and deallocating memory space for processes as they enter and exit the system.
- Scheduling Algorithms:
- Round Robin, Priority Scheduling
- Non-preemptive Highest Priority First (HPF)
- Shortest Remaining Time Next (SRTN).
- Memory Allocation Algorithm:
- Buddy system
- linux or WSL
- gcc:
sudo apt install build-essential
sudo apt install gcc- git:
sudo apt install git1- Clone the repository
git clone https://github.com/moa234/OS-Scheduler.git
cd src2- Compile the program
make build 1- Generate testcases
./test_generator.out2- run the program
make run3- choose the algorithm you want to run
| number to choose | algorithm |
|---|---|
| 1 | Non-preemptive Highest Priority First (HPF). |
| 2 | Shortest Remaining time Next (SRTN). |
| 3 | Round Robin (RR). |
-
The program will generate a file called "scheduler.log" that contains the following information:
- The order of execution of the processes.
- The waiting time for each process.
- the remaining time for each process.
- The turnaround time for each process.
- The weighted turnaround time for each process.
-
The program will generate a file called "scheduler.perf" that contains the following information:
- The CPU utilization.
- The average waiting time for all processes.
- The average weighted turnaround time for all processes.
- The standard deviation for the average weighted turnaround time for all processes.
-
The program will generate a file called "memory.log" that contains the following information:
- The order of allocation of the processes.
- The order of deallocation of the processes.
- Moaaz Tarek
- Salah Mohamed
- Omar Sherif
- Hussein Mostafa


