Computer
Systems

Spring 2013
course
navigation

Apr 18

Look at, compile, and run some of the examples from the textbook code from chapter 8, which is at
Note that all the code in there needs csapp.c and csapp.h in src/ and include/ respectively ... or we re-write and search the docs to find out which C standard include files are needed.
See for example alarm2.c (attached) without the csapp stuff.
alarm.c shellex.c sigint1.c signal1.c # queing issues with signals signal2.c signal3.c signal4.c procmask1.c # race conditions procmask2.c
... and any others that strike our fancy. (Fork bombs, anyone?)
I've posted an assignment for next week on this stuff.

If time allows, also look at practice problems 8.5, 8.6, 8.7 (they all go together): write a program snooze.c that takes a command line argument and the reports on how long until the user types control-C .
$ ./snooze 10 Slept for 3 of 10 seconds. # user typed control-C
(The answers to all three are in the text ... though it will as usual here take some reading of docs to figure out which .h files we need to include.)
http://cs.marlboro.edu/ courses/ spring2013/systems/ notes/ Apr_18
last modified Thursday April 18 2013 1:39 am EDT

attachments [paper clip]

     name last modified size
[COD]alarm2.c Apr 18 2013 1:39 am 843B