Question: Use C programming language pls. (50%) Programming problem 4.20 from the 10th edition of the text with modifications Modify programming problem Exercise 3.20 from Chapter

 Use C programming language pls. (50%) Programming problem 4.20 from the10th edition of the text with modifications Modify programming problem Exercise 3.20

Use C programming language pls.

(50%) Programming problem 4.20 from the 10th edition of the text with modifications Modify programming problem Exercise 3.20 from Chapter 3.20. You will create a number of threads-for example, 100-and each thread will request a pid, sleep for a random period of time, and then release the pid. (Sleeping for a random period of time approximates the typical pid usage in which a pid is assigned to a new process, the process executes and then terminates, and the pid is released on the process's termination.) On UNIX and Linux systems, sleeping is accomplished through the sleep() function, which is passed an integer value representing the number of seconds to sleep. This problem will be modified in Chapter 7. Modifications: The number of threads to create as well as the maximum sleep time will be passed on the command line as . For example: ./a.out 100 15. This represents 100 threads, each with a random sleep time up to 15 seconds. (50%) Programming problem 4.20 from the 10th edition of the text with modifications Modify programming problem Exercise 3.20 from Chapter 3.20. You will create a number of threads-for example, 100-and each thread will request a pid, sleep for a random period of time, and then release the pid. (Sleeping for a random period of time approximates the typical pid usage in which a pid is assigned to a new process, the process executes and then terminates, and the pid is released on the process's termination.) On UNIX and Linux systems, sleeping is accomplished through the sleep() function, which is passed an integer value representing the number of seconds to sleep. This problem will be modified in Chapter 7. Modifications: The number of threads to create as well as the maximum sleep time will be passed on the command line as . For example: ./a.out 100 15. This represents 100 threads, each with a random sleep time up to 15 seconds

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!