Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
448 views
in Computer by (108k points)
closed by

An operating system uses shortest remaining time first scheduling algorithm for pre-emptive scheduling of processes. Consider the following set of processes with their arrival times and CPU burst times (in milliseconds):

Process

Arrival Time

Burst Time

P1

0

12

P2

2

4

P3

3

6

P4

8

5


The average waiting time (in milliseconds) of the process is _____

1 Answer

0 votes
by (101k points)
selected by
 
Best answer

Gantt chart:

Process

P1

P2

P2

P3

P3

P4

P1

Time(AT to CT )

0 to 2

2 to 3

3 to 6

6 to 8

8 to 12

12 to 17

17 to 27


Calculating average waiting time:

Process

Arrival time (AT)

Burst Time (BT)

Completion time (CT)

Turnaround time (TAT)

Waiting Time (WT)

P1

0

12

27

27

15

P2

2

4

6

4

0

P3

3

6

12

9

3

P4

8

5

17

11

4

 

Average waiting time \(= \frac{{15\; + \;0\; +\; 3\; + \;4}}{4} = \frac{{22}}{4} = 5.5\)

Hence 5.5 is the correct answer.

Important Point:

TAT = CT – AT

WT = TAT – BT

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...