Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CPU Scheduling Simulation using c language for FCFS,RR,SRTF. To execute using input.txt file having the values to compute like proj2 input.txt FCFS...how tp compile the
CPU Scheduling Simulation using c language for FCFS,RR,SRTF. To execute using input.txt file having the values to compute like proj2 input.txt FCFS...how tp compile the c programs??CPU scheduling simulation using c program for FCFS,SRTF,RR and how to compile these programs. Using proj2 how to compile and execute it.
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) 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)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