GATE / CS ARCHIVE

GATE CSE 2026 SET 1 / QUESTION 64

FCFS waiting times in arrival order

Operating Systems · CPU Scheduling · Full GATE CSE 2026 Set 1 paper

GATE 2026 Set 1, Q64 2 marks · NAT
Report issue

CPU Scheduling

Question 64, GATE 2026: Actuator processes A require 6 CPU seconds and arrive at times 10,20,30,40,50. Controller processes C require 8 seconds and arrive at 11,22,33,44,55. FCFS scheduling is nonpreemptive and the first A starts at 10. Find the average waiting time of all ten processes to one decimal place.
Tap to enlarge
Answer & solution

Official answer: 9.5

Step through it (19 steps)

Givens and goal

Actuator processes A require 6 CPU seconds and arrive at times 10,20,30,40,50. Controller processes C require 8 seconds and arrive at 11,22,33,44,55. FCFS scheduling is nonpreemptive and the first A starts at 10. Find the average waiting time of all ten processes to one decimal place.

Approach

Merge arrivals chronologically and use start=max(arrival, previous finish), wait=start−arrival for each row.

Step-by-step solution

1. The chronological order is A1,C1,A2,C2,A3,C3,A4,C4,A5,C5. FCFS serves them in exactly this order, without preempting a current process when a new one arrives.
2. Compute starts and finishes sequentially. For A1, start=10, finish=16 and wait=0. C1 arrived at 11 but must wait until 16, so its wait is 5 and finish is 24. Continue the same recurrence:

    Process   Arrival   Burst   Start   Finish   Wait
    A1           10       6       10      16       0
    C1           11       8       16      24       5
    A2           20       6       24      30       4
    C2           22       8       30      38       8
    A3           30       6       38      44       8
    C3           33       8       44      52      11
    A4           40       6       52      58      12
    C4           44       8       58      66      14
    A5           50       6       66      72      16
    C5           55       8       72      80      17

3. Total waiting time is 0+5+4+8+8+11+12+14+16+17=95 seconds. Divide by ten processes to get 95/10=9.5 seconds.
4. Waiting time excludes the process’s own CPU burst. Using finish−arrival would give turnaround time instead. There is no idle gap after the first process starts: at each completion, the next process in the table has already arrived.

Original paper, page 46 · Answer key