Question:

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 𝑑 = 10,
20, 30, 40, and 50 (in seconds). Similarly, a new process of type C arrives at time 𝑑 =
11, 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 𝑑 = 10 seconds. The
average waiting time (in seconds) for the 10 processes is ___________. (rounded off
to one decimal place)

Show Hint

Merge both arrival streams into one time-ordered queue and simulate FCFS: at each CPU-free instant, the process with the smaller arrival time among those waiting goes next. Compute (start time - arrival time) for all 10 processes, sum them, and divide by 10.
Updated On: Aug 4, 2026
Show Solution
collegedunia
Verified By Collegedunia

Correct Answer: 9.5

Solution and Explanation

This problem tests FCFS (First Come First Served) CPU scheduling with two process types arriving at fixed intervals.

Step 1: List arrival times and burst times. Actuator processes A1-A5 arrive at \(t = 10, 20, 30, 40, 50\) seconds, each with burst time 6 seconds. Controller processes C1-C5 arrive at \(t = 11, 22, 33, 44, 55\) seconds, each with burst time 8 seconds.

Step 2: Apply the FCFS rule. In FCFS the CPU always serves whichever already-arrived process has been waiting the longest, and each process runs to completion once started (non-preemptive). Since A1 is given to start at \(t = 10\), the CPU timeline is built process by process, always choosing the earliest-arrived pending process at each completion instant.

Step 3: Build the execution timeline.

ProcessArrivalStartBurstFinishWaiting = Start - Arrival
A110106160
C111168245
A220246304
C222308388
A330386448
C3334485211
A4405265812
C4445886614
A5506667216
C5557288017

At each completion instant, whichever pending process (A-type or C-type) has the smaller arrival time is dispatched next, since it has been sitting in the ready queue longer.

Step 4: Compute average waiting time. Sum of waiting times \(= 0+5+4+8+8+11+12+14+16+17 = 95\) seconds.

\[ \text{Average waiting time} = \frac{95}{10} = 9.5 \text{ seconds} \]

Final Answer: \(\boxed{9.5}\) seconds

Was this answer helpful?
0
0

Top GATE CS Computer Science and IT Engineering Questions

View More Questions