GATE CS 2024 Set 2 | Question 37

Operating Systems › CPU Scheduling · MCQ · 2 marks · Answer: B

  1. Question 37Operating Systemsmcq2 marks
    Processes A(0,10), B(2,6), C(4,3), D(6,7) (arrival, burst). Give the average waiting times for preemptive SRTF and non-preemptive SJF.
    • A.
      SRTF=6, NP-SJF=7
    • B.
      SRTF=6, NP-SJF=7.5
      ✓
    • C.
      SRTF=7, NP-SJF=7.5
    • D.
      SRTF=7, NP-SJF=8.5

    Answer: B

    Solution

    Answer: (B) SRTF=6, NP-SJF=7.5 SRTF timeline: A runs 0-2; B(6)<A(8) runs 2-4; C(3)<B(4) runs 4-7; B 7-11; D 11-18; A 18-26. Waiting = completion-arrival-burst: A=16,B=3,C=0,D=5 -> avg . NP-SJF: A 0-10; then ready {B,C,D}, shortest C 10-13; B 13-19; D 19-26. Waiting: A=0,B=11,C=6,D=13 -> avg .

More GATE PYQ on CPU Scheduling

All GATE CS Operating Systems PYQ →

Attempt GATE CS 2024 Set 2 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →