Tutorial Week 12

Questions

Q1: What do the terms I/O bound and CPU bound mean when used to describe a process (or thread)?

Q2: What is the difference between cooperative and pre-emptive multitasking?

Q3: Consider the multilevel feedback queue scheduling algorithm used in traditional Unix systems. It is designed to favour IO bound over CPU bound processes. How is this achieved? How does it make sure that low priority, CPU bound background jobs do not suffer starvation?

Note: Unix uses low values to denote high priority and vice versa, 'high' and 'low' in the above text does not refer to the Unix priority value.

Q4: Why would a hypothetical OS always schedule a thread in the same address space over a thread in a different address space? Is this a good idea?

Q5: Why would a round robin scheduler NOT use a very short time slice to provide good responsive application behaviour?

Q6: Consider 3 periodic tasks with execution profiles shown below. Draw scheduling diagram for a rate monotonic and a earliest deadline first schedule.

Process Arrival Time Execution Time Deadline
A (1) 0 10 20
A (2) 20 10 40
. . .
B (1) 0 10 50
B (2) 50 10 100
. . .
C (1) 0 15 50
C (2) 50 15 100

Q7: Describe programmed I/O and interrupt-driven I/O in the case of receiving input (e.g. from a serial port). Which technique normally leads to more efficient use of the CPU? Describe a scenario where the alternative technique is more efficient.

Q8: A device driver routine (e.g. read_block() from disk) is invoked by the file system code. The data for the filesystem is requested from the disk, but is not yet available. What do device drivers generally do in this scenario?

Q9: Describe how I/O buffering can be formulated as a bounded-buffer producer-consumer problem.

Q10: An example operating system runs its interrupt handlers on the kernel stack of the currently running application. What restriction does this place on the interrupt handler code? Why is the restriction required?