Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started