Question: bjective This assignment will introduce you to process scheduling. SPECIfications You are to simulate the execution of a stream of interactive processes by a time

bjective
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
1. A high-priority queue for new processes and processes that have completed a USER request, and
2. 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 highpriority 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:
1. The total simulated time elapsed;
2. 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;
3. 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.
bjective This assignment will introduce you to

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!