Comprehension

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 Arrival Time Burst Time
P1 5 3
P2 3 1
P3 2 5
P4 3 4
P5 1 2

  1. 5.6 ms
  2. 5.2 ms
  3. 4.7 ms
  4. 3.8 ms

Answer (Detailed Solution Below)

Option 1 : 5.6 ms

Detailed Solution

Download Solution PDF

Scheduling Algorithm: Non-preemptive Priority Scheduling (Low number = High Priority)

Gantt chart:

P5

P3

P2

P4

P1

0        2       7       8       12       15

Process Table:

Process

Arrival Time (AT)

Burst Time (BT)

Completion Time (CT)

Response Time (RT)

P1

0

3

15

12

P2

0

1

8

6

P3

0

5

7

2

P4

0

4

12

8

P5

0

2

2

0

 

Average response time = ​​​​​\(\frac{{12 + 6 + 2 + 8 + 0}}{5} = 5.6\) ms

Answer: The correct option is 1) 5.6 ms.

More Process Scheduling Questions

More CPU Scheduling Questions

Get Free Access Now
Hot Links: teen patti real cash 2024 master teen patti teen patti club apk teen patti yas teen patti 3a