Test 4 - File Management

CS 438, Operating Systems Analysis


  1. A system-administrator colleague of yours is complaining about a file system's poor disk-space utilization due to external fragmentation. What policy does the file system use to allocate free blocks to files? Explain.


    The only way to get external fragmentation in a file system is to use contiguous free-block allocation for files.


  2. Given that a file system uses non-contiguous block allocation to allocate free blocks to files, is there any benefit to periodically compacting the disk? Explain.


    Yes, for at least two reasons. First compacting the disk potentially reduces disk-arm motion by minimizing the portion of the disk holding file data blocks. Second, an ambitious compaction program can not only copy but re-arrange disk blocks to improve locality within a single file, so that consecutive file-block reads are more efficient.


  3. Is encryption predominantly a mechanism for authentication or authorization? Explain.


    Encryption involves knowing a secret (the key) that can transform information from one form to another. If unique keys are assigned to individuals, then claims of identity can be verified by requesting that the claiment translate known information using the key. If the claiment can transform the information into something recognizable, the claim to identity stands.

    Alternatively, posession of an encryption key could be considered to be an authorization to access (via decryption) any information encoded by the key.


  4. You are implementing a file system supporting unstructured files with inserting writes. Which file metadata structure would you consider most appropriate keeping track of file-data blocks? Explain.


    Inserting writes require that new file blocks be inserted anywhere in the file, rather than just at the end as required by replacement writes.

    A linked list of file blocks makes it easy to insert new blocks anywhere in the list. Single-level indirection requires not only that the data block be split, but also potentially the index block to accomidate the new block reference. Higher levels of indirection compound the problem.



This page last modified on 22 August 2002.