liveBook · Manning

Processor affinity

Processor affinity is a scheduling constraint that restricts a process or thread to one or more specified processors or CPU cores.

How 2 Manning books explain it

Latency

Processor affinity is a scheduling constraint that binds a thread or process to one or more specified processors or CPU cores.

How it is used
Uses CPU placement to reduce migration, cache, scheduling, and NUMA-related latency in task-parallel and low-latency applications.
How deep it goes
Explains affinity’s cache and NUMA rationale and names POSIX configuration, but stops short of API usage details or measurement procedures.
Examples
Uses POSIX pthread_setaffinity_np(), reserved CPUs, background daemons, kernel threads, and interrupts as implementation examples.
What you can do after
Operate/configure application threads on selected CPUs and reason about the latency trade-offs of tighter scheduling placement.

Read how Latency explains processor affinity →

Quantization and Fast Inference

CPU affinity is a policy or mechanism that restricts a process or thread to specified processor units.

How it is used
Uses CPU pinning experiments to assess how thread placement affects inference throughput.
How deep it goes
Measures specific pinning outcomes and relates them to SMT sibling use and cache contention.
Examples
Compares pinned placements on an 11-core, 22-vCPU host, reporting throughput of 15.63 and 9.98 tok/s.
What you can do after
Evaluate how CPU placement choices affect throughput when threads use physical cores and SMT siblings.

Read how Quantization and Fast Inference explains processor affinity →

Also covered in

What to know first

Related concepts

Questions about processor affinity

What is processor affinity?

Processor affinity is a scheduling constraint that restricts a process or thread to one or more specified processors or CPU cores.

Which Manning books explain processor affinity?

Latency and Quantization and Fast Inference.

What should I know before learning processor affinity?

Manning books that teach processor affinity usually introduce thread and CPU first.

What is the difference between processor affinity and thread priority?

Processor affinity is a scheduling constraint that restricts a process or thread to one or more specified processors or CPU cores. Thread priority is a scheduling attribute that influences a thread’s relative eligibility for execution time.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.