subject

Write a program called tenthreads that uses 10 threads to increment a shared variable. each thread must loop 6 times, incrementing the shared variable by its thread id (tid) in every iteration of the loop. once a thread has finished looping, print the id of the thread saying “thread [id] has finished.” it is important to make use of mutexes so that only one thread is incrementing the shared variable at a time. output the value of the shared variable once all threads have finished incrementing it. before submission, make sure you clean up the directories so that no miscellaneous files are kept around in the submission. (grade would be deducted if useless files are found in the homework directories.) include the source code and the makefile in the submission.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:30
What is force? what are the types of force ? explain all with suitable examples
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Which factor is the most important when choosing a website host? whether customers will make secure transactions the number of email accounts provided the purpose of the website the quality of the host control panel
Answers: 3
question
Computers and Technology, 23.06.2019 15:30
Brian wants to conduct an online search with a certain phrase. he intends to use the words books that belong to the 1800s in his search. how should he use the word that in his search?
Answers: 1
question
Computers and Technology, 24.06.2019 06:30
Some peer-to-peer networks have a server and some don't. true false
Answers: 2
You know the right answer?
Write a program called tenthreads that uses 10 threads to increment a shared variable. each thread m...
Questions
question
History, 07.11.2019 12:31