in Cloud Computing by
Q:

What is the average waiting time for the following processes with preemptive SJF (Shortes Job First).

Process    Arrival Time        Burst Time

P1        0            8
P2        1            4
P3        2            9
P4        3            5

1.  6.5    2.  6.75     3.  7.5      4.  7.75

1 Answer

0 votes
by

Gantt Chart for preemptive SJF

P1

P2

P4

P1

P3

0                            1                             5                            10                            17                          26

The average waiting time for this example is ((10-1) + (1-1) + (17-2) + (5-3))/4 = 26/4 = 6.5
So, preemptive SJF is better than SJF.

Click here to read more about Cloud Computing
Click here to read more about Insurance

Related questions

0 votes
asked Jul 1, 2020 in Cache Technique by Robindeniel
0 votes
asked Jan 4, 2020 in Agile by sharadyadav1986
0 votes
asked Jul 1, 2020 in Cache Technique by Robindeniel
0 votes
asked Jan 29, 2020 in Other by rahuljain1
+1 vote
asked Sep 9, 2020 in PMP by Robindeniel
...