0% found this document useful (0 votes)
7 views2 pages

Scheduling_Algorithms_Solutions

The document discusses various scheduling algorithms including FCFS, SJF, Priority Scheduling, and Round-Robin, providing Gantt charts for each. It calculates the Average Waiting Time (AWT) for each algorithm, with Round-Robin achieving the lowest AWT of 6 ms. The document emphasizes the effectiveness of the Round-Robin algorithm in minimizing waiting time.

Uploaded by

hafsatbashir04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Scheduling_Algorithms_Solutions

The document discusses various scheduling algorithms including FCFS, SJF, Priority Scheduling, and Round-Robin, providing Gantt charts for each. It calculates the Average Waiting Time (AWT) for each algorithm, with Round-Robin achieving the lowest AWT of 6 ms. The document emphasizes the effectiveness of the Round-Robin algorithm in minimizing waiting time.

Uploaded by

hafsatbashir04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Scheduling Algorithms and Solutions

Example 8: Scheduling with Multiple Algorithms

Given Data:

Process Burst Time (ms) Priority

P1 10 3

P2 1 1

P3 2 3

P4 1 4

P5 5 2

Part (a): Gantt Charts for Different Scheduling Algorithms

1. FCFS (First-Come, First-Served)

| Time | P1 | P2 | P3 | P4 | P5 |

|------|------|------|------|------|------|

|0 | 10 | 11 | 13 | 14 | 19 |

2. SJF (Shortest Job First)

| Time | P2 | P4 | P3 | P5 | P1 |

|------|------|------|------|------|------|

|0 |1 |2 |4 |9 | 19 |

3. Priority Scheduling (Non-Preemptive)

| Time | P2 | P5 | P1 | P3 | P4 |

|------|------|------|------|------|------|

|0 |1 |6 | 16 | 18 | 19 |

4. Round-Robin (RR) Scheduling


| Time | P1 | P2 | P3 | P4 | P5 | P1 | P3 | P1 | P5 | P1 |

|------|------|------|------|------|------|------|------|------|------|------|

|0 |1 |2 |3 |4 |5 |6 |7 |8 |9 | 10 |

Part (b): Turnaround Time (TAT)

Turnaround Time (TAT) = Completion Time - Arrival Time

Part (d): Average Waiting Time (AWT)

Average Waiting Time (AWT):- FCFS: 9.6 ms- SJF: 5.8 ms- Priority: 10.8 ms- RR: 6 ms

Conclusion: The Round-Robin (RR) algorithm has the minimum average waiting time of 6 ms.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy