Homework Assignment #6 [50 pts] – Scheduling


You are expected to do your own work on all homework assignments.(See the statement of Academic Dishonesty on the Syllabus.)

Check the Syllabus for the late assignment policy for this course.

How to turn in?

Assignments need to be turned in via Laulima. Check the Syllabus for the late assignment policy for the course.

What to turn in?

You should turn in single plain text file named README.txt with your answers to the assignment’s questions. Your file must be readable “as is” and points will be removed if the report is not readable.


For the following questions, assume a system with a single core CPU and two I/O resources (NIC and Disk). Plot the execution on these three resources using letters to denote the job and “I” to represent idle time. All jobs keep alternating between a CPU burst and I/O burst. If you need to break a tie between two jobs, use the job letter (e.g., A before B).

Exercise #1 [30pts]: Scenario #1

For all questions in this exercise, plot the execution for at least 34 time steps. Consider the following job mix:

        Arrival   CPU IO  IO Source
Job A:  0         4   3   Disk 
Job B:  1         5   2   NIC
Job C:  1         3   5   NIC
Job D:  2         4   2   Disk

Question #1.1 [10 pts]:

Plot the execution for the First Come First Serve (FCFS) scheduling algorithm:

Question #1.2 [10 pts]

Plot the execution for the Shortest Job First (SJF) scheduling algorithm:

Question #1.3 [10 pts]:

Plot the execution for the Round Robin scheduling algorithm with a time quantum of 4 (RR q=4).


Exercise #2 [10 pts]: Scenario #2

For all questions in this exercise, plot the execution for at least 34 time steps. Consider the following job mix:

        Arrival   CPU IO  IO Source
Job A:  0         4   3   Disk 
Job B:  0         1   2   NIC
Job C:  0         2   7   NIC
Job D:  0         10  2   Disk

Question #2.1 [10 pts]:

Plot the execution for the Multi-Level Feedback Queue with two priorities and no priority boost. The high priority queue has a time quantum of 5 and the low priority queue has a time quantum of 10. (MLFQ Hq=5, Lq=10)


Exercise #3 [10 pts]: Spot The Error

Job mix:

        Arrival   CPU IO  IO Source
Job A:  0         4   4   NIC
Job B:  2         1   2   Disk
Job C:  0         8   1   NIC

Output:

CPU : AAAABCCCBAAAA
NIC : IIIIAAAAIIIII
Disk: IIIIIBBIIBBII

Question #3.1 [10 pts]:

Assume that the Shortest Time to Completion First (STCF) scheduling algorithm is being used. Given the job mix and answer, determine whether there are any errors in the answer. If there are no errors, state “no errors” for your answer. If there are errors in the given answer, explain what the error is and refer to specific timesteps.