Skip to content

CPU scheduling algorithms used by operating systems implemented in C#

License

Notifications You must be signed in to change notification settings

amal-stack/CpuSchedulingAlgorithms

Repository files navigation

.NET

CPU Scheduling Algorithms

  • 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.

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.

Console Client

To run the app, use the following command:

dotnet run --project CpuSchedulingAlgorithms.Console