Homework 10

22C:116, Fall 1998

Due Monday Nov 9, 1998, in class

Douglas W. Jones
  1. Background The final two parts of the final problem on the midterm were missed by so many that it seems fair to give people a second chance. See for more detail.

    Part A: Explain how the UNIX readv() kernel call is related to the problems raised by disk I/O to user buffers in a virtual memory environment. See problem 4 C on the exam for a more detailed statement of this problem.

    Part B: If the operating system maintains a buffer pool, perhaps also serving as a disk cache, so that all disk output involves, first, copying from the user's buffer to the system's buffer, and then scheduling the read or write, does this solve any of the problems posed by the placement of the user's buffer in a virtual memory environment? See problem 4 D on the exam for an earlier statement of this problem.

  2. Background Suppose a network contains 10 clocks, where the rates of clock drift are random and bounded. No clock drifts away from real time by more than .01 percent per day; clocks are equally likely to run fast or slow. Each machine runs a local clock synchronization algorithm once every day.

    For the following two synchronization algorithms, what is the maximum spread you would expect between the fastest clock and the slowest clock, and what is the long-term rate of drift you would expect for any clock in the network.

    Part A: Suppose the local clock synchronization algorithm operates as follows: To synchronize, each clock picks a random partner (one of the other 9) and adjusts its time to the average of the two.

    Part B: Suppose the local clock synchronization algorithm operates as follows: To synchronize, each clock samples all other clocks and adjusts its time to the average shown by all.

  3. Do problem 6 on page 505 in the text.