2 years ago
#58756
Yagizhan
Operating System: Its beggining the my lecture but I couldn't write what was asked of me
Write a program in which a global variable count is initialized to 0. Then, create two threads. In both threads, let there be a loop from 1 to N, and increment count in the loop. Try to see if count is equal to 2N for various values of N (e.g. N=10,000). For each N, you should run your program multiple times.
Comment on your results.
binary
pthreads
mutex
deadlock
binary-semaphore
0 Answers
Your Answer