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
List five services provided by an operating system. Explain how each provides convenience to the users. Explain also in which cases it would be impossible for user-level programs t

Consider the following C program where M, N, K are predefined constants. Assume int is 4 bytes. Suppose this program is run on a machine with 4KB page size and 32 TLB entries. Init

Define deadlock avoidance. An alternative method for avoiding deadlocks is to need additional information about how resources are to be requested. Every request requires the sy

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4 Provide two programm

. Nested Macro calls are expanded using the

Q. Why do several systems store the operating system in firm ware and others on disk? Answer: For certain devices such like handheld PDAs and cellular telephones a disk with

What are the advantages of Indexed allocation? The benefits are a. No external-fragmentation problem b. Solves the size-declaration problems. c. Supports direct access

What are the different types of semaphore? Principally the semaphore is able to be classified into two on the basis of their values a)      Counting semaphore: In counting s

Regard as a computer system that runs 5000 jobs per month with no deadlock-prevention or deadlock-avoidance scheme. Deadlocks take place about twice per month and the operator must