IAE Academy

GATE 2026 CS1 Q.64: solution and answer

GATE 2026 · CS1Q.64 · 2 marks · 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 , 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)

See the question in the paper

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)

  1. Arrival order (FCFS serves in this order): . Bursts: A = 6 s, C = 8 s.

  2. 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: , , , , , , , , , .

  3. Waiting time start time arrival time (each process runs without preemption):

  4. Total waiting time seconds.

  5. 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