Howdy Class -- Here is the third homework assignment. If you are taking the class for elective credit in the CS Major, do all the problems -- Parts I and II. If you are taking the class for credit, but not as an elective in the CS Major, just do the first set of problems -- the ones for the Nemeth book -- Part I. The problems are due midnight Friday, April 18. I prefer that you just fill out the answers in a copy of this e-mail and send it to me by e-mail. Many of these problems can be answered well with just a sentence or two. Some require a bit of thought, and some extra wording. Use good judgement. That's a part of what I will be grading you on. Answers that offer inadequate information and/or aid to understanding will receive little credit, even if technically correct. Remember that the point of these exercises is for you to demonstrate that you have read and understood the material. Therefore always give the "textbook" answer (Nemeth or Daemon, as the case may be) along with any individual opinions or answers that you want to put forward. -- john ////////////////////////////////////////////////// PART I: Homework #3 Problems for Nemeth Chapter 14: TCP/IP and Routing Chapter 25: Printing and Imaging ////////////////////////////////////////////////// /////////////////////////////////////////////////////////// Questions on Chapter 14 of Nemeth -- TCP/IP and Routing /////////////////////////////////////////////////////////// ----------------------------------------------------------------- 1. In the context of TCP/IP networking, what is routing and what are routers? For example, what essentially is the kind of decision that a router has to make, and what essentially distinguishes a host that needs to do non-trivial routing from a host that needs only to do trivial routing? ----------------------------------------------------------------- 2. Explain in simple terms what actually happens when a host makes an ARP request. ----------------------------------------------------------------- 3. You do a ping, and this is what happens: % ping ishi PING ishi.csustan.edu: 56 data bytes ^C ----ishi.csustan.edu PING Statistics---- 11 packets transmitted, 0 packets received, 100% packet loss What is the probable explanation of this 100% packet loss? Why did it happen? ----------------------------------------------------------------- /////////////////////////////////////////////////////////// Questions on Chapter 25 of Nemeth -- Printing and Imaging /////////////////////////////////////////////////////////// ----------------------------------------------------------------- 4. Describe how lpr and lpd cooperate to print a file. Which process does what, and when and where? Give details. ----------------------------------------------------------------- ///////////////////////////////////////////////////////////////// PART II: Homework #2 Problems for The Kernel (Daemon) Book. Chapter 04: Process Management ///////////////////////////////////////////////////////////////// ////////////////////////////////// Chapter 05 -- Memory Management ////////////////////////////////// ----------------------------------------------------------------- 1. What is copy-on-write? In most UNIX applications, the fork system call is followed almost immediately by an exec system call. Why does this behavior make it particularly attractive to use copy-on-write in implementing fork? ----------------------------------------------------------------- 2. When a 4.4BSD process gets a page fault, what is the data structure that gets searched, and how does the kernel know whether the page fault was caused by a valid page not resident or an invalid page? ----------------------------------------------------------------- 3. Describe the main sequence of events that occurs when a 4.4BSD process exits. ----------------------------------------------------------------- 4. A shadow object S used by a process P is typically sparsely populated: S may cover a large range of pages, yet the backing store for S contains only pages that have been modified by P *and* chosen for replacement by the pagedaemon. Probably there will be few such pages, but there *could* be a great many. In addition, the existence of long chains of shadow objects in P's vmspace structure may mean that numerous pager queries will have to be done to locate the correct copy of an object page while servicing a page fault. The facts above demonstrate that the swap pager for 4.4BSD had to be designed with special attention to the problem of providing efficient swap-space allocation for sparsely populated objects and to providing efficient page lookup. Describe the aspects of the actual design that solved the problem. -----------------------------------------------------------------