GATE - 2019 | Consider the following four processes with arrival times (in milliseconds)

Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below:
Posted on 02-02-2022

GATE - 2019 [Operating System]

Question:

Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below:

     Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below:

These processes are run on a single processor using preemptive Shortest Remaining Time First scheduling algorithm. If the average waiting time of the processes is 1 millisecond, then the value of Z is _____.

A
2
B
7
C
1
D
4

 

Solution:

This is the Gantt chart till time = 4 units

This is the Gantt chart till time = 4 units 

At this point P4 arrives with burst 'Z' & P3 is in queue with burst 3.
P1 & P2 have executed with P1 incurred delay 1unit & P2 0units.
Hence, Avg = 0+1+x/4 =1
⇒ x=3, the next delay should be 3. It would happen if assume Z=2.
It executes and completes at 6.
P3 will wait totally for 3units.
Hence, Avg=1.

These processes are run on a single processor using preemptive Shortest Remaining Time First scheduling algorithm

Z=2

   

  1. GATE - 2019 | Consider three concurrent processes P1, P2 and P3 as shown below
  2. GATE - 2019 | The following C program is executed on a Unix/Linux system:
  3. GATE - 2019 | Assume that in a certain computer, the virtual addresses are 64 bits long
  4. GATE - 2019 | Consider the following four processes with arrival times (in milliseconds)

Download App for Free PDF Download

GovtVacancy.Net Android App: Download

government vacancy govt job sarkari naukri android application google play store https://play.google.com/store/apps/details?id=xyz.appmaker.juptmh