Calculate the average waiting time, Operating System

Assignment Help:

Calculate the Average Waiting Time

CPU burst time points out the time, the process needs the CPU. The subsequent are the set of processes with their respective CPU burst time (in milliseconds).  

                  Processes                CPU-burst time

                  P1                                     10                      

                  P2                                       5

                  P3                                       5            

Calculate or find out the average waiting time if the process arrived in the subsequent order:

                (i) P1, P2 & P3                                 (ii) P2, P3 & P1

Ans:  consider FCFS scheduling   

Process                              Burst Time 

P1                                      10

P2                                       5

P3                                       5 

(i) Assume that the processes arrive in the order: P1 , P2 , P3  

The Gantt Chart for the schedule is as follow:

1721_Calculate the Average Waiting Time.png

Waiting time for P1 = 0; P2 = 10; P3 = 15

Average waiting time:  (0 + 10 + 15)/3 = 8.33 unit of time

(ii)Assume that the processes arrive in the order P2, P3, P1.

The Gantt chart for the schedule is as follow: 

2376_Calculate the Average Waiting Time 1.png

Waiting time for P1 = 10; P2 = 0; P3 = 5

Average waiting time:   (10 + 0 + 5)/3 = 5 unit of time.


Related Discussions:- Calculate the average waiting time

Explain doscreatethread functions used in the os/2, Explain DosCreateThread...

Explain DosCreateThread Functions Used in the OS/2  DosCreateThread(&threadID,MyThreadFunction,arg,flags,stackSize) DosCreateThread creates a thread within the context of th

Explain memory management using buddy sustem, MEMORY MANAGEMENT USING BUDDY...

MEMORY MANAGEMENT USING BUDDY SUSTEM Here we are dividing the memory as powers of two as well as we are selecting the space which is smallest but large enough to hold a process

Mutual exclusion variable, Since each thread has its own processing space t...

Since each thread has its own processing space therefore communication between threads will need to be done through a common global variable. Since multiple threads can access the

Computer organisation, basic advantage of using interrupt initiated data tr...

basic advantage of using interrupt initiated data transfer over transfer under program control without an interrupt

Paging, what is the use of valid invalid bits in paging

what is the use of valid invalid bits in paging

Why we need to use a while statement when using wait method, Q. The wait()...

Q. The wait() statement in every Java program examples was part of a while loop. Describe why you would always need to use a while statement when using wait() and why you would ne

General graph directory system in shell sort, we need an information about ...

we need an information about the different graph directory systems in detail by using shell sort . we also application part of directory systems in practical life. please help us i

Explain worst fit algorithm, Worst Fit Algorithm Here we obtain the la...

Worst Fit Algorithm Here we obtain the largest space available for the smallest. Therefore after that process entered there will be much more space remaining. In this space we

What are turnaround time and response time, What are turnaround time and re...

What are turnaround time and response time? Turnaround time is the interval among the submission of a job and its completion. Response time is the interval among submission

What is busy waiting?, What is busy waiting? When strict alteration is ...

What is busy waiting? When strict alteration is done there may take place situation like two processes setting their flag as true. Therefore both of the processes have equal pr

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd