Question: Write a C program for each of the following system calls ( one per call ) which uses the call in a normal matter. Make

Write a C program for each of the following system calls (one per call) which uses the call in a normal matter. Make sure that your program compiles and executes without error. Show your program listings with comments and corresponding output. Run the "strace" program and provide (only) the output for your system calls. Do not upload source code, but provide the above as text within your PDF.
Please check for, and report, any errors. Terminate execution on error (do not continue running if a call fails).
a) time
b) fork
c) sched_getaffinity
The last one is a bit tricky. The man page has a lot of useful information on the parameters. The cpu_set_t is an opaque type: You are not meant to manipulate it directly. There are macros in sched.h which will set/clear/test members of the set. The man page for CPU_SET(3) describes these. Of particular interest is CPU_ISSET.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!