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

Example of semaphore, For example, by initializing a semaphore to 0, thread...

For example, by initializing a semaphore to 0, threads can wait for an event to occur, and impose an ordering constraint, similar to a monitor using condition variables, but with m

What is an operating system and its type, What is an operating system and w...

What is an operating system and what are the different types of operating systems? Operating System An Operating System or OS is a software program that allows the compute

Merits of device controller in the kernel, Q. State three merits of placing...

Q. State three merits of placing functionality in a device controller rather than in the kernel and State three disadvantages. Answer: Three advantages: Bugs are less probabl

What is a file, Question 1 What is a file? Write down the operations on fi...

Question 1 What is a file? Write down the operations on files Question 2 What do you mean virtual machine? Write down the application of virtual machine Question 3 What

Identifying parallelism, Identifying parallelism A formal way to identi...

Identifying parallelism A formal way to identify parallelism in an activity is to draw a task dependence graph in a directed graph in which each vertex represents a task to

What is cold backup, Cold Backup: It is copying the three groups of files...

Cold Backup: It is copying the three groups of files when the object is shut down. This is a straight file copy, generally from the storage disk directly to tape. You must end th

Convert the hex to binary, Convert the following from hex to binary and dra...

Convert the following from hex to binary and draw it on the memory map.     RAM    = 0000 -> 00FF     EPROM = FF00  -> FFFF Answer:   0000  0000 0000  0000 (0)    RAM sta

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