For the following dataset, compute average waiting time for SRTN and SJF.

        Process       Arrival Time       Burst Time
     P0       0      7
     P1       2      4
     P2       4      1
     P3      5      4

  • Answered by oriattic
  • 0 Comments
  • 1 year ago

For SJF (pre-emptive),

- Hamro CSIT

Process Turnaround Time i.e. TAT

(Completion Time-Arrival Time)

Waiting Time i.e. WAT

(TAT-Burst Time)

P0 16-0=16 16-7=9
P1 7-2=5 5-4=1
P2 5-4=1 1-1=0
P3 11-5=6 6-4=2

Average waiting time=(9+1+0+2)/4=3 ms

For SRTN,

- Hamro CSIT

Process Turnaround Time i.e. TAT

(Completion Time-Arrival Time)

Waiting Time i.e. WAT

(TAT-Burst Time)

P0 16-0=16 16-7=9
P1 7-2=5 5-4=1
P2 5-4=1 1-1=0
P3 11-5=6 6-4=2

Average waiting time=(9+1+0+2)/4=3 ms

If you found any type of error on the answer then please mention on the comment or report an answer or submit your new answer.
Leave your Answer:

Click here to submit your answer.

s
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments