CPU Scheduling: GATE CS Previous Year Questions

CPU Scheduling · Operating System

37 questions · asked in 24 of 27 years (2000–2026)

MCQ 24 · MSQ 2 · NAT 111-mark 21 · 2-mark 16

2000Questions per year2026

Questions 1–5 of 37

Q1GATE 2026 (Session 1)2 marksNAT
Consider a CPU that has to execute two types of processes. The first type, Actuators (A), requires a CPU burst of 66 seconds. The second type, Controllers (C), requires a CPU burst of 88 seconds. A new process of type A arrives at time t=10t=10, 20,30,4020, 30, 40, and 5050 (in seconds). Similarly, a new process of type C arrives at time t=t= 11,22,33,4411, 22, 33, 44, and 5555 (in seconds). The CPU scheduling policy is First Come First Serve (FCFS). The first process of type A starts running at t=10t=10 seconds. The average waiting time (in seconds) for the 1010 processes is ________. (rounded off to one decimal place)

Q2GATE 2026 (Session 2)1 markMCQ−0.33 if wrong
Which one of the following CPU scheduling algorithms cannot be preemptive?

Q3GATE 2025 (Session 1)2 marksMCQ−0.67 if wrong
A computer has two processors, M1M_1 and M2M_2. Four processes P1,P2,P3,P4P_1, P_2, P_3, P_4 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:

M1M_1 uses priority of execution for the processes as, P1>P3>P2>P4P_1 > P_3 > P_2 > P_4, i.e., P1P_1 and P4P_4 have highest and lowest priorities, respectively.
M2M_2 uses priority of execution for the processes as, P2>P3>P4>P1P_2 > P_3 > P_4 > P_1, i.e., P2P_2 and P1P_1 have highest and lowest priorities, respectively.

A process PiP_i is scheduled to a processor MkM_k, if the processor is free and no other process PjP_j 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?

Q4GATE 2025 (Session 2)1 markMCQ−0.33 if wrong
Processes P1,P2,P3,P4P_1, P_2, P_3, P_4 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?

Q5GATE 2024 (Session 2)2 marksMCQ−0.67 if wrong
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?

Keep practising

Topics in Operating System

All CS topics ›