1.
FCFS
P1 | P2 | P3 | P4 | P5 |
0---------------------10--------------------11--------------------13------------------14-------------------19
Average Waiting Time = (0+10+11+13+14)/5 = 9.6
2.
SJF
P2 | P4 | P3 | P5 | P1 |
0--------------------1----------------------2---------------------4---------------------9--------------------19
Average waiting time = (9+0+2+1+4)/5 = 3.2
3.
Priority
P2 | P5 | P1 | P3 | P4 |
0--------------------1---------------------6---------------------16---------------------18------------------19
Average waiting time = (6+0+16+18+1)/5 = 8.2
4.
Round Robin(quantum =1)
P1 | P2 | P3 | P4 | P5 | P1 | P3 | P5 | P1 | P5 | P1 | P5 | P1 | P5 | P1 | P1 | P1 | P1 | P1 |
0----1----2----3----4-----5-----6-----7----8----9----10---11---12---13---14---15---16---17---18--19
Average waiting time = (18+1+6+3+13)/5 = 8.2
The following processes P1, P2, P3, P4 and P5 arrive at the same time (t =...
QUESTION 1 Consider the following set of processes, with the length of the CPU burst time given in milliseconds: Process Burst Time Priority P1 7 5 P2 2 4 P3 11 3 P4 9 1 P5 5 3 The processes are assumed to have arrived in the order P1,P2, P3, P4, P5, all at time 0. a. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, nonpreemptive priority (a smaller priority number implies a higher priority), and RR (quantum = 2). b. What...
Table 1 shows the list of processes and burst time for each processesTable 1 ProcessBurst TimeP113P25P323P43P531P66P714 The processes are assumed to have arrived in the order of P1, P2, P3, P4, P5, P6 and P7 all at time 0. a) Calculate the average waiting time when each of the below scheduling algorithm is used. Assume that a quantum 8 is being used:i.) First Come, First Server (6 marks)ii.) Round Robin (6 marks)iii.) Shortest Job First, non preemptive (6 marks)
Please answer the following question in C++ language Consider the following set of processes, with the length of the CPU burst time given in milliseconds: Process Burst Time Priority P1. 7 5 P2 2 4 P3 11 3 P4 9 1 P5 5 3 The processes are assumed to have arrived in the order P1,P2, P3, P4, P5, all at time 0. a. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, nonpreemptive...
Given the following set of processes with corresponding execution times (in ms), arrival times and priority (1 – highest). For each scheduling algorithm: Construct a table showing which process is active and for how long until all processes are completely serviced (as done in class). Calculate the average waiting time and turnaround time. Process ID Burst (ms) Arrival time P1 9 0 P2 12 0 P3 3 0 P4 30 0 P5 20 0 P6 10 0 First Come First Serve...
4. Consider a ready queue with four processes :- Process Arrival Time Burst Time (ms) P1 Priority P2 P3 P4 P5 For each of the following CPU scheduling algorithms, determine the turnaround and average waiting time for each of the process :- a. Shortest remaining Time First b. Shortest Job First C. Priority Scheduling (Both pre-emptive and non-preemptive) d. Round Robin (quantum is 1 ms)
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: Process Burst Time Priority P1 10 3 P2 1 1 P3 2 3 P4 1 4 P5 5 2 The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0. a. Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF (SPN), a...
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:Processburst TimePriorityP1103P211P323P414P552For each of the scheduling algorithms, FCFS, Shortest-Job-First (SJF, non-preemptive), Priority (smaller priority number implies higher scheduling priority), and RR (quantum = 1) do the following.Draw a Gantt chart to show how these processes would be scheduled.Give the turnaround time (total time from the first arrival into ready state until CPU-burst is completed) of each process.Give the waiting time (total time spent in the Ready state) of each process.Give...
Five processes p1,p2,p3,p4,p5 arrive at time 0 simultaneously. their cpu burst are 12,6,5,6, and 8 respectively. 1.) Uses Shortest job first to calculate the waiting time of each process b.) calculate the average waiting time
Q.2] Answer the following questions Process Burst Time Priority P1 3 1 P2 8 3 P3 2 4 P4 4 5 P5 5 1 (21 points) Consider the set of processes shown in the table above, with the length of the CPU-burst time given in milliseconds. The processes are assumed to have arrived in the order P5, P4, P3, P2 , and P1, all approximately at time 0. Draw three Gantt charts illustrating the execution of these processes using SJF,...
Consider the following set of processes, with the length of the CPU burst given in milliseconds:ProcessBurst TimePriorityP1 54P231P312P472P543The processes are assumed to have arrived in the order P1 , P2 , P3 , P4 , P5 , all at time 0. a. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, nonpreemptive priority (a larger priority number implies a higher priority), and RR (quantum = 2). b. What is the turnaround time of each...