CS 3733 Operating Systems Classroom Activity on Signals


  1. Log on to your Linux account.
  2. Run ~srobbins/cr3733 and log your progress on this activity.
  3. Make a directory called ch08.
  4. Download the USP Chapter 8 tar file from here.
  5. Untar the program into your ch08 directory.
  6. Execute convertlinux in this directory.
  7. Execute make in this directory.
  8. Execute:
         blocktest 100000000.
    The parameter is 100 million.
    If you use a value that is too small, there will be little time between the messages.
    This value will give you about 4 seconds between them using our current hardware.
    You can double this value if you want more time.
  9. Try pushing CTRL-C while the signal is blocked and while it is not.
  10. Modify blocktest.c so that it prints its process id when it starts.
  11. Run the program again, now sending the SIGINT signal from another terminal window.
         kill -INT pid
  12. Also try sending SIGTERM (the default) from another window while the signal is blocked. What happens?
  13. Modify blocktest.c so that it calls sigfillset instead of sigaddset.
  14. Again try sending SIGTERM from another window while the signal is blocked. What happens?
  15. Now try sending SIGKILL while the signal is blocked. What happens?