CPU Scheduling Algorithms
CPU Scheduling Algorithms are used to select one process out of the many processes from the ready queue for execution. The various CPU scheduling algorithms are FCFS-The process that requests CPU first is allocated the CPU first Shortest Job First Scheduling -CPU is assigned to the process that has the smallest next CPU burst Priority Scheduling -CPU is allocated to the process with the higher priority Round Robin scheduling CPU picks up the first process from the ready queue, sets a timer to interrupt after 1 time quantum, and dispatches the process. Given the following set of processes along with the process id, arrival time, burst time and priority of the processes, calculate the turnaround time and waiting time of each process along with average turnaround and waiting times using the following scheduling algorithms. FCFS Shortest Job First Scheduling (non-pre-emptive & pre-emptive) Priority Scheduling (non-pre-emptive & pre-emptive)(higher no. indicates lower priority) Round Robin scheduling (Pre-emptive)(quantum=2ms) Draw charts to illustrate the execution of the processes.
Process P1 P2 P3 P4
Arrival time (ms) Burst time (ms) 0 8 4 5 3 2 2 1
Priority 4 2 1 3
For demo goto desktop/oslab/ demo/ [Link]