Question: Write a C++ Program for FCFS CPU Scheduling algorithm with the following considerations, Output Example shows: Current Time: 0 Next process on the CPU:: P1
Write a C++ Program for FCFS CPU Scheduling algorithm with the following considerations,

Output Example shows:
Current Time: 0
Next process on the CPU:: P1
..................................................
List of processes in the ready queue:
Process Burst
P2 16
P3 8
P4 3
P5 4
P6 11
P7 14
P8 4
P9 3
..................................................
List of processes in I/O:
Process Remaining I/O time
[empty]
Current Time: 4
Next process on the CPU:: P2
..................................................
List of processes in the ready queue:
Process Burst
P3 8
P4 3
P5 4
P6 11
P7 14
P8 4
P9 3
..................................................
List of processes in I/O:
Process Remaining I/O time
P4 27
::::::::::::::::::::::::::::::::::::::::::::::::::
Assumptions 1. All processes are activated at time 0 2. Assume that no process waits on IO devices. 3. After completing an I/O event, a process is transferred to the ready queue. 4. Waiting time is accumulated while a process waits in the ready queue. 5. Turnaround time is a total of (Waiting time) (CPU burst time) + (I/O time) 6. Response time is the first measure of waiting time from arrival at time 0 until the first time on the CPU Process Data: process goes (CPU burst, LO time, CPU burst, LO time, CPU burst, LO time,., ast CPU burst) P1 4, 27, 3, 31, 2, 43, 4, 18, 4, 22, 4, 26, 3, 24, 4 J P2 116, 24, 17, 21, 5, 36, 16, 26, 7, 31, 13, 28, 11, 21, 6, 13, 3, 11, 4 ) P3 (8, 33, 12, 41, 18, 65, 14, 21, 4, 61, 15, 18, 14, 26, 5, 31, 6 ) P4 3, 35, 4, 41, 4, 45, 3, 51, 4, 61, 3, 54, 6, 82, 5, 77, 3 ) P5 14, 48, 5, 44, 7, 42, 12, 37, 9, 46, 4, 41, 9, 31, 7, 43, 8 P6 111, 22, 4, 8, 5, 10, 6, 12, 7, 14, 9, 18, 12, 24, 15, 30, 8 ) P7 14, 46, 17, 41, 11, 42, 15, 21, 4, 32, 7, 19, 16, 33, 10 P8 (4, 14, 5, 33, 6, 51, 14, 63, 16, 87, 6, 74, 7 P9 (3, 37, 9, 41, 8, 30, 4, 29, 7, 33, 5, 22, 4, 24, 5, 29, 16 )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
