Assignment 2 (Replacement)

Total of 50 marks. Two hours. Answer the following questions on paper, based on lectures 4 and 5. Show your work for any calculations.

Treat this assignment as an open-book individual exam. You may consult any of your class notes or other books or documents, paper or electronic. However, you may NOT discuss questions or share answers with any other person until after the assignment is due.

  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]
    1. when memory space is too small for all scheduled processes? (two techniques)
    2. to reduce the number of disk accesses? (two techniques)
  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]
    1. How many pages can a segment have?
    2. What is the page size?
    3. How many segments can be addressed?
  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
    2. tracks
    3. sectors per cluster
    4. sectors per 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. .
    2. ..
    3. /
  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?
    2. How could you remove the need to do this if you want to run the program more than once?
    3. How could you run the program every time the computer starts?
  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]