Question: You will write a program (name it scheduler.c) that can take a list of processes' burst time from a file and determine the sequence of

 You will write a program (name it scheduler.c) that can take

a list of processes' burst time from a file and determine the

You will write a program (name it scheduler.c) that can take a list of processes' burst time from a file and determine the sequence of executions for those processes using FCFS scheduling and round-robin scheduling. The scheduler will also output the average wait time and the average turnaround time You may assume that all processes arrive and the same time and the time slice for round-robin is oms Your program will take in two arguments. The first argument will indicate what type of scheduling algorithm the user wants to use. The second argument will be the name of the input file For example if the content of data.txt is 134 43 54 19 The output of your program should look like this 2$ gcc -Wal -o scheduler scheduler.c p2$ ./scheduler 0 data.txt PO P1 P2 P3 Average wait time: 135.500000 Average turnaround time: 198.00000 p2$/scheduler 1 data.txt PO P1 P2 P3 PO P1 P2 P3 PO P1 P2 PO P1 P2 PO P1 P2 PO P2 PO PO PO P0 PO PO PO PO Average wait time: 101.750000 Average turnaround time: 164.250000

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!