Consider the set of 5 processes whose burst times are given below Process Burst time Id P1 P2 P3 P4 P5 5 3 1 2 3

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Consider the set of 5 processes whose burst times are given below:

| Process Id | Burst time |
|------------|------------|
| P1         | 5          |
| P2         | 3          |
| P3         | 1          |
| P4         | 2          |
| P5         | 3          |

If the CPU scheduling policy is the Ideal Fair Scheduler algorithm with a time quantum of 5 units, calculate the average waiting time. Please explain.

### Explanation:

In the Ideal Fair Scheduler algorithm:

1. **Time Quantum (Q):** 5 units
2. **Process Burst Times:**
   - P1: 5 units
   - P2: 3 units
   - P3: 1 unit
   - P4: 2 units
   - P5: 3 units

Each process gets a maximum of 5 units of CPU time per round. Here, since all the processes require less than or equal to 5 units, each process completes in one round.

3. **Calculation of Waiting Time:**
   - P1 has no waiting time.
   - P2 needs to wait until P1 finishes (5 units), so waiting time = 5.
   - P3 needs to wait until P1 and P2 finish (5 + 3 units), so waiting time = 8.
   - P4 needs to wait until P1, P2, and P3 finish (5 + 3 + 1 units), so waiting time = 9.
   - P5 needs to wait until P1, P2, P3, and P4 finish (5 + 3 + 1 + 2 units), so waiting time = 11.

4. **Average Waiting Time:**
   - \( \text{Average Waiting Time} = \frac{(0 + 5 + 8 + 9 + 11)}{5} = \frac{33}{5} = 6.6 \)

The average waiting time for these processes under the Ideal Fair Scheduler algorithm with a time quantum of 5 units is 6.6 units.
Transcribed Image Text:Consider the set of 5 processes whose burst times are given below: | Process Id | Burst time | |------------|------------| | P1 | 5 | | P2 | 3 | | P3 | 1 | | P4 | 2 | | P5 | 3 | If the CPU scheduling policy is the Ideal Fair Scheduler algorithm with a time quantum of 5 units, calculate the average waiting time. Please explain. ### Explanation: In the Ideal Fair Scheduler algorithm: 1. **Time Quantum (Q):** 5 units 2. **Process Burst Times:** - P1: 5 units - P2: 3 units - P3: 1 unit - P4: 2 units - P5: 3 units Each process gets a maximum of 5 units of CPU time per round. Here, since all the processes require less than or equal to 5 units, each process completes in one round. 3. **Calculation of Waiting Time:** - P1 has no waiting time. - P2 needs to wait until P1 finishes (5 units), so waiting time = 5. - P3 needs to wait until P1 and P2 finish (5 + 3 units), so waiting time = 8. - P4 needs to wait until P1, P2, and P3 finish (5 + 3 + 1 units), so waiting time = 9. - P5 needs to wait until P1, P2, P3, and P4 finish (5 + 3 + 1 + 2 units), so waiting time = 11. 4. **Average Waiting Time:** - \( \text{Average Waiting Time} = \frac{(0 + 5 + 8 + 9 + 11)}{5} = \frac{33}{5} = 6.6 \) The average waiting time for these processes under the Ideal Fair Scheduler algorithm with a time quantum of 5 units is 6.6 units.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Parallel and Distributed Storage
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education