Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment 2 : CPU Scheduling. Compare the performance of the two CPU scheduling algorithms - SJF and RR . Description / Concept: A system snapshot

Assignment 2: CPU Scheduling. Compare the performance of the two CPU scheduling algorithms - SJF and RR.
Description/Concept:
A system snapshot contains N number of processes, each with unique integer ID and varied burst lengths
All the processes are assumed to appear/arrive at the same time on the system
Each scheduling algorithm generates an ordering according to which the processes would be executed
The scheduling algorithms calculate the ATT (average turnaround time)
Assignment
Write a program (in Java, C, or Python) simulating a simple CPU scheduler to evaluate, based on average turnaround time (ATT), the two CPU scheduling algorithms - Shortest Job First (SJF) and Round-robin (RR). Note: this program must not be an interactive program. That is, the program does not require any input from the user.
Write a generator for crating the snapshot of the system with 5 processes where each process has the following attributes:
i) an identifier (a unique random integer value between 0 and 9)
Note: the ID is unique; no two processes have the same ID value and must be within the specified range [0-9]
ii) a burst length (a random integer value between 20-99)
image text in transcribed

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

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions