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

Define lazy swapper, Define lazy swapper. Rather than swapping the enti...

Define lazy swapper. Rather than swapping the entire process into main memory, a lazy swapper is used. A lazy swapper never swaps a page into memory unless that page will be ne

What are the requirements for a swapper to work, The swapper work s on t...

The swapper work s on the biggest scheduling priority. Initially it will look for any sleeping process, if not get then it will see for the ready-to-run process for swapping. Bu

Why is rotational optimization no longer consequently useful, UNIX systems ...

UNIX systems utilized to use disk-layout optimizations based on the rotation position of disk data however modern implementations including Linux simply optimize for sequential dat

Kernel to context switch between kernel level threads, Q. Explain the actio...

Q. Explain the actions taken by a kernel to context switch between kernel level threads. Answer: Context switching among kernel threads classically requires saving the value

Major differences between capability lists and access lists, Q. What are th...

Q. What are the major differences between capability lists and access lists? Answer: An access list is a list for each object consisting of the domains with a nonempty set of

DOS, Ask question #Minimum 500 words accepted#

Ask question #Minimum 500 words accepted#

Write a short note on memory management, Write a short note on Memory manag...

Write a short note on Memory management. Memory management includes reallocating and allocating the memory space. The kinds of allocation of memory FIXED PARTITIONING

What happens when you high-level format a floppy disk, Question: a. The...

Question: a. The following questions refer to a generic Windows file system: i) Describe what happens when you high-level format a floppy disk? ii) What is the maximum size

Explain signal handling, Signal handling A signal is used in UNIX syste...

Signal handling A signal is used in UNIX systems to inform a process that a particular event has occurred. 1. A signal is produced by the occurrence of a particular event.

Processes and threads, Processes and threads each have their place in multi...

Processes and threads each have their place in multi-programming, generally to hide latency and to maximize CPU utilization. With the continuing spread of multi-core processors in

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