A system adopts the Preemptive-Priority scheduling wherein the Arrival Time, Burst Time and priority for each process
Question:
A system adopts the ‘Preemptive-Priority’ scheduling wherein the Arrival Time, Burst Time and priority for each process has been shown in the table below. In a recorded time-span, the system has six processes, P1, P2, P3, P4, P5 and P6 as shown in the following table.
At time t=15, the process running will ask for some I/O. The I/O operation takes 15 time units to complete.
At time t=36, the process running will ask for some I/O. The I/O operation takes 21 time units to complete.
a) If there is a situation wherein at time t = x, process PA (Process A)finishes its entire burst time and an I/O operation has been requested at the same time, then under such circumstances, PA should be sent to the blocked queue (and not the next higher priority process in the ready queue).
b) If there is a situation wherein at time t = x, process PA (Process A) has been preempted by a higher priority process PB and also an I/O operation being requested at the same time, then under such circumstances, PA should be sent to the blocked queue (and not the higher priority process PB).
Process ID | Arrival Time | Burst Time | Priority |
P1 | t=8 | 12 | 3 |
P2 | t=21 | 26 | 2 |
P3 | t=2 | 19 | 1 |
P4 | t=56 | 11 | 5 |
P5 | t=29 | 21 | 4 |
P6 | t=14 | 2 | 6 |
1) Draw a Gantt Chart (Timing Diagram) for the above data.
2) Calculate the Waiting Time for each process.
3) Calculate the Response Time for each process.
4) Calculate the Turn Around Time for each process.
Assumptions:
- Gantt chart should strictly begin from zero irrespective of the process arrival times.
- A Smaller Priority number means a Higher priority, i.e. 1>2>3>4>5>6