GateAI
CPU and I/O Scheduling

GATE CSE 2015 Set 3 · Q34

MCQ2 marksMedium

Time

For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time?

GATE CSE 2015 Set 3 Q34 diagram

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) Shortest Remaining Time

CPU and I/O Scheduling

Turnaround Time (TAT) is calculated as:

TAT=Completion Time−Arrival Time\text{TAT} = \text{Completion Time} - \text{Arrival Time}

Let's evaluate each scheduling algorithm:

  1. First Come First Serve (FCFS):

    • Execution order: A[0−3]→B[3−9]→C[9−13]→D[13−15]A[0-3] \to B[3-9] \to C[9-13] \to D[13-15]

    • Completion times: A=3,B=9,C=13,D=15A=3, B=9, C=13, D=15

    • TAT: A=3−0=3, B=9−1=8, C=13−4=9, D=15−6=9A = 3 - 0 = 3,\ B = 9 - 1 = 8,\ C = 13 - 4 = 9,\ D = 15 - 6 = 9

    • Average TAT=3+8+9+94=7.25\text{Average TAT} = \frac{3 + 8 + 9 + 9}{4} = 7.25

  2. Non-preemptive Shortest Job First (SJF):

    • t=0t=0: AA runs [0−3][0-3].

    • t=3t=3: Only BB is available, so BB runs [3−9][3-9].

    • t=9t=9: Both CC (burst 4) and DD (burst 2) are available. DD runs [9−11][9-11], then CC runs [11−15][11-15].

    • Completion times: A=3,B=9,D=11,C=15A=3, B=9, D=11, C=15

    • TAT: A=3, B=8, C=15−4=11, D=11−6=5A = 3,\ B = 8,\ C = 15 - 4 = 11,\ D = 11 - 6 = 5

    • Average TAT=3+8+11+54=6.75\text{Average TAT} = \frac{3 + 8 + 11 + 5}{4} = 6.75

  3. Shortest Remaining Time (SRT / Preemptive SJF):

    • t=0t=0 to 33: AA runs (burst 3). At t=1t=1, BB arrives (burst 6 > remaining A=2A=2), so AA completes at t=3t=3.

    • t=3t=3 to 44: BB runs (remaining becomes 5).

    • t=4t=4: CC arrives (burst 4). Since remaining of B(5)>4B (5) > 4, CC preempts BB and runs until t=6t=6 (remaining CC becomes 2).

    • t=6t=6: DD arrives (burst 2). Remaining times: C=2,D=2,B=5C=2, D=2, B=5. CC finishes at t=8t=8.

    • t=8t=8 to 1010: DD runs and finishes at t=10t=10.

    • t=10t=10 to 1515: BB finishes its remaining 5 units at t=15t=15.

    • Completion times: A=3,C=8,D=10,B=15A=3, C=8, D=10, B=15

    • TAT: A=3−0=3, B=15−1=14, C=8−4=4, D=10−6=4A = 3 - 0 = 3,\ B = 15 - 1 = 14,\ C = 8 - 4 = 4,\ D = 10 - 6 = 4

    • Average TAT=3+14+4+44=6.25\text{Average TAT} = \frac{3 + 14 + 4 + 4}{4} = 6.25

  4. Round Robin with Quantum = 2:

    • Average TAT is 7.257.25.

Comparing the average turnaround times:

  • FCFS: 7.257.25

  • Non-preemptive SJF: 6.756.75

  • Shortest Remaining Time (SRT): 6.256.25

  • Round Robin: 7.257.25

Thus, Shortest Remaining Time gives the lowest average turnaround time.

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 Q34 of the GATE CSE 2015 Set 3 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. 7 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2015 Set 3.

How GATE tests CPU and I/O Scheduling

More from GATE CSE 2015 Set 3

Share this solution

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

GateAI solution cardGATE CSE 2015 Set 3 · Q34 · MCQ

For the processes listed in the following table, which of the following scheduling schemes will give the lowest average turnaround time?

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.