Part 1:
Write an empty C program, empty.c. Then, create a copy of this program called part1.c and add
exactly four system calls to the program. You will not receive points if the program contains more or
fewer than four. The system calls available to your machine can be found within
/usr/include/unistd.h. Further, you can use the command line tool, strace, to intercept and
record the system calls called by a process.
To confirm you have added the correct number of system calls, execute the following commands:
$ gcc -o empty.x empty.c
$ strace -o empty.trace ./empty.x
$ gcc -o part1.x part1.c
$ strace -o part1.trace ./part1.x
To reduce the length of the output from strace, try to minimize the use of other function calls (e.g.
stdlib.h) in your program.
Note: Using strace on an empty C program will produce a number of system calls, so when using
strace on your Part 1 code, it should produce 4 more system calls than that.
Submit empty.c, emtpy.trace, part1.c, and part1.trace.