Question: USE C PLEASE. THE OUTPUT SHOULD LOOK LIKE THIS: Use Pthreads API to create 100 threads. For each thread Step1. Use Mutex Lock to protect
USE C PLEASE. 
THE OUTPUT SHOULD LOOK LIKE THIS:

Use Pthreads API to create 100 threads. For each thread Step1. Use Mutex Lock to protect PID manager, which can allocate PID for each thread. (PID range : 0 99) Step 2. Use Mutex Unlock after allocating PID. Step 3. Let thread sleep for 13 seconds. Step 4. When the thread wake up, using Mutex Lock to protect PID manager, which can release its PID. Step 5. Use Mutex Unlock after releasing PID. Step 6. Terminate the thread and Destroy the mutex
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
