Assignment 2 (Replacement) Solution

  1. Write the full UNIX command that could be used to find the ID numbers of all running processes.
    How could you find information about running processes in Windows? [4]
  2. Why are Windows NT-based operating systems generally more stable than Windows 95-based operating systems? [2]
  3. What memory management technique eliminates external fragmentation? Internal fragmentation? [2]
  4. When is garbage collection of main memory most important? [1]
  5. Memory accesses are much faster than disk accesses, but memory capacity is much smaller than disk capacity. 
    Based on these two principles, what techniques do operating systems use [4]
  6. What is the advantage of using large pages? small pages? [2]
  7. What causes fragmentation? [2]
  8. A 32-bit address is divided into a 14-bit segment number, an 8-bit page number and a 10-bit displacement. [3]
  9. What methods would an operating system likely use to select a page table entry to remove from a cache when it becomes full? [2]
  10. What is one benefit and one cost of disk compression? [2]
  11. What is the purpose of the Windows scandisk program? [2]
  12. A 4 GB hard disk has 0.5 KB per sector, 1,000,000 clusters, 2,000 cylinders and 8 double-sided platters. Calculate the following numbers. Approximations are acceptable. [4]
    1. sectors
      • 4 GB / 0.5 KB/sector = 8,000,000 sectors
    2. tracks
      • 2000 cylinders x 16 heads = 32,000 tracks
    3. sectors per cluster
      • 8,000,000 sectors / 1,000,000 clusters = 8 sectors/cluster
    4. sectors per track
      • 8,000,000 sectors / 32,000 tracks = 250 sectors/track
  13. What are some important file types in Windows and UNIX, and how can you determine what type of files are in the current directory in each system? [6]
  14. Name the following directories in a UNIX system. [3]
    1. .
      • current
    2. ..
      • parent
    3. /
      • root
  15. You have correctly installed a program on your computer, and you want to run it by typing the program name at the MS-DOS command prompt, but you receive an error message "bad command or filename". [3]
    1. What would you need to type to get the program to run from the DOS prompt?
      • the full path name of the program
    2. How could you remove the need to do this if you want to run the program more than once?
      • add the program's directory to the search path (the PATH environmental variable)
    3. How could you run the program every time the computer starts?
      • add the program to the autoexec.bat file or add the directory to the search path and put a shortcut in the startup folder
  16. Compare the way Windows and UNIX allow you to add and access different disks. [4]
  17. Compare the way Windows and UNIX store and access pieces of files. [4]