[UNB Logo]

CS2403: Operating Systems Principles

Assignment #4

NOT to be handed in
(Bring your solutions to class on Thursday, August 10.)

Assignment Questions

1. Consider the following set of processes, with length of the next CPU-burst time given in milliseconds:

Process CPU Burst Time Priority Arrival Time
A 8 4 0
B 4 2 1
C 2 3 2
D 3 5 4
E 1 1 11


Note that a smaller priority number implies a higher priority. Also, the time quantum (when required) is equal to 3 milliseconds.

a. Draw four Gantt charts illustrating the execution of these processes using FCFS, Non-Premeptive SJF, Preemptive Priority, and Round Robin Scheduling.
b. Which scheduling algorithm(s) had the best average waiting time? Which algorithm(s) has the worst average waiting time? Show your work. c. Which scheduling algorithm(s) had the best average turnaround time? Which scheduling algorithm(s) had the worst? Show your work.
d. Would any of these algorithms be used in a soft real-time system? Explain.


2. Question 7.13, page 234 of your text.


3. Question 8.5, page 285 of your text.


4. Question 13.2, page 448 of your text.


5. Question 6.8, page 203 of your text. (NOTE: Pseudo code only.)

This document can be found at http://www.cs.unb.ca/~nwebber/CS2403/assignments/assignment4.html
Last updated August 07, 2000 by Natalie Webber.
Contact Natalie at nwebber@unb.ca