You are on page 1of 1

Operating System (Chapter 5)

1. Why is it important for the CPU scheduler to distinguish I/O-bound programs from CPU-bound
programs?
a. I/O bound programs perform only a small amount of computation before performing
I/O
i. Such programs typically do not use up their entire CPU quantum
b. CPU bound programs use their entire quantum without performing any blocking I/O
operations
c. Could make better use of computer’s resources by giving higher priority to I/O bound
programs and allow them to execute ahead of CPU bound programs
i. This will reduce the AWT as seen by the FCFS convoy effect

2. What is the difference between preemptive and non -preemptive scheduling?


a. Preemptive scheduling allows a process to be interrupted in the midst of its execution,
taking the CPU away and allocating it to another process
i. When a new process comes, must recheck to choose the best candidate again
b. Non-preemptive scheduling ensures that a process relinquishes control of the CPU only
when it finishes with its current CPU burst
i. When a new process comes, do not care and just continue with the current
process until the current process finishes

3. Explain the difference in the degree to which the following scheduling algorithms discriminate in
favor of short processes
a. FCFS – discriminate against short jobs since short jobs arriving after long jobs will have a
longer waiting time (convoy effect)
b. RR – treats all jobs equally (giving them equal bursts of CPU time) so short jobs will be
able to leave the system faster since they will finish first
c. Multilevel feedback queue – works similar to the RR algorithm – they discriminate
favorably toward short jobs

You might also like