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

SJF and Priority Question 2

SJF and Priority Questions 2 This section provides additional practice questions related to the Shortest Job First (SJF) and Priority scheduling algorithms. The questions may involve more complex scenarios, such as preemptive scheduling, multiple priority levels, or varying arrival times. By solving these questions, you will further enhance your understanding of SJF and Priority scheduling and their applications in process management.

Uploaded by

luckyshinde2000
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)
39 views2 pages

SJF and Priority Question 2

SJF and Priority Questions 2 This section provides additional practice questions related to the Shortest Job First (SJF) and Priority scheduling algorithms. The questions may involve more complex scenarios, such as preemptive scheduling, multiple priority levels, or varying arrival times. By solving these questions, you will further enhance your understanding of SJF and Priority scheduling and their applications in process management.

Uploaded by

luckyshinde2000
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

SJF (Shortest Job First) Solved Example

Process Burst Time Waiting Time Turnaround Time


P1 21 11 32
P2 3 2 5
P3 6 5 11
P4 2 0 2

P4 P2 P3 P1
0 2 5 11 32

Avg waiting time = 11+2+5+0/4 =4.5 ms

Avg Turnaround Time= 32+5+11+2/4 = 12.5 ms

SJF (Shortest Job First) To be Solve:

Process Burst Time Waiting Time Turnaround Time


P1 6
P2 3
P3 8
P4 3
P5 4

Priority Scheduling Solved Example (1 Highest-5 lowest)

Process Burst Time Priority Waiting Turnaround


Time Time
P1 10 3 6 16
P2 1 1 0 1
P3 2 4 16 18
P4 1 5 18 19
P5 5 2 1 6

P2 P5 P1 P3 P4
0 1 6 16 18 19

Average waiting time = 6+0+16+18+1 /5 =8.2 ms

Average Turnaround Time= 16+1+18+19+6 /5 =12 ms


Priority Scheduling To be Solve (5 Highest-1 lowest)

Process Burst Time Priority Waiting Turnaround


Time Time
P1 8 1
P2 10 4
P3 5 5
P4 9 4
P5 2 2

Average waiting time =

Average Turnaround Time=

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