Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A set of processes (lets say n of them, denoted by P1,P2,,Pn ) is sent to a CPU. The processes arrive in the order given,

image text in transcribed

A set of processes (lets say n of them, denoted by P1,P2,,Pn ) is sent to a CPU. The processes arrive in the order given, at times t=0,t=1,t=n. The duration (in seconds) of these processes is given ( d1, d2,.dn ). Write a PYTHON program which reads in these durations as input data from the user, and which calculates (a) the average waiting time and (b) the average turnaround time for the processes. These two numbers should be calculated for the scheduling policies of 1. Shortest Job First 2. Round Robin (with CPU slices of 5 seconds) Test your program on the process durations [5,12,1,6,7,6,4,10,12] and [2,9,11,3,4,2,11,1,5,10] and report the results in both cases for the times (a) and (b) above (submit these results in BB when uploading your program)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

What is the environment we are trying to create?

Answered: 1 week ago

Question

How would we like to see ourselves?

Answered: 1 week ago

Question

How can we visually describe our goals?

Answered: 1 week ago