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 Monday, Oct. 21, 1998 10

In this homework, you have to write a program that implements the algorithm described below. Put the new process on CPU only if the priority of the new process is atleast 2 greater than the one currently scheduled. For the processes on the queue schedule according to priority ie. higest priority first. You can write your program in C or C++ only.

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 by electronic mail to cis332fk@cis.njit.edu no later than Midnight on Monday, October 21, 1998. 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.