Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CPU Scheduling Simulation for scheduling algorithms FCFS,SRTF,RR using C program. Assignment 2: CPU Scheduling Simulation CSC 139 Operating System Principles - Spring 2019 Posted on
CPU Scheduling Simulation for scheduling algorithms FCFS,SRTF,RR using C program.
Assignment 2: CPU Scheduling Simulation CSC 139 Operating System Principles - Spring 2019 Posted on March 6, due on March 17 (11:59 pm) 1 Objectives This programming project is to simulate a few CPU scheduling policies discussed in the class. You will write a C program to implement a simulator with different scheduling algorithms. The simulator selects a task to run from ready queue based on the scheduling algorithm. Since the project intends to simulate a CPU scheduler, so it does not require any actual process creation or execution. When a task is scheduled, the simulator will simply print out what task is selected to run at a time. It outputs the way similar to Gantt chart style. 2 Description The selected scheduling algorithms to implement in this project are 1) First Come First Serve (FCFS), 2) Round Robin (RR), and 3) Shortest Remaining Time First (SRTF). The detailed algorithms are already described in class slides and textbook Chapter 5 2.1 Task Information The task information wil be read from an input file. The format is pid arrival.time burst.time All of fields are integer type where pid is a unique numeric process ID arrival.time is the time when the task arrives in the unit of milliseconds burst.time the is the CPU time requested by a task, in the unit of milliseconds The time unit for arrival.time, burst.time and interval is millisecond. 2.2 Command-line Usage and Examples Usage: proj2 input.file [FCFSIRRISRTF] [time.quant um] where input-file is the file name with task information. FCFS, RR, and SRIF are names of scheduling algorithms. The time quantum only applies to RR. FCFS is nonpreemptive, while RR and SRTF are all preemptive. The last argument is needed only for RR. (See following table for more examples) Examples proj2 input.1 ECES proj2 input.1 RR 2 - tar the files: FCTS scheduling with the data file "input.1 Simulate RR scheduling with time quantum 2 milliscconds (4d parameter is reuired venquantum 1 millen with the data file "input.1" Simulate SRTF scheduling with the data file" inpu. 1" Verify the files have been placed in a tar file: ta--tvf ECS username >-a5qmt2.tar - Compress the liles using grip: qzipStep 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