Assignment 9, due July 14

Part of the homework for 22C:50, Summer 2004
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

  1. Standard Unix shells have a search path that is contained in the variable $PATH, so if you type echo $PATH in just about any Unix shell, it will output the search path as a colon-separated string of directory names. Using this notation, what is the search path equivalent to the one used by the example command language interpreter from Machine Problem 4?

  2. Once upon a time, long long ago, Digital Equipment Corporation sold a fixed-head disk drive, the DF32, that had no sector structure. The DF32 allowed DMA transfers to begin with any word within the 32K words on the disk, with a single transfer addressing anywhere from one word to 4K words. (The computer to which it was attached had 4K words of RAM, so 32K seemed modestly large; also, a word was only 12 bits on that machine.)

    Assume you've been given the job of designing a file system for a similar (but modern, and therefore much larger) disk drive to be attached to modern computer; the exact details of the capacity are irrelevant, but assume it's large compared to RAM and assume there is no sector structure.

    a) Suggest why a programer given this job would be tempted to use a fixed sector size, imposed by software, even though the hardware does not require this.

    b) Suggest a representation for files stored on disk that allows the file to be composed of numerous different-sized segments.

    c) Evaluate the Unix read(), write(), lseek() file abstraction as a candidate for the user-side interface of this file system, assuming that you actually implement files using numerous different-sized segments.

  3. A RAID is a redundant array of inexpensive disks. RAIDs are constructed so that many small disks can be accessed as a single large disk, with error correction achieved by storing each data sector in redundant form on multiple drives.

    Assume you have two disk drives, and you want to organize them as a RAID in software. Each disk records a checksum for every sector written and checks that checksum on read. Explain how your raid_write and raid_read operations would use these checksums to allow the data to survive the failure of either disk drive.