Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

REQUIRED ALGORITHMS: In this assignment, you will write a program using C++ The following Algorithm Round Robin (RR) with time quantum = 4 ms Input:

REQUIRED ALGORITHMS:

In this assignment, you will write a program using C++

The following Algorithm

Round Robin (RR) with time quantum = 4 ms

Input:

The inputs to your program will be as follows:

Ask the user to enter the input file name where we can find the input information about

jobs.

The input file will contain the Arrival time and CPU Cycle for each job. Your file will look

like the following example:

image text in transcribed

The first line in this file represents the number of processes. Each line of the next lines

represents one process. Each process is represented by three values:

Job ID

Arrival time

CPU Cycle time

For example, in the above example, we have five jobs.

The first job in this example has an ID=1, Arrival time=3, and CPU Cycles is 10.

Output:

Turnaround time for each job

Waiting time for each job

Average turnaround time

Average waiting time

Additional Requirements:

You need to add the following features to your simulation:

Your program can ask if we need to consider the context switching time or not in our

simulation. It will be 0.1 ms (if it will be considered).

Your program can also ask the user to enter the quantum (in ms) for the RR (it will not be

fixed).

Please use comments, with explanations!!

Oom 5 9 12

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions