Q100.Marks: +2.0UGC NET Paper 2: Computer Sc 6th Jan 2025 Shift 1
📄 Passage
Consider the following set of processes with the arrival time and length of CPU burst time given in milli secends (ms)
Process
Arrival Time
Burst Time
P1
0
5
P2
2
3
P3
2
2
P4
5
3
P5
6
1
Calculate the average response time for these processes with a nonpreemptive priority Scheduling algorithm? Priority of the process are as follows and consider that all the processes came at zero (0) time. (Note low numbers represent high priority).
Process
Burst Time
Priority
P1
5
3
P2
3
1
P3
2
5
P4
3
4
P5
1
2
1.5.6 ms✓ Correct
2.5.2 ms
3.4.7 ms
4.3.8 ms
Solution
Scheduling Algorithm: Non-preemptive Priority Scheduling (Low number = High Priority)
Gantt chart:
P2
P5
P1
P4
P3
0 3 4 9 12 14
Process Table:
Process
B.T
Priority
A.T
C.T
T.A.T
W.T
R.T
P1
5
3
0
9
9
4
4
P2
3
1
0
3
3
0
0
P3
2
5
0
14
14
12
12
P4
3
4
0
12
12
9
9
P5
1
2
0
4
4
3
3
Average response time = (4+0+12+9+3)/5 ms
Answer: The corrected average response time is 5.6 ms.