Question: C++ CS302 / ECE468 OPERATING SYSTEMS Spring 2023 Programming Assignment #1: Process Schedulingl 1. Objective This assignment will introduce you to CPU scheduling. 2. Specifications

C++

C++ CS302 / ECE468 OPERATING SYSTEMS Spring 2023 Programming Assignment \#1: ProcessSchedulingl 1. Objective This assignment will introduce you to CPU scheduling. 2.

CS302 / ECE468 OPERATING SYSTEMS Spring 2023 Programming Assignment \#1: Process Schedulingl 1. Objective This assignment will introduce you to CPU scheduling. 2. Specifications You are to simulate the execution of processes by a computer system with a large memory, one terminal per user, a CPU, and one disk drive. Each process will be described by its class (REAL-TIME or INTERACTIVE) and its start time followed by a sequence of resource requests. These resources requests will include CPU requests (CPU), disk reads (DISK) and terminal accesses (TTY). In addition, all real-time processes will have a DEADLINE, by which they must complete. Your input will be a sequence of pairs as in: All time will be expressed in milliseconds. Your program should maintain separate ready queues for real-time and interactive processes and give absolute priority to real-time processes over interactive processes: a) Your scheduler should never allocate the CPU to an interactive process as long as there are one or more real-time processes in the ready state. b) When a real-time process returns to the ready queue and finds that the CPU is currently allocated to an interactive process, the scheduler should take the CPU away from the interactive process and give it to the real-time process. The pre-empted process should return to the end of the ready queue for interactive processes. When this is the case your program should update the duration of the CPU request by subtracting from the original duration the time the process has already spent in the running state. Disk scheduling will be strictly first-come first-served (FCFS) without any distinction of process classes. To simplify your life, we will also assume that: a) there is enough memory space for all processes, b) context switch times can be neglected, c) user think times are included in the terminal access times, and d) each process reads and writes to a different terminal. Your program should read its input file name through input redirection as in: ./a.out

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 Databases Questions!