Date: Mon, 02 Dec 1996 15:06:16 GMT Server: NCSA/1.4.2 Content-type: text/html
Please note that this is an individual assignment. You should do your own measurements and turn in your own results, although this certainly doesn't mean that you cannot discuss with others what you are doing. In the project, you may work in groups of two or three.
We mentioned in class that system calls take much more time than regular procedure calls. Show that this is the case by timing how long system calls take to execute as opposed to procedure calls. You will need to use the standard UNIX timing facility gettimeofday(). The UNIX timer only has a granularity of about 10ms, so you will need to execute each timed operation a large number of times in order to get accurate results. The system call getpid() is extremely simple, and so would be a good candidate for measurement. Remember to factor out any timing overhead that you may introduce.
Use the timing mechanism that you built for part 1 to time how long it takes for create and destroy a UNIX process using the fork(), exit() system calls.
You might find the following man pages helpful: