Scheduling Quiz

1) Suppose that three processes all arrive at time 1.  They all want the CPU for 5 units of time.  Process #1 gets the CPU from 1 - 5.  Process #2 gets the CPU from 6-10.  Process #3 gets the CPU from 11-15.  What is the total wait time?
 
 
 
 

2) Can shortest job next suffer from starvation?  _____________  What type of jobs might it starve? _____________________________________________
 
 

3)  Andy says that Windows ME has a first come first serve scheduler.  Jeff says it does not.  Help Jeff by writing a program (Java or C++) such that running it can tell you if the scheduler could be first come first serve.  (Hint:  This can be done in less than ten lines of code.)
 
 
 
 
 
 
 
 
 
 
 
 
Process # Arival Time Amount of CPU needed Priority Deadline
1 1 10 4 13
2 2 5 2 9
3 5 2 0 8
4 20 836 12 1063
Assumtions:

For round robin, assume that a newly arriving processes is placed at the front of the queue, and therefore run next.
Prority 0 is more important that priority 99.
Using shortest deadline next, assume that a task that cannot make it's deadline is not killed until the deadline is broken.  For example, if process 100 starts at 10 and needs 5 to finish, but must finish by 12, it still runs for 10 and 11.
 
 

4)  Using the data above and assuming round robin scheduling, what process is running at time 6?
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

5) For Shortest Job Next Without Preemption, what is the job running at time 14?
 
 
 
 
 
 
 
 
 
 
 
 
 
 

6) For First Come First Serve, what process is running at time 13?