CS502 Practice Final Exam

  1. What is the locality of reference? How does demand paging take advantage of this in terms of a process' working set?

  2. Consider the mem-alloc.c code from the Simple Operating System we looked at in class.

    1. What should the semaphore be initialized to in line 37?
    2. If the semwait call blocks in line 48, how does another process run?
    3. The free page list is unsorted. In general, would you expect there to be a performance boost if the list was sorted? Explain.

  3. File system initialization:

    1. Briefly describe what happens when a file system is formatted.
    2. Briefly describe what happens when a file system is mounted.
    3. Which happens first, a "format" or a "mount"?

  4. What is the maximum number of disk I/O operations required to add a block to the end of the file for each of: contiguous allocation, linked-list allocation with index and i-nodes. Assume the base file descriptor is currently cached in memory, but nothing else is.

  5. Consider a file system that supports aliases (links). Suppose we have:

        /home/mark/file.txt
        /user/local/temp.txt
    
    Where "temp.txt" and "file.txt" are intended to refer to the same set of data blocks on the disk (ie - the same file). If "temp.txt" was a hard-link, what would happen if "file.txt" was deleted? If "temp.txt" was a soft-link, what would happen if "file.txt" was deleted?

  6. Why do large file-system blocks (typically) result in better file system access times. Why do large blocks result in less efficient use of disk space?

  7. Explain the principles behind the "top half" of an interrupt handler and the "bottom half."

  8. Can a disk have more cylinders than tracks? Can a disk have more sectors than tracks? Can a disk have more cylinders than platters?

  9. Explain why you can use "pure" LRU for a disk cache replacement algorithm but it is more difficult to use "pure" LRU for a memory cache (page) replacement algorithm.


Return to the CS502 Home Page