Question: Java Help 1 . You need to read the CPU Burst Time of processes for your scheduling algorithms from the keyboard as follows: Please enter
Java Help
1. You need to read the CPU Burst Time of processes for your scheduling algorithms from the keyboard as follows:
Please enter the CPU Burst Time for Process #1 (-1 to exit): 10
Please enter the CPU Burst Time for Process #2 (-1 to exit): 29
Please enter the CPU Burst Time for Process #3 (-1 to exit): 3
Please enter the CPU Burst Time for Process #4 (-1 to exit): 7
Please enter the CPU Burst Time for Process #5 (-1 to exit): 12
Please enter the CPU Burst Time for Process #6 (-1 to exit): -1
2. Your program (scheduler.java) should support these options: FCFS, SJF, Exit. Which scheduling algorithm would you like to use? (FCFS, SJF, Exit): FCFS
Implement FCFS and report sequence of execution (begin time and end time for each process CPU burst), average waiting time and average turnaround time.
========================================== FCFS SCHEDULING ALGORITHM: ==========================================
PID Start Burst End Burst
1 0 10
2 10 39
3 39 42
4 42 49
5 49 81 Average waiting time: 28.00
Average turnaround time: 40.20 ==========================================
Which scheduling algorithm would you like to use? (FCFS, SJF, Exit): Exit
4. Implement SJF (non-preemptive) and report sequence of execution (begin time and end time for each process CPU burst), average waiting time and average turnaround time.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
