Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C: Input1.txt: 1 3 5 2 3 7 3 1 6 4 5 4 In this session, you will set up your account to
In C:
Input1.txt:
1 3 5 2 3 7 3 1 6 4 5 4In this session, you will set up your account to implement necessary linked list functions for FIFO CPU scheduling and perform the very basic steps in context-switching. In the next session, you will extend this program to implement other three basic CPU scheduling algorithms (namely, SJF, PR, and RR with a given quantum). To keep it simle, we assume each process has a single CPU burst without any IO burst and that all processes arrive at the same time in a given order. The order of es will be given in a simple input file. Each line in the input file consists of three integer numbers: Process Id, Process Priority, CPU Burst time (ms). Download inputLtxt as a sample input file Your program will take the name of the scheduling algorithm, related parameters (if any), and an input file name from command line. In general, here how your program should be executed: > prog -alg [F1FOISJFPRIRR] [-quantum [integer(ms)]] -input [input file-name . txt] In this session, you will just run it as prog -alg FIFO -input input1.txt For the given input file, the output of your program will be as follows: Student Name: Your name Input File Name input1.txt CPU Scheduling Alg FIFO Proces 1 is completed at 5 ms Proces 2 is completed at 12 ms Proces 3 is completed at 18 ms Proces 4 is completed at 22 ms Average waiting time = 8.75 ms (35/4) Average Turnaround time 14.25 ms (57/4) Throughput .18 jobs per ms (4/22)
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