Which statement best describes how the FCFS (First Come First Served) scheduling algorithm works?
Think about the meaning of 'First Come First Served' in everyday life.
FCFS schedules processes in the order they arrive, running each to completion before moving to the next. It does not preempt running processes.
Given three processes with burst times 5, 3, and 8 milliseconds arriving in that order, what is the average waiting time using FCFS scheduling?
Calculate waiting time for each process and then find the average.
Waiting times: P1=0, P2=5, P3=8. Average = (0+5+8)/3 = 13/3 ≈ 4.33 ms, rounded to 4 ms.
Which of the following is a major disadvantage of FCFS compared to Shortest Job First (SJF) scheduling?
Consider how FCFS handles processes of different lengths arriving in sequence.
FCFS can lead to the 'convoy effect' where short processes wait behind long ones, increasing average waiting time compared to SJF.
Consider three processes arriving at times 0, 2, and 4 seconds with burst times 4, 3, and 1 seconds respectively. Using FCFS, what is the waiting time for the third process?
Calculate when the third process starts after the first two finish.
Process 1 runs from 0 to 4, process 2 from 4 to 7, so process 3 starts at 7. It arrived at 4, so waiting time = 7 - 4 = 3 seconds.
Which statement about starvation in FCFS scheduling is true?
Think about how FCFS treats all processes equally based on arrival time.
FCFS serves processes strictly in arrival order without preemption or priority, so starvation does not occur.