Topic: Operating Systems
For the following list of processes, the average turnaround time and average waiting time using FCFS algorithm is:
Process | Arrival Time (ms) | Execution Time (ms)
P1 | 6 | 24
P2 | 0 | 3
P3 | 3 | 3
- A. Average Turnaround time 30 ms and Average Waiting Time 4.5 ms
- B. Average Turnaround time 13 ms and Average Waiting Time 3 ms
- C. Average Turnaround time 10 ms and Average Waiting Time 0 ms
- D. Average Turnaround time 24 ms and Average Waiting Time 0 ms
Answer: C. Average Turnaround time 10 ms and Average Waiting Time 0 ms
Explanation: Using First-Come, First-Served (FCFS) scheduling:
- P2 arrives at 0, executes for 3ms, finishes at 3. (Wait = 0, Turnaround = 3-0=3)
- P3 arrives at 3, executes for 3ms, finishes at 6. (Wait = 3-3=0, Turnaround = 6-3=3)
- P1 arrives at 6, executes for 24ms, finishes at 30. (Wait = 6-6=0, Turnaround = 30-6=24)
Average Turnaround Time = (3 + 3 + 24) / 3 = 30 / 3 = 10 ms.
Average Waiting Time = (0 + 0 + 0) / 3 = 0 ms.