Course: CPE 473: Operating Systems
Institution: Jordan University of Science and Technology
Department: Computer Engineering
In this assignment, you will implement a simple OS Scheduler using C/C++. The scheduler will:
- Receive a set of processes and their details.
- Decide the order of execution based on the Ranking Scheduling Algorithm.
- Output the process execution order along with some statistics for each process.
The input file (in.txt
) contains:
- An integer
N
(number of processes). N
lines with the following format for each process:- A string
s
: Process name (can contain multiple characters). - Three numbers:
- Arrival Time
- Processing Time
- Rank
- A string
Each value is separated by a tab (\t
). Input values can go up to 100,000,000.
- Processes with lower rank values get higher priority.
- For processes with the same rank:
- Choose the one with the earlier arrival time.
- If rank and arrival time are identical:
- Choose the process that appears first in the input.
Write the output to a file (out.txt
) with:
- One line per process in the execution order, showing:
- Process Name
- Response Time
- Turnaround Time
- Delay
- A final line showing the execution order of the processes.
- Source codes: code.cpp