Assignment 2 Solution

  1. How many interrupt levels are available on Intel machines running DOS or Windows? [1]
  2. What is the advantage of preemptive multitasking over non-preemptive multitasking? [2]
  3. How would you find and remove a hung process in Windows? In UNIX? [4]
  4. What are two reasons for defragmenting a disk? [2]
    1. A defragmented disk runs faster because disk seek times are shorter and disk accesses are fewer.
    2. A defragmented disk lasts longer because less head movement produces less wear on mechanical parts. 
  5. Why are memory and disk blocks usually allocated in sizes of powers of two? [2]
  6. What is the main difference between segments and pages? [1]
  7. Give one advantage of paging over segmentation and one advantage of segmentation over paging. [2]
  8. A 32-bit address is divided into a page number and a displacement which produces a page size of 16 KB.
    1. How many pages could be referenced? [3]
      • If the page size is 16 KB, it must take 14 bits, since 214=16K. The remaining 18 bits are used for the page number, so 218=256K pages could be referenced.
    2. How much space would the page table use if each entry is four bytes? [1]
      • 256K pages x 4 bytes/page table entry = 1 MB
  9. Why do modular object-oriented programs run faster than monolithic programs with GOTO statements? [2]
  10. What is the advantage of having a separate register to point to the page table or segment table? [1]
  11. What two characteristics of pages do page replacement policies use to remove pages? [2]
    1. Total time the page has lived in memory
    2. Time since the page was last used
  12. In which hardware device would you normally find real memory? virtual memory? [2]
  13. What is the advantage of direct memory access? [1]
  14. Why do disks and tape transfer data in blocks of characters rather than a single character at a time? [2]
  15. What is the purpose of a buffer? [2]
  16. Which two system files make up the core of MS-DOS? [2]
  17. How do you refer to an I/O device in DOS? in UNIX? [2]
    1. DOS I/O devices often end with a colon, e.g. A:, C:, CON:, COM1:, LPT1:, etc.
    2. UNIX devices are treated as files and are listed in the /dev directory.
  18. Which file loads DOS device drivers? [1]
    1. The config.sys file will load listed device drivers when the system starts.
  19. What steps do you need to take to install a new hardware device on a PC running Windows? [5]
    1. Physically connect the device to the computer. Internal devices should be installed into the computer case. External devices should be plugged into one of the ports on the back of the computer.
    2. You may have to switch off and on or restart the computer, though not for some devices e.g. those connected to USB ports.
    3. Install device driver files and related software. This can occur automatically using Plug and Play hardware or through the Add New Hardware control panel.
    4. Configure the hardware and related software. This can often be done using a control panel. For example, you might need to set DMA, I/O and IRQ addresses if it is not done automatically or there is a conflict.
  20. What is the capacity of a hard disk with 512 bytes per sector, 200 sectors per track, 1000 cylinders and 4 double-sided platters? [2]
  21. What must be done to a new hard disk before installing two different operating systems like Linux and Windows? [2]
  22. When Windows is not shut down properly (e.g. if the power is cut), files and file tables can be damaged.
    What two programs can be used to repair the file system? [2]
    1. chkdsk is used by DOS, Windows 3.1 and Windows NT/2000/XP.
    2. scandisk is used by Windows 9x.
  23. What is the purpose of a cache? [2]
  24. What are two reasons that memory performance is much faster than disk performance? [2]