Complete the code to identify the scheduling algorithm that executes processes in the order they arrive.
algorithm = "[1]"
FCFS stands for First Come First Served, which means processes are executed in the order they arrive.
Complete the code to calculate the waiting time for the first process in FCFS scheduling.
waiting_time[0] = [1]
The first process in FCFS does not wait, so its waiting time is zero.
Fix the error in the code to compute the waiting time for process i in FCFS scheduling.
waiting_time[i] = completion_time[i-1] [1] arrival_time[i]
Waiting time is calculated by subtracting the arrival time of the current process from the completion time of the previous process.
Fill both blanks to compute the completion time for process i in FCFS scheduling.
completion_time[i] = completion_time[i-1] [1] burst_time[i] [2] 0
The completion time is the sum of the previous completion time and the current burst time if the previous completion time is greater than zero.
Fill all three blanks to create a dictionary comprehension that maps each process to its waiting time if waiting time is positive.
waiting_times = [1]: [2] for [3] in processes if waiting_time[process] > 0
This dictionary comprehension creates a mapping from each process to its waiting time, but only includes processes with positive waiting times.