- This project attempts to implement CPU scheduling algorithms used by operating systems in C#.
- The implementation attempts to simulate a CPU scheduler by using a predetermined arrival schedule.
- This project also features an interactive console application(under CpuSchedulingAlgorithms.Console) to experiment with the implemented algorithms.
This project currently implements the following scheduling algorithms:
- A non-preemptive scheduling algorithm where the process with the earliest arrival time would be the first one to be granted the CPU.
- Another non-preemptive algorithm where the process requiring the shortest time to complete is granted the CPU first.
- Preemptive version of shortest job first where the ready queue will be examined after each time quantum and if required suspending the current process if a process requiring a lesser amount of time arrives.
- A preemptive algorithm that allocates the CPU for a fixed time quantum for each process in the ready queue, a variation of first-come, first serve.
- A scheduling algorithm where each process has an associated priority value. The process with the highest priority will be granted the CPU first. This is implemented as a non-preemptive algorithm where the priority is represented as an integer. The lower the value of the integer, the higher the process priority.
To run the app, use the following command:
dotnet run --project CpuSchedulingAlgorithms.Console