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
We are faced with three major components of the page-fault service time. 1. Service the page-fault interrupts. 2. Read in the page. 3. Restart the processes.

Define FIFO Page Replacement Algorithm This policy simply eliminates pages in the order they arrived in the main memory. By using this policy we simply remove a page based upo

Medium term scheduling This is component of the swapping function. Usually the swapping in decision is based on the need to manage the degree of multiprogramming. At a system t

what is the meaning of co-operating process?

explain hierarchical,hashed and inverted paging

Device Drivers Communicates straight with peripheral devices (disks, tapes, etc.). Responsible for begin physical I/O operations on the device. Pro

Question 1 Explain single Partition Allocation and Multiple Partition Question 2 What is PCB? What useful information is available in PCB? Question 3 Explain Preemptive and No

Q. Which of the subsequent instructions should be privileged? a) Read the clock b) Clear memory c) Set value of timer d) Issue a trap instruction e) Turn off interr

Define a state which is not a fundamental process state Answer: Blocked state is not a fundamental process state

Define secondary memory. This memory holds those pages that are not there in main memory. The secondary memory is usually a high speed disk. It is called as the swap device, an