CS 505, Operating Systems Concepts

Test 1, 12 October 2004 - Processes


  1. The abstract-machine interface comprises two parts; what are these parts and explain how they're implemented.


    The abstract-machine interface consists of the host-system hardware architecture and the system calls implemented by the operating system. The hardware interface is implemented by compilers, assemblers, and other parts of the system software tool set. System calls are implemented by a combination of traps and procedures internal to the operating system. See Figure 6.6 in the text.


  2. I gave a brief argument in class (and the book gives a more detailed argument) explaining the minimal average wait time property for shortest-job-next selection. Can you apply the same (or a similar) argument to make the same (or a similar) claim for closest-deadline-first selection? Explain.


    Same: No. Suppose process P1 has a deadline of 10 and an expected execution time of 8, and process P2 has a deadline of 20 and an expected execution time of 2. CDF scheduling would run P1 followed by P2 for an average wait time of 8/2 = 4. SJN scheduling would run P2 and then P1 for an average wait time of 2/2 = 1.

    Similar: A similar argument would be along the lines of all processes can meet their deadlines. Making this argument relatively simple under rate-monotonic scheduling, which (roughly) guarentees that the set of processes to be executed don't require more than 100% of the CPU.

    The less said about the answers to this one the better.


  3. Explain how message passing can be more efficient than using traps to communicate with the operating system.


    Message passing decouples data transfer from traps, which allows several data transfers to be collected under a single trap.

    Many answers to this question went in exactly the opposite direction, claiming that message-passing doesnt need traps. Any traversal from user space to system space requires a trap.'


  4. Suppose a computing system that uses a scheduler with round-robin selection and quantum eviction. The system handles a mixture of process types, and the scheduler needs to be modified to give better response time to interactive processes. Assuming you can only make one change, which would be more effective: modifying the quantum in response to process behavior or using a multi-level queue? Explain.


    The important measure for responsiveness is the amount of time it takes for the ready process to reach the CPU; the amount of time an interactive process spends in the CPU is not as important. The most effective change creates a fast-path to the CPU for interactive processes. Adding a second ready queue for interactive processes is a much more effective fast-path then would quantum manipulations.

    Most answers to the question forgot the quantity important to responsiveness and dealt with quantums.



This page last modified on 14 November 2004.