1.Briefly describe the semantics of the following Unix system calls:

a)fork( );
b)exit( );
c)getpid( );
d)getppid( );
e)wait( );
f)execl( );

Write a C program that uses each of the above system calls at least once. Show your program listing with comments and corresponding output. Make sure that your program compiles and executes without error.

3.Write a small C program that copies data from a file A to a file B byte_by_byte. For different file sizes 1MB - 128MB (doubling the file size in each step) record the time your program requires to complete the file copy when using read() and write() system calls. Generate a graph that depicts the program performance. Repeat this experiment, but instead of copying individual bytes, use larger size portions of the file that are copied in each read() and write() system call. For instance, you may choose to copy the file in chunks of 2, 4, 8, , 1024 byte units. Generate a performance graph and interpret your experimental results. What do you observe? Why do you think the system shows the observed behavior? For this program it is imperative that file A and file B are located on the local disk. On Linux, the \tmp directory is located on the local file system. More about this in class!! You must submit your program, the graphs of the corresponding experiments, and your analysis.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.