NEXT UP previous
Next: Answers

Exercises

  1. Modify the chat program you wrote in the exercises at the end of the socket library case study to use the select() system call to work out when there is something for it to do, rather than repeatedly polling around all of the open socket descriptors to find out if any of them is ready to be read().

  2. Implement your own version of the standard date command which displays the current wall clock date and time in a suitable format.

  3. Implement your own version of the standard time command which takes another command and parameters as its own command line arguments, executes the given command, and then displays the kernel and user times used by the controlled command during its execution.

  4. Write a pair of simple commands which can be set up as setuid root and which will allow ordinary users to mount and unmount a floppy disk at a fixed point in the directory hierachy (say /floppy).

NEXT UP previous
Next: Answers