edited by
3,367 views
1 1 vote

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

ProcessArrival TimeBurst Time
$P_1$07
$P_2$14
$P_3$28

The Gantt Chart for preemptive SJF scheduling algorithm is _______

  1.  gantt chart option A
  2. Gantt chart option B
  3. Gantt chart option C
  4. Gantt chart option D

 

4 Answers

0 0 votes

Only (2) and (4) are preemptive.

While only (2) is correct.

In (4) P2 started execution before its arrival!

0 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 . 

Position:
Show:

Related questions

0 0 votes
2 2 answers
2.2k
2.2k views
Pooja Khatri asked Jul 13, 2018
2,177 views
In which of the following scheduling criteria, context switching will never take place?ROUND ROBINPreemptive SJFNon-preemptive SJFPreemptive priority
1 1 vote
1 answers 1 answer
912
912 views
Bikram asked Dec 26, 2016
912 views
The arrival time, burst time and priorities of five processes are given as:$\begin{array}{|c|c|c|c|} \hline \text{Process} & \text{Arrival Time} & \text{Burst time} & \te...
1 1 vote
0 0 answers
634
634 views
Anant Mishra asked Jun 19, 2024
634 views
six jobs are waiting to be run . the expected running times are 9,7,5,2,1 and x respectively. where 5<x<7 & the average comp.time is 13. find the value of x using sjf alg...
0 0 votes
1 1 answer
686
686 views
arpit.jha asked Apr 26, 2024
686 views
Hi, All I have a question that in Process Scheduling topic most of the time we need to solve the problem using Gantt chart that's a bit time consuming . So I wanted to kn...