Your program will be graded based largely on whether it works correctly on the CSE machines (e.g., cse01, cse02. 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 code should be well documented in terms of comments. 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. See the SAMPLE OUTPUT for examples of some input files. 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. Note that in this exercise, we know the burst time of each process. Transcribed image text: 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.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |