Homework 7
Due: 11:59 PM, Wednesday, November 13, 2002

Your answers should be submitted as a nicely-formatted plain text file hw07.txt. Please use this filename!

  1. Tanenbaum, p. 374, Question 4. (1 point)
  2. Tanenbaum, p. 374, Question 10. (1 point)
  3. Tanenbaum, p. 375, Question 24. (1 point)
  4. Tanenbaum, p. 376, Question 25. (2 points)
  5. State three advantages of placing functionality in a device controller, rather than in the kernel. State three disadvantages. (2 points)
  6. Is disk scheduling, other than FCFS, useful in a single-user environment? Explain briefly. (1 point)
  7. Tanenbaum, p. 449, Question 2. (1 point)
  8. Tanenbaum, p. 450, Question 9. (1 point)
  9. Tanenbaum, p. 450, Question 14. Note: the answer to the previous question is that it takes 5.8 hours. (1 point)
  10. Tanenbaum, p. 450, Question 20. (1 point)
  11. Tanenbaum, p. 451, Question 27. (1 point)
  12. Tanenbaum, p. 452, Question 38. (1 point)
  13. Read the attached handout about the UNIX buffer cache from The Design of the UNIX Operating System (Bach, 1986, Prentice-Hall). Describe in a few paragraphs the main goals of the buffer cache and how they are accomplished. Take a look at the FreeBSD source code that implements the buffer cache, in /sys/kern/vfs_bio.c on any lab FreeBSD system, and include a few paragraphs describing the FreeBSD implementation. (4 points)
  14. Look at the man page for readdir(). Use the system calls shown there, write a simple C program called "ls2" that operates only on the current directory. Print as much interesting information about each file as you can. Turn this in as a file ls2.c. (2 points)