Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 - The due date is 1 8 / 1 1 / 2 0 2 3 at 1 1 : 5 5 PM . 2
The due date is at : PM
Late submissions ie after the due date will not be accepted.
Submit the source code files and write your name and ID as a comment on the top.
Groups are allowed up to students Can be from different sections.
In this assignment, you will implement a simple OS scheduler using CC The schedulers task is to
receive a set of processes and their details and then decide the order of executing these processes
based on the chosen algorithm. Finally, the scheduler will output the order of process execution, in
addition to some stats about each of the processes.
The scheduling algorithm chosen for this assignment will be Priority Scheduling. The input will start with
an integer N representing the number of processes, followed by N lines one for each process For each
line i the line will start with a string s representing the process name, followed by three numbers
representing the arrival time, processing time, and priority for the ith process, respectively. These values
will be separated by tabs iet The values for input numbers can be up to
As you learned in class, the main aspect of Priority Scheduling is the priority value for each process rd
column However, If multiple processes have the same priority value, we decide based on the arrival
time. In the case where processes have the same priority and arrival time, we choose the process that
had its name listed first in the input file.
Your program should print a line indicating the order of executing the processes. Moreover, for each
process, your program should print a line showing the processs name, response time, turnaround time,
and delay. The order of these lines should match the execution order. See the sample output below for
details.
The input will be read from a file intxt and the output should be written to a file outtxt The output
format must strictly match the formatting shown in the sample output.
Grading Rules:
Each student is expected to fully understand all the aspects and details of the entire code.
The grading will take place in a Linux environment Ubuntu using the g compiler
You MUST implement the code using this same environment to get a full mark.
Your grade will depend on multiple aspects, such as:
The correctness of your codes output across multiple secret test cases
Your codes ability to handle corner test cases like having many processes or large
processing times.
Your answers to the questions during the discussion
Sample Input file intxt:
A
C
B
D
E
Sample output file out.txt:
ABDCE
A: response turnaround delay
B: response turnaround delay
D: response turnaround delay
C: response turnaround delay
E: response turnaround delay
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