Multicore placement and locality

See why a waiting task cannot always move to an idle CPU, and how masks, cold caches, push and pull, and a remote memory node decide where work should run. Advanced scheduling · Operating systems.

CPU 0 holds four tasks and CPU 1 is idle. Moving one looks free, but a mask can forbid it, a cold cache can cost more than the wait saves, and the other CPU may be far from the task's memory.

What you will learn

  • Place a task under a hard affinity mask and weigh the wait a move saves against the work a cold cache costs
  • Compare push and pull, and balance load instead of task counts
  • Explain why an idle CPU on another memory node can be a worse place

Lesson outline

  1. One queue for each CPU
  2. What a move costs
  3. Push and pull
  4. Equal counts, unequal load
  5. Memory on another node

15 minutes · 4 scenes · 0 predict checks · 12 quiz questions

The full lesson is available with Premium.