CIS332 (Fall 1997) Principles of Operating Systems;
Professor Franz J. Kurfess

Home page:http://www.cis.njit.edu/franz   E-mail:franz@cis.njit.edu 

a
Homework Task Deadline Points Student Name:
5 CPU Scheduling Implementation Tuesday, Oct. 21, 1997 6

In this homework, you have to write a program that implements two of the algorithms used for CPU scheduling, First-Come, First-Serve and Round Robin. Your program needs to read the input data (process arrival time, CPU burst length, priority) either from the keyboard or from a file. You can write your program in C/C++, Pascal or Java.

The output of the program should look similar to the Gantt chart used in the book and for the homework assignments: Print the time slots in one line and in the following line underneath the time slots print the process number that uses the CPU in that time slot.

Time         :  0  1  2  3  4  5  6  .........
Process Id   : P0 P1 P1 P1 P2 P2 P3  .........
    
Test your program with the numbers given in the previous homework, and with several sets of numbers of you own choice. You need to submit your program and the output produced from the numbers used in the last homework, and at least two additional sample runs by electronic mail to cis332fk@cis.njit.edu no later than Midnight on Tuesday, October 21, 1997. Please put "Homework 5" in the "Subject" line of the mail message.

Please note that you need to submit your own solution to this homework. We will check the submitted programs for similarities, and students submitting identical or very similar programs risk a lower grade.