Question: Overview: This assignment is related to process and CPU scheduling. Basically, you will imple- ment the four classical scheduler functions, which take the parameters of



Overview: This assignment is related to process and CPU scheduling. Basically, you will imple- ment the four classical scheduler functions, which take the parameters of two (2) processes for their CPU and IO bursts. Each scheduler function will generate the process scheduling strings of 'R', 'r' and 'w', and calculate the corresponding waiting time and CPU utilization. Details: Your main C program should take seven (7) integer values as command line parameters and run as folloWS: /assign2 q xl y1 z1 x2 y2 z2 where q stands for the quantum value needed for Round-Robin scheduler; (x1, yl, z1) repre- sents the first process that has x1 units of CPU burst, followed by y1 units of I/O burst, and then followed by z1 units of CPU burst. Similarly, the second process is represented by (x2, y2, z2) Suppose that both processes arrive at time 0 where process 1 arrives in the ready queue just before Process 2. No other processes are in the system The main program should start by checking that there are exactly 7 parameters. It will exit with an appropriate error message otherwise. If the number of command line parameters is correct, the program will print your name on a line in the form: Assignment 1 program was written by YOUR NAE followed by printing out the 7 input values in one line. Then, the main program should call the four (4) scheduler functions one by one. For each scheduler function, it will display 5 lines: a blank line to separate, a heading line to indicate the scheduler function, the two output strings (each string on its own line, and the second string directly under the first string), followed by four numeric values in one line. Here, the first two values are integers that indicate the waiting time for the first and second processes (i.e., the number of times r occurs in the first and second string), respectively. The third value is the average waiting time (i.e., av- erage of the two integers) and the last one indicates the CPU utilization (i.e., the total number of R's in the two strings divided by the length of the longer string) The four scheduler functions (and any other needed functions) should be put in the file pslibrary.c The prototypes of these functions should be in pslibrary.h and have your main program assign2.c include pslibrary.h Part 1: FCFS Scheduler: The first scheduler function is for First-Come First-Serve (FCFS) It will ignore the first input parameter of quantum and has the following prototype
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
