Problem
1. What are the structural changes that take place in memory when
(i) a file is opened twice
(ii) its descriptor is replicated? In how many ways can you replicate the descriptor?
2. Modify the program (Self-Test) so that process A creates B and B creates C. The summation should be performed in C and the result returned to B as the exit status. B should double the summed value and return the product to A as the exit status. Will the program work with large numbers?
3. Name two advantages waitpid has over wait. How do you use waitpid to emulate the behavior of wait?