Consider the following set of processes :Process Priority Burst ArrivalP1 3 24 0P2 1 30P3 2 30The waiting time of all processes using the RR scheduling algorithms with quantum = 3 is:A.30B.6C.24D.12
Question
Consider the following set of processes :Process Priority Burst ArrivalP1 3 24 0P2 1 30P3 2 30The waiting time of all processes using the RR scheduling algorithms with quantum = 3 is:A.30B.6C.24D.12
Solution
To solve this problem, we need to use the Round Robin (RR) scheduling algorithm. The RR algorithm is a pre-emptive algorithm where each process is provided a fixed time slot or quantum.
Given:
- Quantum = 3
- Process P1: Priority 3, Burst 24, Arrival 0
- Process P2: Priority 1, Burst 30
- Process P3: Priority 2, Burst 30
Step 1: Arrange the processes according to their arrival time. Here, all processes arrive at the same time, so we can start with the process with the highest priority, which is P2.
Step 2: Execute each process for a time period equal to the quantum. If the burst time of a process is less than the quantum, then the process will be completed in less than the quantum time. If the burst time of a process is more than the quantum, then the process will be executed for quantum time and will be put back into the ready queue.
Step 3: Calculate the waiting time for each process. The waiting time is the total time the process spends in the ready queue.
Here is the execution order and waiting time calculation:
- P2 runs for 3 units (waiting time
Similar Questions
Consider the following set of processes :Process Priority Burst ArrivalP1 3 24 0P2 1 30P3 2 30The waiting time of all processes using the RR scheduling algorithms with quantum = 3 is:A.30B.6C.24D.12
Consider the following set of processes, with the length of the CPU burstgiven in milliseconds:Process Burst Time PriorityP1 2 2P2 1 1P3 8 4P4 4 2P5 5 3The 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 thefollowing scheduling algorithms: FCFS, SJF, nonpreemptive priority (a larger prioritynumber implies a higher priority), and RR (quantum = 2).b. What is the turnaround time of each process for each of the schedulingalgorithms in part a?c. What is the waiting time of each process for each of these scheduling algorithms?d. Which of the algorithms results in the minimum average waiting time (over allprocesses)?
Q5. Consider the set of 6 processes whose arrival time and burst time are given below-Arrival time Burst timeP1 0 6P2 1 7P3 2 8P4 3 10P5 4 3P6 5 4If the CPU scheduling policy is Round Robin with time quantum = 3, calculate the average waiting time andaverage turnaround time. For the given scheduling Algorithm (a) FCFS (b) SJF (c) SRTF
Consider the following set of processes, with the length of the CPU burst given in milliseconds:Process Burst Time PriorityP1 2 2P2 1 1P3 3 4P4 4 2The processes are assumed to have arrived in the order P1, P2, P3, P4, P5,all at time 0. What is the turnaround time of each process for the nonpreemptive Priority scheduling algorithms (a larger priority number implies a higher priority)?A.5, 10, 3, 9B.2, 3, 6, 10C.3, 1, 6, 10D.2, 3, 8, 10
Consider Five Processes P1 to P5 arrived at same time. They have stimated runningtime 10,2,6,8 and 4 seconds, respectively. Their Priorities are 3,2,5,4 and 1,respectively with 5 being highest Priority. Find the average turnaround time andaverage waiting time for Round- Robin(q=3) and Priority Schedulingalgorithm.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.