Where do processes, threads, and memory allocations get assigned?

If memory were completely uniform, there would be no need to worry about questions like "where do processes go?". Only for NUMA is the placement of processes/threads and allocated memory (NUMA control) of any importance.

The default NUMA control is set through policy. The policy is applied whenever a process is executed, or a thread is forked, or memory is allocated. These are all events that are directed from within the kernel.

  • NUMA control is managed by the kernel.
  • NUMA control can be changed with numactl.
Process Affinity and Memory Policy

One would like to set the affinity of a process for a certain socket or core, and the allocation of data in memory relative to a socket or core.

  • Individual users can alter kernel policies (setting Process Affinity and Memory Policy == PAMPer)
    • users can PAMPer their own processes
    • root can PAMPer any process
    • careful, libraries may PAMPer, too!
  • Means by which Process Affinity and Memory Policy can be changed:
    • dynamically on a running process (knowing process id)
    • at start of process execution (with wrapper command)
    • within program through F90/C API
 
©  |   Cornell University    |   Center for Advanced Computing    |   Copyright Statement    |   Inclusivity Statement