CSC227 Operating System
The purpose of this project is to write a java program that simulates the CPU Scheduler (also known as Short-Term Scheduler) of an operating system. This is a group project. Each group can have up to 3 students.
The program implements the following CPU scheduling algorithms.
1. First-Come-First-Serve (FCFS)
2. Shortest-Job-First (SJF)
3. Round-Robin with time slice = 3 (RR-3)
4. Round-Robin with time slice = 5 (RR-5)
When a process is created, a Process Control Block (PCB) is expected to be created with the following information:
· Process ID: Contains the process ID.
· Process state: Contains the state of the Process (New, Ready, Running, Waiting, Terminated)
· Burst Time (in ms)
· Memory Required in MB
The program will read process information from a file (job.txt) - this file will be provided by the instructor.
A sample input file of four jobs is given as follows (Process ID, burst time in ms, Memory required in MB):
[Begin of job.txt]
5, 8, 800
3, 10, 2000
8, 3, 4000
6, 7, 1000
[End of job.txt]
Note: You can assume that
(1) there are no more than 30 jobs in the input file (job.txt).
(2) processes arrive in the order they are read from the file for FCFS, RR-2 and RR-5.
(3) all jobs arrive at time 0 for SJF.
(4) Main memory is limited to 8192 MB
Compare the average waiting times and the average completion times of all jobs for each scheduling algorithm.
Output the details of each algorithm's execution. You need to show which jobs are selected at what times as well as their starting and stopping burst values. You can choose your display format, but it is recommended that you display the results in terms of a Gantt chart. You have to make sure that processes can only loaded to ready queue only if enough space for the process is available in memory.
1) Soft copy of the program with proper documentation.
2) Soft copy of the test runs using the given input files from the instructor. (You can download test cases from the Blackboard)
3) Soft copy of the report (at least two pages) of this programming assignment including:
a. software and hardware tools you used
b. strength and weakness of your program
c. do you prefer to read Gantt chart as an output of a processor schedule? or you like the other methods such as tables? explain why.
d. if you need to simulate the whole operating system (instead of just the CPU Scheduler here), explain how you can modify your program to do that.
1) Print and bring the project cover sheet on the day of presentation (You can download the project cover sheet from the Blackboard).
2) Your program will be evaluated based on a new input file on the day of presentation.
3) You will be asked some questions regarding your experience on this project.