Monday 1 April 2019

UGC NET CS 2018 July - II Question 59

Question 59
59. Consider the following three processes with the arrival time and CPU burst time given in milliseconds :

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

The Gantt Chart for preemptive SJF scheduling algorithm is _________.

Options:
  1. (1)
  2. (2)
  3. (3)
  4. (4)
Answer : (2)

Explanation Question 59

Question asks for Gantt Chart for preemptive SJF

Option (1) is Not preemptive.

P1 continues execution without being preempted when sorter process P2 with Burst time 4 comes.

Option (2) is Preemptive SJF.
Here, P1 executes for 1 second and then preempted by P2 which executes for 4 seconds. Then P1 finishes its remaining execution  followed by execution of P3.

Option (3) is Not preemptive.
Not pre-emptive as P1 continues execution without being preempted when sorter process P2 with Burst time 4 comes. Each of the processes carries on execution without being preempted.

Option (4) is Preemptive but P2 starts execution even before it's arrival time 1.

So, Option (2) is correct answer

No comments:

Post a Comment

UGC NET Computer Science December 2019 | Question 16

Question 16 In a certain coding language. 'AEIOU' is written as 'TNHDZ'. Using the same coding language. 'BFJPV' wil...

Popular Posts