Lecture 14
Learning objectives
After this class, you should be able to:
- Optimize multicore code to make better use of the memory hierarchy by (i) reducing false sharing through better data distribution, (ii) making better use of multiple memory banks, and (iii) assigning threads to cores such that they make better use of shared or private cache.
Reading assignment
- Refer to documentation on the different methods mentioned for specifying thread-core affinity in the lecture 14 slides.
Exercises and review questions
- Exercises and review questions on current lecture's material
- Modify the OpenMP matrix-vector multiplication code of Lecture 3 to permit scheduling with different chunk sizes. Run the code using
taskset
with different affinities, different numbers of threads, and different chunk sizes. Report the configuration with optimal performance, and its performance, on the discussion board.- Preparation for the next lecture
- None.
Last modified: 24 Feb 2010