Operating Systems 1

Tutorial 4

  1. What is priority aging? What effect does it have on low-priority processes?
  2. The Amiga operating system relocates program code in software, when it is loaded. What additional information must be present in executable files to allow this to happen? What are potential disadvantages with this approach?
  3. Name two solutions to the problem of memory fragmentation.
  4. What are two reasons for not trusting processes to stick to their own areas of memory (two reasons we need memory protection)?
  5. A common memory management scheme is to have the stack at the top of the address space and the heap at the bottom. Why is this a good scheme with a single-process system?
  6. Which is more efficient in terms of disk accesses: process swapping or overlays?
  7. The Linux operating system uses paging. Sometimes pages must be evicted from memory to make room for pages which should be swapped in. If the OS evicts a page which is part of the text segment of a process, it discards the page, without writing it to disk first. What will Linux do when it once again needs the pages it has discarded (when a process attempts to reference that particular page of its text segment)?
  8. A certain processor uses 32-bit memory addresses, and 2K pages. The top 2G (2048M) of memory is unavailable for user processes. How many bits are used to reference the page tables? Potentially, how many pages could a process have?
  9. Many general-purpose processors support the use of a 'physical access' mode whereby the CPU's memory accesses go straight to memory, bypassing the MMU, in addition to a 'virtual access' mode, using the paging hardware. Why would 'physical access' mode be important to someone writing an operating system kernel? (For extra brownie points: how might an OS simulate 'physical access' mode using the MMU?)