chapter

    Cpu Scheduling Pyqs for Gate Cs

    Solve 9+ Cpu Scheduling previous year questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    2026 Slot Set2 PYQ
    Level 3: Exam Standard

    Which one of the following CPU scheduling algorithms cannot be preemptive?

    Question 2
    2026 Slot Set1 PYQ
    Level 3: Exam Standard

    Consider a CPU that has to execute two types of processes. The first type, Actuators (A), requires a CPU burst of 6 seconds. The second type, Controllers (C), requires a CPU burst of 8 seconds. A new process of type A arrives at time and (in seconds). Similarly, a new process of type C arrives at time and (in seconds). The CPU scheduling policy is First Come First Serve (FCFS). The first process of type A starts running at seconds. The average waiting time (in seconds) for the 10 processes is ___________. (rounded off to one decimal place)

    Question 3
    2025 Slot Set2 PYQ
    Level 3: Exam Standard
    Processes , , , arrive in that order at times 0, 1, 2, and 8 milliseconds respectively, and have execution times of 10, 13, 6, and 9 milliseconds respectively. Shortest Remaining Time First (SRTF) algorithm is used as the CPU scheduling policy. Ignore context switching times.

    Which ONE of the following correctly gives the average turnaround time of the four processes in milliseconds?
    Question 4
    2025 Slot Set1 PYQ
    Level 3: Exam Standard
    A computer has two processors, and . Four processes with CPU bursts of 20, 16, 25, and 10 milliseconds, respectively, arrive at the same time and these are the only processes in the system. The scheduler uses non-preemptive priority scheduling, with priorities decided as follows:

    • uses priority of execution for the processes as, , i.e., and have highest and lowest priorities, respectively.
    • uses priority of execution for the processes as, , i.e., and have highest and lowest priorities, respectively.

    A process is scheduled to a processor , if the processor is free and no other process is waiting with higher priority. At any given point of time, a process can be allocated to any one of the free processors without violating the execution priority rules. Ignore the context switch time. What will be the average waiting time of the processes in milliseconds?
    Question 5
    2024 Slot Set2 PYQ
    Level 3: Exam Standard
    Consider a single processor system with four processes A, B, C, and D, represented as given below, where for each process the first value is its arrival time, and the second value is its CPU burst time.

    A (0, 10), B (2, 6), C (4, 3), and D (6, 7).

    Which one of the following options gives the average waiting times when preemptive Shortest Remaining Time First (SRTF) and Non-Preemptive Shortest Job First (NP-SJF) CPU scheduling algorithms are applied to the processes?
    Question 6
    2023 PYQ
    Level 3: Exam Standard

    Which one or more of the following CPU scheduling algorithms can potentially cause starvation?

    Question 7
    2022 PYQ
    Level 4: Challenger

    Consider four processes P, Q, R, and S scheduled on a CPU as per round robin algorithm with a time quantum of 4 units. The processes arrive in the order P, Q, R, S, all at time . There is exactly one context switch from S to Q, exactly one context switch from R to Q, and exactly two context switches from Q to R. There is no context switch from S to P. Switching to a ready process after the termination of another process is also considered a context switch. Which one of the following is <b>NOT</b> possible as CPU burst time (in time units) of these processes?

    Question 8
    2021 Slot Set2 PYQ
    Level 3: Exam Standard

    Which of the following statement(s) is/are correct in the context of CPU scheduling?

    Question 9
    2021 Slot Set1 PYQ
    Level 3: Exam Standard

    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.

    Free preview ends here

    Login to view the complete previous-year questions and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Explore complete test series, official past papers, and chapter-wise study tools.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Cpu Scheduling PYQs for GATE CS

    Solve 9+ Cpu Scheduling previous year questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Chapter Roadmap: CPU Scheduling

    The CPU Scheduling Journey
    Foundations & Metrics: Arrival, Burst, Completion, Turnaround, Waiting, Response.
    SJF & SRTF: Optimal algorithms for minimizing average waiting time.
    Scheduling Properties: Preemption overhead, starvation, convoy effect.
    Round Robin (RR): Time-slicing, quantum selection, context switches.
    Priority & Multiprocessor: Diverse workloads and multi-CPU distribution.

    Topic Hero: The Core Philosophy of SJF and SRTF

    The primary objective of any scheduling algorithm is to optimize system metrics. For batch systems, the most critical metric is average waiting time.
    The Mathematical Truth: To minimize the sum of waiting times, you must execute the shortest jobs first. If you execute a long job first, all subsequent short jobs are forced to wait for the entire duration of that long job.
    • Shortest Job First (SJF): Non-preemptive. Once a process gets the CPU, it runs to completion.
    • Shortest Remaining Time First (SRTF): Preemptive. If a newly arrived process has a burst time strictly less than the remaining time of the currently running process, the CPU is snatched away.
    Note: Both algorithms are mathematically proven to give the minimum average waiting time for a given set of processes.

    Cpu Scheduling: Solved Questions with Step-by-Step Explanations (9 Problems)

    Question 1 · Operating System · 2026_Set2 MCQ

    Which one of the following CPU scheduling algorithms cannot be preemptive?

    1. A.

      Shortest Remaining Time First (SRTF) Scheduling

    2. B.

      First Come First Serve (FCFS) Scheduling

    3. C.

      Round Robin Scheduling

    4. D.

      Priority Scheduling

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: This is a definition-based MCQ testing which algorithm fundamentally cannot be preemptive. The key is to recall the strict definition of each algorithm.

    Exam route: SRTF is by definition preemptive. Round Robin uses time slicing, so it is preemptive. Priority scheduling can be either. FCFS, by definition, gives the CPU to the first process and never takes it away until completion or I/O block. Answer: B.

    Learning route:

    Step 1: Shortest Remaining Time First (SRTF) is the preemptive version of SJF. It preempts whenever a newly arrived process has a shorter remaining burst. So SRTF is preemptive. Option A is wrong.

    Step 2: First Come First Serve (FCFS) allocates the CPU to the first process that arrives in the ready queue. Once allocated, the process runs until it terminates or blocks for I/O. There is no mechanism in FCFS to interrupt a running process. Therefore, FCFS is strictly non-preemptive. Option B is correct.

    Step 3: Round Robin (RR) uses a fixed time quantum. If a process does not finish within its quantum, it is preempted and moved to the tail of the ready queue. RR is inherently preemptive. Option C is wrong.

    Step 4: Priority Scheduling can be implemented as either preemptive or non-preemptive. In preemptive priority, a newly arriving higher-priority process preempts the current one. In non-preemptive priority, the current process runs to completion. Since it can be preemptive, Option D is wrong.

    Final answer: B.

    Question 2 · Operating System · 2026_Set1 NAT

    Consider a CPU that has to execute two types of processes. The first type, Actuators (A), requires a CPU burst of 6 seconds. The second type, Controllers (C), requires a CPU burst of 8 seconds. A new process of type A arrives at time and (in seconds). Similarly, a new process of type C arrives at time and (in seconds). The CPU scheduling policy is First Come First Serve (FCFS). The first process of type A starts running at seconds. The average waiting time (in seconds) for the 10 processes is ___________. (rounded off to one decimal place)

    Correct Answer:

    9.50

    Step-by-Step Solution

    Insight: This is a single-CPU FCFS scheduling question with staggered arrivals. Trace the timeline process by process, computing start time, completion time, and waiting time for each.

    Exam route: List all arrivals in chronological order. For each process, start time = max(arrival time, previous completion time). WT = start time - arrival time. Sum all WT and divide by 10.

    Learning route:

    Step 1: List all processes in arrival order.

    • A1: arr 10, burst 6
    • C1: arr 11, burst 8
    • A2: arr 20, burst 6
    • C2: arr 22, burst 8
    • A3: arr 30, burst 6
    • C3: arr 33, burst 8
    • A4: arr 40, burst 6
    • C4: arr 44, burst 8
    • A5: arr 50, burst 6
    • C5: arr 55, burst 8

    Step 2: Trace FCFS.

    • A1: starts at 10, finishes at 16. WT = 10 - 10 = 0.
    • C1: starts at 16, finishes at 24. WT = 16 - 11 = 5.
    • A2: starts at 24, finishes at 30. WT = 24 - 20 = 4.
    • C2: starts at 30, finishes at 38. WT = 30 - 22 = 8.
    • A3: starts at 38, finishes at 44. WT = 38 - 30 = 8.
    • C3: starts at 44, finishes at 52. WT = 44 - 33 = 11.
    • A4: starts at 52, finishes at 58. WT = 52 - 40 = 12.
    • C4: starts at 58, finishes at 66. WT = 58 - 44 = 14.
    • A5: starts at 66, finishes at 72. WT = 66 - 50 = 16.
    • C5: starts at 72, finishes at 80. WT = 72 - 55 = 17.

    Step 3: Sum of WT = 0 + 5 + 4 + 8 + 8 + 11 + 12 + 14 + 16 + 17 = 95.

    Step 4: Average WT = 95 / 10 = 9.5.

    Final answer: 9.50.

    Question 3 · Operating System · 2025_Set2 MCQ
    Processes , , , arrive in that order at times 0, 1, 2, and 8 milliseconds respectively, and have execution times of 10, 13, 6, and 9 milliseconds respectively. Shortest Remaining Time First (SRTF) algorithm is used as the CPU scheduling policy. Ignore context switching times.

    Which ONE of the following correctly gives the average turnaround time of the four processes in milliseconds?
    1. A.

      22

    2. B.

      15

    3. C.

      37

    4. D.

      19

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: This is a standard SRTF tracing question with staggered arrivals. The key is to maintain a remaining burst time table and check for preemption at every arrival event.

    Exam route: Trace the Gantt chart step by step. At each arrival, compare the new process's burst with the remaining burst of the running process. Preempt if the new burst is strictly smaller. Compute completion times, then TAT = CT - AT, and average them.

    Learning route:

    Step 1: Initialize. At t=0, P1 arrives with burst 10. P1 starts running.

    Step 2: At t=1, P2 arrives with burst 13. P1 has run for 1 unit, so P1 remaining = 9. P2 remaining = 13. Since 13 > 9, P1 continues.

    Step 3: At t=2, P3 arrives with burst 6. P1 remaining = 8, P2 remaining = 12, P3 remaining = 6. Since 6 < 8, P3 preempts P1. P3 runs.

    Step 4: P3 runs from t=2 to t=8 (6 units). P3 finishes at t=8.

    Step 5: At t=8, P4 arrives with burst 9. P3 finishes. Ready queue: P1 (rem 8), P2 (rem 12), P4 (rem 9). Shortest remaining is P1 (8). P1 resumes.

    Step 6: P1 runs from t=8 to t=16 (8 units). P1 finishes at t=16.

    Step 7: Ready queue: P2 (rem 12), P4 (rem 9). Shortest is P4 (9). P4 runs.

    Step 8: P4 runs from t=16 to t=25 (9 units). P4 finishes at t=25.

    Step 9: Ready queue: P2 (rem 12). P2 runs.

    Step 10: P2 runs from t=25 to t=37 (12 units). P2 finishes at t=37.

    Step 11: Compute turnaround times. TAT = CT - AT.

    • P1: CT = 16, AT = 0. TAT = 16.
    • P2: CT = 37, AT = 1. TAT = 36.
    • P3: CT = 8, AT = 2. TAT = 6.
    • P4: CT = 25, AT = 8. TAT = 17.

    Step 12: Average TAT = (16 + 36 + 6 + 17) / 4 = 75 / 4 = 18.75 ≈ 19.

    Final answer: D (19).

    Question 4 · Operating System · 2025_Set1 MCQ
    A computer has two processors, and . Four processes with CPU bursts of 20, 16, 25, and 10 milliseconds, respectively, arrive at the same time and these are the only processes in the system. The scheduler uses non-preemptive priority scheduling, with priorities decided as follows:

    • uses priority of execution for the processes as, , i.e., and have highest and lowest priorities, respectively.
    • uses priority of execution for the processes as, , i.e., and have highest and lowest priorities, respectively.

    A process is scheduled to a processor , if the processor is free and no other process is waiting with higher priority. At any given point of time, a process can be allocated to any one of the free processors without violating the execution priority rules. Ignore the context switch time. What will be the average waiting time of the processes in milliseconds?
    1. A.

      9

    2. B.

      8.75

    3. C.

      6.5

    4. D.

      7.5

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: This is a multiprocessor priority scheduling question. Each processor has its own priority ordering, and each must independently pick the highest-priority available process according to its own rule.

    Exam route: At , M1 picks P1 (highest on M1), M2 picks P2 (highest on M2). P2 finishes at 16, M2 picks P3. P1 finishes at 20, M1 picks P4. Compute WT: P1=0, P2=0, P3=16, P4=20. Average = 36/4 = 9.

    Learning route:

    Step 1: Understand the priority rules.

    • M1 priority: P1 > P3 > P2 > P4.
    • M2 priority: P2 > P3 > P4 > P1.

    Step 2: At , all four processes are available. Both processors are free.

    • M1 must pick the highest-priority available process on M1: P1.
    • M2 must pick the highest-priority available process on M2: P2.
    • Assignment: M1 → P1 (burst 20), M2 → P2 (burst 16).

    Step 3: P2 finishes at . M2 is free. Available processes: P3, P4.

    • M2 priority: P3 > P4. M2 picks P3 (burst 25).
    • P3 will finish at .

    Step 4: P1 finishes at . M1 is free. Available process: P4.

    • M1 picks P4 (burst 10).
    • P4 will finish at .

    Step 5: Compute waiting times. . All arrive at .

    • P1: , .
    • P2: , .
    • P3: , .
    • P4: , .

    Step 6: Average WT = .

    Final answer: 9 (Option A).

    Question 5 · Operating System · 2024_Set2 MCQ
    Consider a single processor system with four processes A, B, C, and D, represented as given below, where for each process the first value is its arrival time, and the second value is its CPU burst time.

    A (0, 10), B (2, 6), C (4, 3), and D (6, 7).

    Which one of the following options gives the average waiting times when preemptive Shortest Remaining Time First (SRTF) and Non-Preemptive Shortest Job First (NP-SJF) CPU scheduling algorithms are applied to the processes?
    1. A.

      SRTF = 6, NP-SJF = 7

    2. B.

      SRTF = 6, NP-SJF = 7.5

    3. C.

      SRTF = 7, NP-SJF = 7.5

    4. D.

      SRTF = 7, NP-SJF = 8.5

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: This is a comparison question asking for average waiting times under SRTF and NP-SJF. The key is to trace both algorithms separately and compute WT = CT - AT - BT for each.

    Exam route: Trace SRTF first, then NP-SJF. For SRTF, preempt when a new arrival has shorter remaining burst. For NP-SJF, once a process starts, it runs to completion. Compute WT for each process under both algorithms, then average.

    Learning route:

    Step 1: SRTF trace.

    • t=0: A(10) runs. Rem: A=10.
    • t=2: B(6) arrives. A rem=8, B rem=6. B < A. Preempt. B runs.
    • t=4: C(3) arrives. A rem=8, B rem=4, C rem=3. C < B. Preempt. C runs.
    • t=6: D(7) arrives. A rem=8, B rem=4, C rem=1, D rem=7. C is shortest. C continues.
    • t=7: C finishes. Ready: A(8), B(4), D(7). B is shortest. B runs.
    • t=11: B finishes. Ready: A(8), D(7). D is shortest. D runs.
    • t=18: D finishes. Ready: A(8). A runs.
    • t=26: A finishes.
    • WT: A=26-0-10=16, B=11-2-6=3, C=7-4-3=0, D=18-6-7=5.
    • Avg WT (SRTF) = (16+3+0+5)/4 = 24/4 = 6.

    Step 2: NP-SJF trace.

    • t=0: A(10) runs. Non-preemptive.
    • t=10: A finishes. Ready: B(6), C(3), D(7). C is shortest. C runs.
    • t=13: C finishes. Ready: B(6), D(7). B is shortest. B runs.
    • t=19: B finishes. Ready: D(7). D runs.
    • t=26: D finishes.
    • WT: A=10-0-10=0, B=19-2-6=11, C=13-4-3=6, D=26-6-7=13.
    • Avg WT (NP-SJF) = (0+11+6+13)/4 = 30/4 = 7.5.

    Step 3: Compare with options. SRTF=6, NP-SJF=7.5 matches Option B.

    Final answer: B.

    Question 6 · Operating System · 2023 MSQ

    Which one or more of the following CPU scheduling algorithms can potentially cause starvation?

    1. A.

      First-in First-Out

    2. B.

      Round Robin

    3. C.

      Priority Scheduling

    4. D.

      Shortest Job First

    Correct Answer:

    ["C","D"]

    Step-by-Step Solution

    Insight: This is a starvation-identification MSQ. Starvation occurs when a process can be indefinitely bypassed by newer or higher-priority processes. Check each algorithm against this definition.

    Exam route: FCFS and RR guarantee every process gets CPU time. Priority and SJF can indefinitely bypass low-priority or long processes. Answer: C, D.

    Learning route:

    Step 1: Define starvation. A process is starved if it waits indefinitely in the ready queue because the scheduler continuously favors other processes.

    Step 2: Check FCFS. Processes are served in arrival order. Once a process is in the queue, it will eventually reach the front and get the CPU. No starvation. Option A is incorrect.

    Step 3: Check Round Robin. Every process gets a fixed time quantum in cyclic order. Even if new processes arrive, they join the back of the queue. Every process in the queue will eventually get its turn. No starvation. Option B is incorrect.

    Step 4: Check Priority Scheduling. If high-priority processes keep arriving, a low-priority process may never get the CPU. This is the classic starvation scenario. Option C is correct.

    Step 5: Check Shortest Job First. If short processes keep arriving, a long process may be indefinitely bypassed. This is also a classic starvation scenario. Option D is correct.

    Final answer: C, D.

    Question 7 · Operating System · 2022 MCQ

    Consider four processes P, Q, R, and S scheduled on a CPU as per round robin algorithm with a time quantum of 4 units. The processes arrive in the order P, Q, R, S, all at time . There is exactly one context switch from S to Q, exactly one context switch from R to Q, and exactly two context switches from Q to R. There is no context switch from S to P. Switching to a ready process after the termination of another process is also considered a context switch. Which one of the following is <b>NOT</b> possible as CPU burst time (in time units) of these processes?

    1. A.

      P = 4, Q = 10, R = 6, S = 2

    2. B.

      P = 2, Q = 9, R = 5, S = 1

    3. C.

      P = 4, Q = 12, R = 5, S = 4

    4. D.

      P = 3, Q = 7, R = 7, S = 3

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: This is a reverse-engineering question. Given constraints on context switch sequences, deduce which burst time assignment is impossible. The key is to trace the Round Robin execution for each option and count the switches.

    Exam route: For each option, trace the Gantt chart with quantum=4. Count the number of each type of switch (S→Q, R→Q, Q→R, S→P). Check which option violates the constraints.

    Learning route:

    Step 1: Understand the constraints.

    • Exactly one S→Q switch.
    • Exactly one R→Q switch.
    • Exactly two Q→R switches.
    • No S→P switch.
    • Termination switches count.

    Step 2: Trace Option A: P=4, Q=10, R=6, S=2.

    • t=0-4: P runs 4. P finishes. Queue: Q,R,S. Switch: P→Q.
    • t=4-8: Q runs 4. Q rem=6. Queue: R,S,Q. Switch: Q→R.
    • t=8-12: R runs 4. R rem=2. Queue: S,Q,R. Switch: R→S.
    • t=12-14: S runs 2. S finishes. Queue: Q,R. Switch: S→Q. (1 S→Q)
    • t=14-18: Q runs 4. Q rem=2. Queue: R,Q. Switch: Q→R. (2 Q→R)
    • t=18-20: R runs 2. R finishes. Queue: Q. Switch: R→Q. (1 R→Q)
    • t=20-22: Q runs 2. Q finishes. Switch: Q→end.
    • Counts: S→Q=1 ✓, R→Q=1 ✓, Q→R=2 ✓, S→P=0 ✓. Possible.

    Step 3: Trace Option B: P=2, Q=9, R=5, S=1.

    • t=0-2: P runs 2. P finishes. Queue: Q,R,S. Switch: P→Q.
    • t=2-6: Q runs 4. Q rem=5. Queue: R,S,Q. Switch: Q→R.
    • t=6-10: R runs 4. R rem=1. Queue: S,Q,R. Switch: R→S.
    • t=10-11: S runs 1. S finishes. Queue: Q,R. Switch: S→Q. (1 S→Q)
    • t=11-15: Q runs 4. Q rem=1. Queue: R,Q. Switch: Q→R. (2 Q→R)
    • t=15-16: R runs 1. R finishes. Queue: Q. Switch: R→Q. (1 R→Q)
    • t=16-17: Q runs 1. Q finishes. Switch: Q→end.
    • Counts: S→Q=1 ✓, R→Q=1 ✓, Q→R=2 ✓, S→P=0 ✓. Possible.

    Step 4: Trace Option C: P=4, Q=12, R=5, S=4.

    • t=0-4: P runs 4. P finishes. Queue: Q,R,S. Switch: P→Q.
    • t=4-8: Q runs 4. Q rem=8. Queue: R,S,Q. Switch: Q→R.
    • t=8-12: R runs 4. R rem=1. Queue: S,Q,R. Switch: R→S.
    • t=12-16: S runs 4. S finishes. Queue: Q,R. Switch: S→Q. (1 S→Q)
    • t=16-20: Q runs 4. Q rem=4. Queue: R,Q. Switch: Q→R. (2 Q→R)
    • t=20-21: R runs 1. R finishes. Queue: Q. Switch: R→Q. (1 R→Q)
    • t=21-25: Q runs 4. Q finishes. Switch: Q→end.
    • Counts: S→Q=1 ✓, R→Q=1 ✓, Q→R=2 ✓, S→P=0 ✓. Possible.

    Step 5: Trace Option D: P=3, Q=7, R=7, S=3.

    • t=0-3: P runs 3. P finishes. Queue: Q,R,S. Switch: P→Q.
    • t=3-7: Q runs 4. Q rem=3. Queue: R,S,Q. Switch: Q→R.
    • t=7-11: R runs 4. R rem=3. Queue: S,Q,R. Switch: R→S.
    • t=11-14: S runs 3. S finishes. Queue: Q,R. Switch: S→Q. (1 S→Q)
    • t=14-17: Q runs 3. Q finishes. Queue: R. Switch: Q→R. (2 Q→R)
    • t=17-20: R runs 3. R finishes. Queue: empty. Switch: R→end.
    • Counts: S→Q=1 ✓, R→Q=0 ✗ (need 1), Q→R=2 ✓, S→P=0 ✓.
    • R→Q is 0, but the constraint requires exactly 1. This is NOT possible.

    Final answer: D.

    Question 8 · Operating System · 2021_Set2 MSQ

    Which of the following statement(s) is/are correct in the context of CPU scheduling?

    1. A.

      Turnaround time includes waiting time.

    2. B.

      The goal is to only maximize CPU utilization and minimize throughput.

    3. C.

      Round-robin policy can be used even when the CPU time required by each of the processes is not known apriori.

    4. D.

      Implementing preemptive scheduling needs hardware support.

    Correct Answer:

    ["A","C","D"]

    Step-by-Step Solution

    Insight: This is a property-verification MSQ. Evaluate each statement independently against the formal definitions of scheduling metrics, goals, and hardware requirements.

    Exam route: Check each option against the standard property matrix. TAT = WT + Burst, so TAT includes WT. Goals maximize (not minimize) throughput. RR needs no prior burst knowledge. Preemption needs a timer interrupt (hardware).

    Learning route:

    Step 1: Option A — Turnaround Time = Completion Time − Arrival Time. Waiting Time = Turnaround Time − Burst Time. Rearranging, TAT = WT + Burst. So TAT always includes WT. Statement A is correct.

    Step 2: Option B — The goals of CPU scheduling include maximizing CPU utilization, maximizing throughput (not minimizing), minimizing turnaround time, minimizing waiting time, and minimizing response time. The word "only" and the word "minimize throughput" both make this statement false.

    Step 3: Option C — Round Robin assigns a fixed time quantum to each process in the ready queue. It does not require knowledge of the total CPU burst in advance; it simply runs each process for one quantum and then re-queues it. Statement C is correct.

    Step 4: Option D — Preemptive scheduling requires the OS to interrupt a running process. This is implemented via a timer interrupt, which is a hardware mechanism. Without hardware timer support, the running process cannot be forcibly preempted. Statement D is correct.

    Final answer: A, C, D.

    Question 9 · Operating System · 2021_Set1 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.

    Correct Answer:

    12.00

    Step-by-Step Solution

    Insight: This is a minimum-average-waiting-time question with all processes arriving at and a non-preemptive scheduler. The optimal algorithm is SJF.

    Exam route: Since all arrive at and the scheduler has prior knowledge, use SJF. Sort bursts: 10, 16, 20. Compute WT for each: 0, 10, 26. Average = 36/3 = 12.

    Learning route:

    Step 1: The question states all three processes arrive at time zero, the scheduler has prior knowledge of burst lengths, and the scheduler is non-preemptive. These conditions together point directly to Shortest Job First (SJF), which is mathematically proven to minimize average waiting time for a given set of processes when all arrive simultaneously.

    Step 2: Sort the burst times in ascending order: 10, 16, 20.

    Step 3: Compute waiting time for each process.

    • Process with burst 10: starts at , .
    • Process with burst 16: starts at , .
    • Process with burst 20: starts at , .

    Step 4: Average waiting time = .

    Step 5: The question asks for the answer rounded to the nearest integer. 12 is already an integer.

    Final answer: 12.00.

    More previous year questions (pyqs) in this unit