Test 4 - File Management

CS 505, Operating Systems Concepts


  1. Given a virtual memory system, do you think there would be some advantage to having a disk buffer pool separate from the file buffer pool for the paging file? Explain.


    Yes, there would be. Pages do not contain file-system metadata, and could be written out to disk less frequently than buffers in a regular file system. In addition, buffers containing pages can be expected to last longer than buffers containing file data (processes open and close files, not vice versa), and separating out the slow-churning buffers would allow the file buffer pool to be more responsive to disk I-O requests.


  2. Describe the semantic information that can be exploited by a disk buffer pool to make the LRU algorithm more appropriate for determining buffer replacement when the buffer pool is full.


    The buffer pool can know, or can easily be told, when a buffer contains information important to the consistency of the file system; these buffers can then be written to disk earlier than the time at which a pure LRU algorithm would write them.

    The buffer pool can know, or can easily be told when a buffer will no longer be needed, as in the case of buffers associated with closed files. Such buffers can immediately be written to disk and recycled, rather than having them age enough until they get caught by the LRU algorithm.


  3. Explain how access control lists protect against Trojan horses. Explain why the UNIX ACL-like mechanism fails to protect against Trojan horses.


    A Trojan horse involves sub-rosa access to resources not normally required by the application hosting the Trojan horse. Under access control lists, only the resources required by the application would include the application's protection domain; the Trojan horse would be denied access to its resources because those resources wouldn't contain the application's protection domain.

    UNIX protection bits don't protect against Trojan horses because the host application likely to be a target for Trojan horses usually run as root, the protection domain that appears in all objects. Once a Trojan horse infects such an application, it has access to everything.


  4. An i-node is a small data structure, taking up to the low 100s of words. However, an i-node can describe a file comprising 100,000s or even millions of disk blocks. Explain how i-nodes do it.


    I-nodes use indirect index blocks to describe large files. For large files, an i-node points to a disk block that contains pointers to the disk blocks containing file data; these are indirect blocks. For larger files, an i-node points to a disk block that contains pointers to disk blocks that contain pointers to disk blocks containing file data; these are double-indirect blocks. For the largest files, i-nodes contain a pointer to a triple-indirect block.



This page last modified on 13 December 2000.