A CPU scheduling lab

The problem

Build a program that reads a list of processes and reports how FCFS, SJF, SRTF and round robin schedule them, so that you can choose a scheduler for a given workload with numbers.

Requirements

Technologies

Step by step

  1. Write a struct for a process and read the input into an array.
  2. Write one function for each algorithm that fills in completion times.
  3. Compute turnaround and waiting times and print the table for each algorithm.
  4. Compare the averages on the convoy example (P1 burst 24, P2 and P3 burst 3) and explain what you see.
  5. Check every result against the simulator in the lessons.

Expected result

A program that prints a table and a Gantt chart for four schedulers on the same workload, and a short comparison.

How it is evaluated

Ways to improve it