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 , 20, 30, 40, and 50 (in seconds). Similarly, a new process of type C arrives at time , 22, 33, 44, and 55 (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)
GATE 2026 CS1 Q.64: solution and answer
Answer and solution
ANSWER
The average waiting time for the 10 processes is 9.5 seconds.
Official answer: 9.5Source: Official answer key, GATE 2026 CS1 (IIT Guwahati)
Arrival order (FCFS serves in this order): . Bursts: A = 6 s, C = 8 s.
Gantt chart, starting at . Each process starts when the previous one finishes, or on arrival if the CPU is idle. From the queue is never empty, so the CPU never idles: , , , , , , , , , .
Waiting time start time arrival time (each process runs without preemption):
Total waiting time seconds.
Average waiting time seconds.
KEY IDEA
Under FCFS the processes run in arrival order without preemption. Each one starts at the later of its own arrival time and the previous process's finish time. Its waiting time is its start time minus its arrival time.
WATCH OUT FOR
Averaging turnaround times instead of waiting times, or assuming the CPU idles between jobs. Arrivals are 10 s and 11 s apart but each pair needs 14 s of CPU, so the queue keeps growing and waiting times rise from 0 to 17.
From the GATE 2026 CS1 paper. Every question of this paper · Download the full paper · All 8 CPU scheduling questions, with notes
More CPU scheduling questions
- GATE 2025 CS1 Q.38 · MCQ · 2 marksA computer has two processors, M_1 and M_2. Four processes P_1, P_2, P_3, P_4 with CPU bursts of 20, 16, 25…
- GATE 2025 CS2 Q.26 · MCQ · 1 markProcesses P1, P2, P3, P4 arrive in that order at times 0, 1, 2, and 8 milliseconds respectively, and have…
- GATE 2024 CS2 Q.37 · MCQ · 2 marksConsider a single processor system with four processes A, B, C, and D, represented as given below, where for…
- GATE 2023 CS Q.27 · MSQ · 1 markWhich one or more of the following CPU scheduling algorithms can potentially cause starvation?
