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!
- Tanenbaum, p. 374, Question 4. (1 point)
- Tanenbaum, p. 374, Question 10. (1 point)
- Tanenbaum, p. 375, Question 24. (1 point)
- Tanenbaum, p. 376, Question 25. (2 points)
- State three advantages of placing functionality in a device
controller, rather than in the kernel. State three disadvantages. (2
points)
- Is disk scheduling, other than FCFS, useful in a single-user
environment? Explain briefly. (1 point)
- Tanenbaum, p. 449, Question 2. (1 point)
- Tanenbaum, p. 450, Question 9. (1 point)
- Tanenbaum, p. 450, Question 14. Note: the answer to the
previous question is that it takes 5.8 hours. (1 point)
- Tanenbaum, p. 450, Question 20. (1 point)
- Tanenbaum, p. 451, Question 27. (1 point)
- Tanenbaum, p. 452, Question 38. (1 point)
- 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)
- 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)