Question
REQUIRED ALGORITHMS: In this assignment, you will write a program using C++ The following Algorithm First-Come First-Served (FCFS) Input: The inputs to your program will
REQUIRED ALGORITHMS:
In this assignment, you will write a program using C++
The following Algorithm
First-Come First-Served (FCFS)
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:
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 12Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started