Programming Homework Help

Florida State College at Jacksonville Write a Program Computer Programming Task

Get Your Custom Essay Written From Scratch
We have worked on a similar problem. If you need help click order now button and submit your assignment instructions.
Just from $13/Page
Order Now

Thread activity

  • Write a program that uses 5 threads. Initialize a shared variable with a value of 100.
  • Each thread must add its Thread ID (tid) to the shared variable.
  • Once a thread has done the addition, print the ID of the thread.
  • 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.