Calculate the average waiting time, Operating System

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.

Posted Date: 5/13/2013 2:07:14 AM | Location : United States

Related Discussions:- Calculate the average waiting time, Assignment Help, Ask Question on Calculate the average waiting time, Get Answer, Expert's Help, Calculate the average waiting time Discussions

Write discussion on Calculate the average waiting time
Your posts are moderated
Related Questions
How is it different from the unbounded buffer algorithm ? Explain.

What is the MFD? UFD? How are they related? MFD is master-file directory, which points to the UFDs. UFD is user-file directory, which points to each of user's files.

how to move the system app to usb storage

Explain multilevel feedback queue in detail A process can move among the various queues; aging can be executed this way Multilevel-feedback-queue scheduler explained b

Explain briefly the working of semaphore with example ? The E.W. Dijkstra (1965) abstracted the key idea of mutual exclusion in his concepts of semaphores. Definition A s

what is deadlock

Acyclic-graph directories An acyclic graph permits directories to have shared subdirectories and files. The similar file or subdirectory may be in two dissimilar directories. A

What are the benefits of thread pools:- The benefits of thread pools are 1. It is usually faster to service a request with an existing thread than waiting to make a thread.

Q. What are the advantages as well as disadvantages of using circuit switching? For what types of applications is circuit switching a viable strategy? Answer: Circuit

Consider a scenario of post mailbox, there are two processes named sender S and receiver R. Both processes can communicate with each other by name along with message. You need to I