Homework 5 Solution

  1. (10 pts) Problem 11.6 from AOS

    If arbitrarily long names could be used then it is possible to simulate a multi-level directory using a single level directory. This could be done, for instance, by using the character "/" to indicate the end of a sub-directory. The the file name "/usr/local/bin/netscape" indicates that netscape is a file in sub-directory bin, which is itself a sub-directory in local, and so on.

    If file name were restricted to seven characters, then it is difficult to simulate multi-level directories. The next best approach is such a situation would be to maintain a separate table that maps an arbitrary string to shorter seven character string.

  2. (10 pts) Problem 11.12 from AOS

    (a) Put the 4990 users in a group and set the access permissions for the group accordingly.

    (b) Create an access control list for the remaining ten users and deny all access privileges to this list for the file.

  3. (10 pts) Problem 12.4 from AOS

    Generally, blocking I/O is appropriate when the process will only be waiting for one specific event. Examples: disk, tape. Non-blocking I/O is usefule when I/O may come from more than one source and order of the I/O arrival is not predetermined. Example: window managers that accept mouse movements as well as keyboard input.

    Non-blocking I/O is more complex to implement in an application program because of its asynchronous nature (in blocking I/O the program makes a read/write request and blocks, so no additional code is needed). Also, busy waiting is less efficient to use, so overall system performance would decrease.

  4. (10 pts) Problem 12.5 from AOS

    Polling is more efficient than interrupts when I/O is frequent and of short duration (Interrupts require a suspension and then resumption of the current process, which is more expensive. In situations where the amount of busy waiting is known to be less, polling is more efficient.) A terminal concentrator requires frequent and short (a character at a time) I/O. So a well-designed polling mechanism is more suitable for such a scenario.

    (10 pts) Problem 12.8 from AOS

    DMA increases system concurrency by allowing the CPU to performa tasks while the DMA device controller transfers data via the system and memory buses. Hardware design is complicated becausethe DMA controller must be integrated into the system and must be allowed to "steal" the bus from other components (CPU/memory) for I/O transfers.


Prashant Shenoy
Last modified: Sat Dec 9 12:54:25 EST 2000