Question 3 SO(2) (i) Write two scheduling criteria of CPU scheduling algorithms (ii) Consider the following 4 processes with their arrival times and burst times: Processes Arrival Time Burst Time P1 0 6 P2 1 4 P3 2 9 P4 3 5 a) Draw Gantt chart for process scheduling using short remaining time first (SRTF) scheduling algorithm b) Calculate the average waiting time
Added by Christian C.
Close
Step 1
Step 1: The processes are: P1: Arrival time = 0, Burst time = 6 P2: Arrival time = 1, Burst time = 4 P3: Arrival time = 2, Burst time = 9 P4: Arrival time = 3, Burst time = 5 Show more…
Show all steps
Your feedback will help us improve your experience
Madhur L and 59 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
CPU Scheduling: The table below describes the CPU-I/O Burst cycles for processes P1, P2, and P3. Assume the processes arrived in the order P1, P2, P3, all at time 0. Process | Priority | CPU Burst 1 | I/O Burst 1 | CPU Burst 2 | I/O Burst 2 | CPU Burst 3 --- | --- | --- | --- | --- | --- | --- P1 | 1 | 12 | 4 | 12 | - | - P2 | 1 | 2 | 10 | 2 | 12 | 3 P3 | 0 | 6 | 2 | 6 | - | - (a) Draw the Gantt chart timeline, illustrating the interleaving of processes, and calculate the average waiting time for each process under 1. a non-preemptive priority scheduling algorithm 2. a round-robin scheduling algorithm with a quantum = 4. (b) Should you increase the time quantum? Explain your answer.
Madhur L.
Let's assume your ID number is 012345678. It contains nine digits. Consider one extra digit and add this at the end of your ID number. For example, if you chose 9, then you have 10 digits. We have a system with five processes and among the above-mentioned ten digits, the first five digits are the arrival time and the last 5 digits are the Burst time. 0 1 2 3 4 5 6 7 8 9 Arrival time Burst Time Therefore, Processes P1 to P5 arrive at 0, 1, 2, 3, and 4 respectively for execution. P1 with burst time (BT) 5, P2 with BT 6, P3 with BT 7, P4 with BT 8, and P5 with BT 9. **If you got any burst time 0 then replace it with the digit 9. Now complete the following table with your own ID: Process Arrival Time Burst time P1 P2 P3 P4 P5 Draw Gantt charts that illustrate the execution of the processes using SRTF, and Round Robin (with time quantum: 2) scheduling algorithms and finally determine a suitable scheduling algorithm based on their average waiting time. Show the details of the calculation.
Akash M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD