GateAI
CPU and I/O Scheduling

GATE CSE 2021 Set 1 · Q25

NAT1 markEasy

Time

Three processes arrive at time zero with CPU bursts of 16, 20 and 10 milliseconds. If the scheduler has prior knowledge about the length of the CPU bursts, the minimum achievable average waiting time for these three processes in a non-preemptive scheduler (rounded to nearest integer) is ___________ milliseconds.

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 12

CPU and I/O Scheduling

To minimize the average waiting time for a set of processes arriving at the same time (t=0t = 0), the optimal non-preemptive scheduling algorithm is Shortest Job First (SJF).

Let the processes be:

  • P1P_1 with burst time BT1=10 msBT_1 = 10\text{ ms}

  • P2P_2 with burst time BT2=16 msBT_2 = 16\text{ ms}

  • P3P_3 with burst time BT3=20 msBT_3 = 20\text{ ms}

Scheduling in non-decreasing order of burst times (P1→P2→P3P_1 \to P_2 \to P_3):

  • P1P_1: Starts at t=0t = 0, finishes at t=10t = 10.

    Waiting Time(P1)=0−0=0 ms\text{Waiting Time}(P_1) = 0 - 0 = 0\text{ ms}
  • P2P_2: Starts at t=10t = 10, finishes at t=10+16=26t = 10 + 16 = 26.

    Waiting Time(P2)=10−0=10 ms\text{Waiting Time}(P_2) = 10 - 0 = 10\text{ ms}
  • P3P_3: Starts at t=26t = 26, finishes at t=26+20=46t = 26 + 20 = 46.

    Waiting Time(P3)=26−0=26 ms\text{Waiting Time}(P_3) = 26 - 0 = 26\text{ ms}

Total waiting time:

Total WT=0+10+26=36 ms\text{Total WT} = 0 + 10 + 26 = 36\text{ ms}

Average waiting time:

Average WT=363=12 ms\text{Average WT} = \frac{36}{3} = 12\text{ ms}

Therefore, the minimum achievable average waiting time is 12 milliseconds.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This CPU and I/O Scheduling previous year question is Q25 of the GATE CSE 2021 Set 1 paper. Find more GATE CSE PYQs on CPU and I/O Scheduling in Operating Systems, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related CPU and I/O Scheduling PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

CPU and I/O Scheduling in GATE CSE

CPU and I/O Scheduling has 25 GATE CSE PYQs across 22 papers from 2011 to 2026. 2 of them are 1-mark NAT questions like this one, and it is the only one in GATE CSE 2021 Set 1.

How GATE tests CPU and I/O Scheduling

More from GATE CSE 2021 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2021 Set 1 · Q25 · NAT

Three processes arrive at time zero with CPU bursts of 16, 20 and 10 milliseconds. If the scheduler has prior knowledge about the length of the CPU bursts, the minimum achievable average waiting time for these three processes in a non-preemptive scheduler (rounded to nearest integer) is … milliseconds.

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.