--------------------------------------- fcfs ----------------------------- Average waiting time : 23.20 units Average turnaround time : 40492.60 units Time all processes finished : 68571 Average CPU utilization : 78.9% Number of context switches : 0 PID(s) of last process(es) to finish : 28 ---------------------------------------- rr q=2 -------------------------- Average waiting time : 20.43 units Average turnaround time : 40489.83 units Time all processes finished : 68554 Average CPU utilization : 78.9% Number of context switches : 22674 PID(s) of last process(es) to finish : 28 ---------------------------------------- rr q=12 ------------------------- Average waiting time : 22.70 units Average turnaround time : 40492.10 units Time all processes finished : 68563 Average CPU utilization : 78.9% Number of context switches : 2408 PID(s) of last process(es) to finish : 28 ---------------------------------------- rr q=50 ------------------------- Average waiting time : 23.93 units Average turnaround time : 40493.33 units Time all processes finished : 68560 Average CPU utilization : 78.9% Number of context switches : 285 PID(s) of last process(es) to finish : 28 -------------------------------------- fbq q1=10 q=30 -------------------- Average waiting time : 15.63 units Average turnaround time : 40485.03 units Time all processes finished : 68539 Average CPU utilization : 78.9% Number of context switches : 1402 PID(s) of last process(es) to finish : 28 --------------------------------------------------------------------------- (NOTE: Small variation from some of the above numbers is tolerable.) Some hints: 1. Use the provided helper functions to load all process info to a large struct array. 2. Maintain some key data structures, such as Ready Queue, CPUs, I/O Waiting Queue. You can use the provided linked-list based queue management functions. 3. Simulate a time clock ticking from t=0 ms until all processes are done. For each time t, you should go through all process information to decide how to update the above key data structures, e.g. whether you need to switch CPU, and how to switch? and so on: 3.1) whether a new process arrives? 3.2) whether a process finish its current CPU burst? 3.3) whether a process finish all its CPU burst? 3.4) whether any process just finishes the current I/O burst and needs to come back to Ready Q .... Update info for all processes; Based on the updated info in ReadyQ and CPU and the specific scheduling algorithm, you decide: which process goes to CPU and whether it needs a context switch and so on.