Starting from:
$35

$29

HW #4. Processes, Threads & Race Conditions Solution

actual interleaved execution order of the various threads. Insert nanosleep() commands into your thread code to induce as many race conditions as possible by forcing an (in)appropriate interleaved execution sequence. That is, the final value of the global counter printed out by main after the threads complete should be as far away from 100 as possible! As your program executes, it will produce a trace of output from each thread showing the actual interleaved order of execution – annotate this output clearly and completely to explain exactly how and where the race conditions are occurring during execution. Implement your solution using Pthreads on Linux


What to submit:
    1. Please copy-n-paste program output and annotate this output as describe above.

    2. Please fill in readme.txt file given.

    3. Push all completed code to your given repository by the deadline.


How to submit:

    • To submit your work please do the following: o git add .

o git commit -m “message” o git push

More products