CS 416 Exam 2

Spring 2011

    Part I – 90 Points; 3 points each

    For each statement, select the most appropriate answer. You may omit three questions. Please indicate your omissions clearly.

  1. CPU utilization tends to be lower when:
    (a) There are more processes in memory.
    (b) There are fewer processes in memory.
    (c) There is a higher degree of multiprogramming.
    (d) Processes perform very little I/O.
  2. A major problem with the base & limit approach to memory translation is:
    (a) It requires the process to occupy contiguous memory locations.
    (b) The translation process is time-consuming.
    (c) The translation must be done for each memory reference.
    (d) A process can easily access memory that belongs to another process.
  3. Page-based virtual memory is subject to:
    (a) Internal fragmentation.
    (b) External fragmentation.
    (c) Both.
    (d) Neither.
  4. Memory compaction is a technique to:
    (a) Free up unused memory in a process to create more free memory.
    (b) Remove redundant data in a process so it takes up less space in memory.
    (c) Apply real-time data compression to a process’ memory to reduce its footprint.
    (d) Move a process to a different part of memory to create a larger region of contiguous memory.
  5. The difference between base & limit addressing and segmentation is:
    (a) A process may have a discontiguous address space with segmentation.
    (b) A process cannot access another process’ memory under segmentation.
    (c) Segmentation requires dynamic address translation.
    (d) Segmentation does not have problems with external fragmentation.
  6. In contrast to segmentation, paging:
    (a) Requires real-time address translation.
    (b) Requires less memory to store memory address translation tables.
    (c) Divides memory into fixed-size chunks.
    (d) Requires that a process be allocated a contiguous chunk of memory.
  7. With a direct mapping paging system on a 32-bit processor with 32 KB pages, what is the size of each process’ page table?
    (a) 32K entries
    (b) 64K entries
    (c) 128K entries
    (d) 4G entries
  8. In contrast to a single-level page table, multilevel page tables:
    (a) Reduce the maximum amount of memory that a process can need for a page table.
    (b) Result in faster page table lookups.
    (c) Allow processes to share regions of memory.
    (d) Typically use much less memory per process.
  9. A logical address of 0x514413ab on a 32-bit page-based virtual memory system with 4 KB pages has the following offset:
    (a) 0x3ab
    (b) 0x413ab
    (c) 0x51441
    (d) 0x514
  10. Effective memory access time on a TLB miss with a 4-level page table compared with a 2-level page table is:
    (a) 167% the speed of a two-level page table (5/3× slower).
    (b) 200% the speed of a two-level page table (2× slower).
    (c) 60% the speed of a two-level page table (5/3× faster).
    (d) 50% the speed of a two-level page table (2× faster).
  11. The ARM v7 MMU architecture is best described as:
    (a) Combined direct mapped paging and segmentation.
    (b) Combined associative and direct mapped paging.
    (c) Pure direct mapped paging.
    (d) Pure segmentation.
  12. The ideal page replacement algorithm would evict:
    (a) Any page that has not been used since the last periodic interrupt.
    (b) The oldest page.
    (c) The least frequently used page.
    (d) The least recently used page.
  13. If evicted, the following pages do not need to be written to a swap file:
    (a) Program text (pages containing executable code).
    (b) Heap (allocated memory with data).
    (c) Stack.
    (d) Any of the above must be written to a swap file if evicted.
  14. Page fault frequency is a way of:
    (a) Measuring the effectiveness (hit ratio) of a TLB.
    (b) Identifying the specific pages that are best targets for eviction.
    (c) Measuring the efficiency of page fault processing within an operating system.
    (d) Ensuring that all processes have their working sets in memory.
  15. Thrashing in a virtual memory system is caused by:
    (a) A process making too many requests for disk I/O.
    (b) Multiple processes requesting disk I/O simultaneously.
    (c) Processes not having their working set resident in memory.
    (d) Slow operating system response to processing a page fault.
  16. A buffer cache is used with:
    (a) Character devices.
    (b) Block devices.
    (c) Network devices.
    (d) All categories of devices.
  17. On POSIX systems, devices are presented as files. When you send an I/O request to such a file, it goes to the:
    (a) device driver that was identified in the metadata of the file when it was opened.
    (b) device driver, which is contained within data of the device file.
    (c) device driver based on the major and minor numbers contained in the file’s data.
    (d) file system driver (module), which then interprets it as a device request.
  18. When a user process makes a system call, the kernel code is run in the:
    (a) User context.
    (b) Kernel context.
    (c) Interrupt context.
    (d) Device context.
  19. A buffer cache:
    (a) Allows user programs to read and write byte streams when the back-end device supports only block I/O.
    (b) Stores frequently used blocks of data.
    (c) Is an intermediate place for data to reside between the user program and device driver.
    (d) All of the above.
  20. What data identifies the device driver that should be used for a specific device?
    (a) Major number.
    (b) Major number, minor number.
    (c) Device type (block or character), major number.
    (d) Device type (block or character), major number, minor number.
  21. Interrupt handling is separated into two parts to:
    (a) minimize the amount of work done in the interrupt service routine.
    (b) separate generic interrupt processing operations from device-specific ones.
    (c) allow a user process to handle all non-critical parts of interrupt processing.
    (d) make the code more modular.
  22. The purpose of device frameworks is to:
    (a) Allow devices to present themselves as dynamically loaded modules.
    (b) Provide an alternate interface to devices that don’t fit the character or block model.
    (c) Ensure that devices can properly implement a file interface.
    (d) Provide a well-defined set of interfaces for specific device types.
  23. Disk scheduling algorithms try to minimize the effects of:
    (a) Seek time.
    (b) Rotational latency.
    (c) Transfer rate.
    (d) All of the above.
  24. A system has the following blocks queued for writing: 8000, 3000, 5000, 2000. The most recently written block was 4500. The block read before that was 2500. What sequence of writes will a Circular-LOOK (or C-SCAN) algorithm generate?
    (a) 5000, 8000, 3000, 2000
    (b) 5000, 8000, 2000, 3000
    (c) 5000, 3000, 2000, 8000
    (d) 8000, 3000, 5000, 2000
  25. The VFS interface to set a file’s attributes is present in this component:
    (a) inode
    (b) dentry
    (c) file
    (d) superblock
  26. Which of the following is not a valid function in the file_operations interface for the VFS file object?
    (a) open
    (b) lock
    (c) rename
    (d) write
  27. An inode-based file system that contains i indirect blocks, has a block size of b bytes, and the length of a block pointer is p bytes. The maximum file size is:
    (a) ib3/p
    (b) ib2/p2
    (c) ib/p
    (d) ib2/p
  28. Microsoft’s FAT32 file system is an example of:
    (a) Contiguous allocation.
    (b) Linked allocation.
    (c) Indexed allocation.
    (d) Combined indexing.
  29. Block groups in the ext2 file system primarily serve to:
    (a) Improve the reliability of file storage.
    (b) Provide better wear leveling.
    (c) Reduce seek latency when accessing files.
    (d) Reduce rotational latency when accessing files.
  30. Differing from full data journaling, ordered journaling:
    (a) Does not ensure that the file system is kept in a consistent state.
    (b) Ensures that journal entries appear in the exact same order as file operations are issued.
    (c) Does not perform journaling for all files.
    (d) Commits a journal entry after writing file data.
  31. Differing from its predecessor, ext3, the ext4 file system:
    (a) Uses block groups.
    (b) Uses extents instead of cluster pointers.
    (c) Allows journaling to be enabled.
    (d) No longer uses inodes.
  32. The logs in a log structured file system such as YAFFS2 differ from journaling in that:
    (a) Logs are the primary storage structure of the file system.
    (b) Logs are cleared after the data writes associated with them are complete.
    (c) Logs improve the integrity of the file system.
    (d) A sequence of logs represents an indivisible transaction.
  33. Many mobile devices running Android OS use the YAFFS2 file system because it:
    (a) Provides wear leveling.
    (b) Is transaction-oriented for reliability.
    (c) Allows systems to boot quickly.
    (d) Avoids the overhead of more complex file systems such as ext4 or FAT32.
  34. Part II – 10 Points; 2 points each

    For each statement, specify whether it is true or false by circling the correct choice.

  35. A TLB miss will cause a page fault to occur.
          True        False
  36. A device driver is responsible for implementing the mechanism & policy for device access.
          True        False
  37. A cluster is a series of extents.
          True        False
  38. C-SCAN disk read/write scheduling has no benefit when used with NAND flash memory.
          True        False
  39. Block groups in ext2/3/4 file systems have no benefit when used with NAND flash memory.
          True        False