scheduling_hw
scheduling_hw
1. Consider the following set of processes, with the length of the CPU burst given in milliseconds:
(a) Draw four Gnatt charts that illustrate the execution of these processes using the following scheduling algorithms:
FCFS, SJF, nonpreemptive priority (small priority number implies a higher priority), and RR (quantum = 1).
(b) What is the turnaround time of each process for each of the algorithms?
(c) What is the waiting time of each process for each of the algorithms?
(d) Which of the algorithms results in the minimum average waiting time (over all processes)?
2. Consider a system running ten I/O bound tasks and one CPU-bound task. Assume that the I/O-bound tasks issue
an I/O oeration once for every millisecond of CPU computing and that each I/O operation takes 10 milliseconds to
complete. Also assume that the context-switching overhead is 0.1 millisecond and that all processes are long-term
tasks. Describe the CPU utilization for a round-robin scheduler when
3. Consider a system implementing multi-level queue scheduling. What strategy can a computer user employ to
maximize the amount of CPU time allocated to the user’s process?
4. Explain the differences in the degree to which the following scheduling algorithms discriminate in favor of short
processes:
• FCFS
• RR
• Assuming that each context switch takes s milliseconds, determine the quantum size q such that the overhead
resulting from process switching is minimized but, at the same time, each process is guaranteed to get its turn at
the CPU at least every t seconds.
• if n = 100, t = 1, and s = 0.001, what would be the size of q? What is s is increased to 0.01?