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
829 views
in Computer by (85.3k points)
closed by

Consider the set of processes with arrival time (in milliseconds). CPU burst time (in milliseconds), and priority (0 is the highest priority) shown below. None of the processes have I/O burst time

Process

Arrival Time

Burst Time

Priority

P1

0

11

2

P2

5

28

0

P3

12

2

3

P4

2

10

1

P5

9

16

4


The average waiting time (in milliseconds) of all the processes using pre-emptive priority scheduling algorithm is ______.

1 Answer

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

Gantt chart:

P1

P4

P2

P4

P1

P3

P5

0             2              5             33            40            49            51            67

Process Table:

Process

Arrival Time

Burst Time

Priority

Completion time (CT)

Turnaround time (TAT)

TAT= CT – AT

Waiting time (WT)

WT = TAT-BT

P1

0

11

2

49

49

38

P2

5

28

0

33

28

0

P3

12

2

3

51

39

37

P4

2

10

1

40

38

28

P5

9

16

4

67

58

42

 

Average waiting time = \(\frac{{\sum waiting\;time\;of\;all\;the\;processes}}{{number\;of\;processes}}\)

\(= \frac{{38 + 0 + 37 + 28 + 42}}{5} = 29\rm \;milliseconds\;\)

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

...