Numercals on non preemptive CPU Scheduling Algorithm
Numercals on non preemptive CPU Scheduling Algorithm
processes that arrive at time 0, with the length of CPU burst time given in m-sec. Also, calculate
the average waiting time.
Example 2: Draw the Gantt chart, using SJF scheduling for the given data. Also calculate the
average waiting time.
Example 3: Schedule the given processes using priority scheduling when all the processes at the
time zero, in order P1, P2, ---- P5, with the length of CPU burst time given in milliseconds:
Example 4: Consider the following set of processes that arrives at time 0 ms.
Page | 1
Example 5: Consider the following set of processes that arrive at time zero, with the length of
CPU burst time given in milliseconds:
Example 6: For the given five processes arriving at time zero, in the order given with the length
of CPU burst time in milliseconds:
Example 7: Consider the following four processes with the length of the CPU burst time in
millisecond:
i. FCFS
ii. RR (Slice = 4 ms)
iii. SRTF
Example 8: Consider the following set of processes, with the length of the burst time given in
milliseconds:
Page | 2
Process Burst Time Priority
P1 10 03
P2 01 01
P3 02 03
P4 01 04
P5 05 02
The processes are assumed to have arrived in order P1, P2, P3, P4, and P5 all at time 0.
a) Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF, a
non pre-emptive priority (a smaller priority number implies a higher priority), and RR
(Quantum = 1) scheduling.
b) What is the turnaround time of each process for each of the scheduling algorithm in part
a?
c) What is the waiting time of each process for each of the scheduling algorithm in part a?
d) Which of the schedules in part a results in the minimal average waiting time (overall
processes)?
Example 9: Consider the following set of processes, assumed to have arrived at time 0, in the
order P1, P2, P3, ----, P5, with the length of CPU bust time given in milliseconds:
Page | 3