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
The general idea of a producer-consumer architecture is related to building a pipeline of threads, similar to the web spider from Project 2. Each step of the processing will now be

Problem: (a) Discuss Distributed File System Caching. (Your discussion should include the goal and architecture of distributed file system caching and the various possible c

Since most of the programs require a lot of memory allocation/deallocation, we expect the memory management to be fast, to have low fragmentation, make good use of locality, and be

Q. Suppose that you want to utilize a paging algorithm that requires a reference bit (such as second-chance replacement or working-set model) however the hardware does not provide

Q. Compare the utilization of networking sockets with the use of shared memory as a mechanism for communicating data between processes on a single computer. What are the merits of

List the various file attributes. A file has particular other attributes, which vary from one operating system to another, but typically having of these:  Name, identifier, typ

What are the typical elements of a process image? User data: Modifiable part of user space. May have program data, user stack area, and programs that might be modified. User

Paging: Only the needed memory pages are moved to main memory from the swap machine for execution. Process size does not matter. Produce the concept of the virtual memory. It


Q. Why do some systems stay track of the type of a file while others leave it to the user or simply don't implement multiple file types? Which system is "better?" Answer: A f