Question: 1) SOLUTION 3 What's wrong with it? Explain using a specific execution example and show the problem. 2)SOLUTION 4 creates only one child. Update the

1) SOLUTION 3 What's wrong with it? Explain using a specific execution example and show the problem.

2)SOLUTION 4 creates only one child. Update the code so the parent creates the "MAX" number of children, and the parent has to wait for all children. We assume the 'MAX' has been defined, int done has been initialized to be 0, and you only need to take care of the portion of codes in between 'lock' and 'unlock' for both 'main' and 'child'. [NOTE: You are not allowed to use pthread_join.]

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!