wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes.

Process Execution time Arrival time
P1
P2
P3
P4
20
25
10
15
0
15
30
45

What is the total waiting time for process P2?



A
40
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
5
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
15
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
55
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C 15
Process Execution Time Arrival Time
P1 20 0
P2 25 15
P3 10 30
P4 15 45

The Gantt chart for SRT Scheduling algorithm is
P1 P2 P3 P2 P4
0 20 30 40 55 70
So the waiting time for

P2=(2015)+(4030)=5+10=15

flag
Suggest Corrections
thumbs-up
2
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Info, Info, and More Info
HISTORY
Watch in App
Join BYJU'S Learning Program
CrossIcon