Please help me Write a C (or C++) program that creates multiple threads, and the
ID: 3629046 • Letter: P
Question
Please help me Write a C (or C++) program that creates multiple threads, and then terminates after a specified interval. Each of these threads executes a predefined work function. Threads can be created by using the pthread_create system call. (I need to use the function by using the "man" capability in Linux). The number of threads to be created and a run time are passed as command line arguments. (For example "mythread 3 15" would create 3 threads and keep running for 15 seconds.) The output of each newly created thread should display the number of the thread that is executing the function. (For this, I will need to pass the thread number to the new thread through pthread_create( ) function.)Explanation / Answer
man capability is for terminate the process in linux
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.