Question: WRITE IN C OR C + + . Assignment # 1 : Process Scheduling Due on Wednesday, September 1 8 , 2 0 2 4

WRITE IN C OR C++.
Assignment #1: Process Scheduling
Due on Wednesday, September 18,2024, at 11:59:59 PM
ObJeCTIVE
This assignment will introduce you to process scheduling.
SPECIFICATIONS
You are to simulate the execution of a stream of
interactive processes by a time-shared system with a very
large RAM, a multi-core processor, and an SSD.
For simulation purposes, we will assume that each
process consists of a fixed number of process steps known
a priori and will be executed sequentially in the order
specified.
Input Format: Your program should read its input from
stdin (C++ cin) and use input redirection as in:
$ assignment1 input1.txt
This input will look like:
Each process will execute each of its computing steps
one by one and in the specified order. In addition, all
process start times will increase monotonically.
CPU Allocation: Your program should maintain two
separate ready queues, namely
A high-priority queue for new processes and
processes that have completed a USER request,
and
A low-priority queue for processes having
completed an SSD request.
Both queues should use First-Come First-Served (FCFS)
policy. When a busy CPU becomes available and
processes are waiting, the scheduler should look first for
processes in the high-priority queue and only pick a
process from the low-priority queue when the high-
priority queue is empty.
SSD requests: Your program should maintain a single
FCFS queue for all processes accessing the SSD.
USER requests: We will assume that each user runs a
single interactive process at a time. As a result, USER
requests will never be queued.
Memory Allocation: We assume the system memory is
large enough to contain all processes.
Required Outputs: Each time a process terminates, your
program should output a short report with:
The total simulated time elapsed;
The start time of the terminating process, the
number of milliseconds of processor time it has
used since it started, as well as the number of
SSD accesses and USER interactions it
performed;
For each process in main memory and the process
that has just terminated, one line with the
sequence number of the process, and its current
status (READY, RUNNING, BLOCKED, or
TERMINATED);
Error recovery: Your program can assume that its inputs
will always be correct.
IMPLEMENTATION
Your program must start with a block of comments
containing your name, the course number, and so on. It
should contain functions and these functions should have
arguments.
One process table should contain all processes loaded
into the main memory and not yet terminated. This table
should be used to keep track of process statuses and
should be distinct from the data structure(s) that you might
use to store your input data.
Since you are to focus on the scheduling actions taken
by the system you are simulating, your program will only
have to act when a process starts or completes a
computational step.
Whenever two or more of these events occur at the
same time, your program should process first the CPU
step completion(s), then the SSD access completion, then
the user interaction completion, and finally the process
arrival.
All times should be simulated.
If possible, please submit your assignment in a single
file named either FirstName_LastName_1.c or
FirstName_LastName_1.cpp.
WRITE IN C OR C + + . Assignment # 1 : Process

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!