Question: PROGRAM DESCRIPTION: In this programming assignment, you will write a complete C program that implement a simulation for the Shortest Remaining Time First (SRTF) preemptive

 PROGRAM DESCRIPTION: In this programming assignment, you will write a completeC program that implement a simulation for the Shortest Remaining Time First

PROGRAM DESCRIPTION: In this programming assignment, you will write a complete C program that implement a simulation for the Shortest Remaining Time First (SRTF) preemptive CPU scheduling algorithm. Note that in this exercise, we know the burst time of each process. You will read input using a file (you must prompt for the name of the file) where the input will be formatted as follows on each line (using whitespace as a delimiter) ProcesSID ArrivalTimeBurstTime where ProcessID is a C-string up to 6 characters (5 with a NULL terminator) and the ArrivalTime and BurstTime are integers, representing units of time. See the SAMPLE OUTPUT for examples of some input files. There is no limit to the number of processes supported by your CPU scheduler, so you will need to read the file to determine how many processes are specified (note that each process must be specified in the file on a separate line) Based on the SRTF algorithm, you will calculate the finish and wait times for each process as well as the average throughput, waiting time, and turnaround time for the processes. REQUIREMENTS .Your code should be well documented in terms of comments. For example, good comments in general consist of a header (with your name, course section, date and brief description), comments for each variable, and commented blocks of code Your program should be named "minor4.c", without the quotes. . Your program will be graded based largely on whether it works correctly on the CSE machines (e.g., cse01, cse02, ..., cse06), so you should make sure that your program compiles and runs on a CSE machine individual student SAMPLE OUTPUT (user input shown in bold green): more pDatal.txt Pl 0 11 P2 72 P3 55 $./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!