(Last Revision -- 03/16/99) 03/16/99 -- changed due date from 03/15 to 03/18 Howdy CS 4750 Class -- Here is the first homework assignment. The problems are due midnight Thursday, March 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 Vahalia, as the case may be) along with any individual opinions or answers that you want to put forward. -- john ////////////////////////////////////////////////// PART I: Homework #1 Problems for Nemeth Chapter 31: Daemons Chapter 06: Adding New Users Chapter 03: Rootly Powers Chapter 04: The Filesystem Chapter 05: Controlling Processes Chapter 11: Backups Chapter 26: Disk Space Management ////////////////////////////////////////////////// ////////////////////////////////////////////////// Questions on Chapter 31 of Nemeth -- Daemons ////////////////////////////////////////////////// ----------------------------------------------------------------- What was the need that resulted in the development of inetd? ----------------------------------------------------------------- What does update do? ----------------------------------------------------------------- What does rwhod do? ----------------------------------------------------------------- /////////////////////////////////////////////////////// Questions on Chapter 06 of Nemeth -- Adding New Users /////////////////////////////////////////////////////// ----------------------------------------------------------------- Name and explain the purpose of each of the fields in a Unix passwd file. ----------------------------------------------------------------- What is the name of the special BSD program for editing the passwd file? Why is it needed? ----------------------------------------------------------------- What is the purpose of the /etc/group file? ----------------------------------------------------------------- What should you do to verify an account you create? ----------------------------------------------------------------- //////////////////////////////////////////////////// Questions on Chapter 03 of Nemeth -- Rootly Powers. //////////////////////////////////////////////////// ----------------------------------------------------------------- How does Unix keep track of the ownership and group of each file? What is the role in this scheme of the passwd and group files? ----------------------------------------------------------------- When placing the names of commands that users are authorized to execute in /etc/sudoers, why is it very important always to enter the *absolute* pathnames of the commands? ----------------------------------------------------------------- Describe several advantages to using the sudo command. Describe a couple of disadvantages. ----------------------------------------------------------------- ///////////////////////////////////////////////////// Questions on Chapter 04 of Nemeth -- The Filesystem ///////////////////////////////////////////////////// ----------------------------------------------------------------- Explain the difference between a hard link and a soft link. ----------------------------------------------------------------- Suppose the directory bar has owner root, group wheel, and permission bits rwxrwx---, and that bar contains a file named baz with owner jill, group wheel, and permissions rw-r--r--. Suppose that user craig is a member of group wheel. Can user craig delete baz? Why or why not? ----------------------------------------------------------------- What umask command would remove no permissions from the owner, take away write and execute permission from the group, and take away read and write permissions from others? ----------------------------------------------------------------- If you do an ls -lg and the user and/or group fields of the file are displayed as numbers, what kinds of things would be the likely causes? ----------------------------------------------------------------- /////////////////////////////////////////////////////////// Questions on Chapter 05 of Nemeth -- Controlling Processes /////////////////////////////////////////////////////////// ----------------------------------------------------------------- What command would you use from the keyboard to send a SIGHUP signal to the init process? ----------------------------------------------------------------- What is the meaning of the "STAT" column in the output of ps -aux? What are the values that can appear in this column, and what do the values mean? ----------------------------------------------------------------- If you find a process on the system that is using a very large percentage of the CPU time, and it seems suspicious, what should you do about it? ----------------------------------------------------------------- /////////////////////////////////////////////////////////// Questions on Chapter 11 of Nemeth -- Backups /////////////////////////////////////////////////////////// ----------------------------------------------------------------- In Nemeth's discussion, what is the second-best technology for doing backups? Why? ----------------------------------------------------------------- Fill in the blank: A level N dump backs up all files that have changed since _________________________. ----------------------------------------------------------------- Based on Nemeth's discussion of the criteria for choosing a dump schedule, what kinds of installations would you say will want/need to do very frequent backups, and what kind will want/need to do only infrequent backups? ----------------------------------------------------------------- What can be done to "verify" dump tapes? Describe at least two different procedures that are worthwhile. ----------------------------------------------------------------- /////////////////////////////////////////////////////////// Questions on Chapter 26 of Nemeth -- Disk Space Management /////////////////////////////////////////////////////////// ----------------------------------------------------------------- How should a system administrator go about persuading users to keep their disk usage down to a reasonable level? ----------------------------------------------------------------- Describe two important disadvantages of the use of quotas. ----------------------------------------------------------------- Describe what kinds of actions you might take to care for a filesystem that is "overflowing". ----------------------------------------------------------------- ///////////////////////////////////////////////////////////////// PART II: Homework #1 Problems for The Kernel (Vahalia) Book. Chapter 01: Introduction Chapter 02: The Process and the Kernel Chapter 03: Threads and Lightweight Processes ///////////////////////////////////////////////////////////////// //////////////////////////////////////// Chapter 2 -- The Process and the Kernel //////////////////////////////////////// ----------------------------------------------------------------- Problem 2.3: How does the kernel know which system call has been made? How does it access the arguments to the call(which are on the user stack)? ----------------------------------------------------------------- Problem 2.10: When a resource becomes available, the wakeup() routine wakes up all processes blocked on it. What are the drawbacks of this approach? What are the alternatives? ----------------------------------------------------------------- /////////////////////////////////////////////// Chapter 3 -- Threads and Lightweight Processes /////////////////////////////////////////////// ----------------------------------------------------------------- Problem 3.1: For each of the following applications, discuss the suitability of lightweight processes, user threads, or other programming models: (a) The server component of a distributed name service, (b) A windowing system, such as the X server (c) A scientific application that runs on a multiprocessor and performs many parallel computations, (d) A "make" utility that compiles files in parallel whenever possible. ----------------------------------------------------------------- Problem 3.8: The standard library defines a per-process variable called errno, which contains the error status from the last system call. What problems does this create for a multithreaded process? How can these problems be solved? -----------------------------------------------------------------