Lecture 17
Learning objectives
After this class, you should be able to:
- Explain how race conditions in multi-threaded programs can lead to incorrect results.
- Use atomic operations to write correct code that avoids race conditions.
Reading assignment
- UIUC Lecture 17.
Exercises and review questions
- Exercises and review questions on current lecture's material
- Write code for histogramming without atomic operations and experiment with it to find out the fraction of times that it gives incorrect results. Report your results on the discussion forum.
- Rewrite the above code so that it uses atomic operations, and compare its performance with that above. Report your results on the discussion board.
- Preparation for the next lecture
- None.
Last modified: 19 Mar 2015