recategorized by
2,452 views
1 votes
1 votes

Consider the following three processes with the arrival time and CPU burst time given in miliseconds:

Process Arrival Time Burst Time
$P_1$ 0 7
$P_2$ 1 4
$P_3$ 2 8

The Gantt Chart for preemptive SJF scheduling algorithm is _______

 

recategorized by

3 Answers

0 votes
0 votes

Only (2) and (4) are preemptive.

While only (2) is correct.

In (4) P2 started execution before its arrival!

0 votes
0 votes

1) Not pre-emptive. P1 continues execution without being pre-empted. 

2) Pre-emptive SJF . P1 executes for 1 second followed by execution of P2 for 4 secs. Then P1 finishes execution followed by P3.

3) Not pre-emptive as each of the processes carries on execution without being pre-empted.

4)Pre-emptive but P2 starts execution even before it has arrived which can't happen in reality. 

Hence Option 2 is correct . 

Related questions

0 votes
0 votes
2 answers
1
Pooja Khatri asked Jul 13, 2018
1,485 views
In which of the following scheduling criteria, context switching will never take place?ROUND ROBINPreemptive SJFNon-preemptive SJFPreemptive priority
2 votes
2 votes
2 answers
2
0 votes
0 votes
4 answers
3
2 votes
2 votes
2 answers
4