False sharing¶
Diagnose performance loss when independent data accessed by different processors occupy one coherence block, so writes trigger invalidation, transfer, and reload traffic as though the data were logically shared.
Core Idea¶
False sharing is a performance pathology in a coherent shared-memory system where different processors or threads access logically independent data objects that reside in the same coherence block, and at least one access stream writes. The coherence mechanism tracks ownership and validity at block granularity, not field granularity, so a write to one object can invalidate or transfer the block containing another processor's object. The resulting communication resembles true sharing even though the program does not exchange the affected logical value.
Scope of Application¶
The abstraction is literal wherever practitioners can identify the same constitutive roles, apply the same boundary tests, and obtain the same kind of output. The following habitats are uses of False sharing itself, not metaphors based only on resemblance.
- Shared counters. Separating per-thread updates that would otherwise occupy one line.
- Queues and ring buffers. Keeping independently written producer and consumer indices off a common coherence block.
- Parallel arrays. Reorganizing fields or chunks so ownership follows the access partition.
- Runtime allocators. Aligning thread-local metadata and preventing adjacent allocations from colliding at line granularity.
- Compiler transformations. Grouping data by accessing processor or splitting falsely shared fields.
- Performance analysis. Using scaling curves and cache-to-cache transfer evidence to distinguish the pathology.
Clarity¶
A clear account of False sharing must preserve the recognition invariant stated in the Core Idea rather than rely on the title alone. Name the architecture, coherence unit, field addresses, access pattern, and thread placement. Demonstrate that contending accesses target different logical objects within the same block. Separate writes from reads and true sharing from false sharing. Use counters or traces appropriate to the processor rather than treating one event name as universal.
Manages Complexity¶
False sharing manages complexity by replacing a diffuse field of observations or possible operations with a bounded role structure: coherence block supplies a cache line or other protocol unit is the smallest ownership and invalidation granularity.; independent data objects supplies distinct logical variables share physical placement without sharing program meaning.; multiple processors supplies separate cores or participants cache or request the common block.; write stream supplies at least one participant modifies its object and changes coherence ownership.; invalidation or transfer supplies the protocol moves or invalidates the whole block rather than the written field..
Abstract Reasoning¶
- Confirm that the workload loses throughput or gains latency as relevant threads spread across cores. 2. Map hot memory accesses to virtual and physical fields with their byte offsets. 3. Group addresses by the actual coherence block size. 4. Identify lines written by one participant and accessed through a different field by another. 5. Inspect cache-to-cache, invalidation, ownership, and stall evidence where the platform exposes it.
Knowledge Transfer¶
The strict upward abstraction is Interference And Contention. False Sharing instantiates Interference and Contention because independently useful updates are coupled through a shared hardware bottleneck and each participant's progress imposes avoidable service cost on the others. Within cache coherence performance pathologies, the full mechanism transfers literally when the same roles and boundary tests recur. Beyond that domain, only the parent-level skeleton should travel. Reusing the label False sharing after removing its constitutive vocabulary would hide a change of mechanism behind an analogy. The honest transfer rule is therefore two-stage: recognize the domain-specific pattern first, then lift only the parent relation that remains invariant under a substrate change.
Relationships to Other Abstractions¶
Current abstraction False sharing Domain-specific
Parents (1) — more general patterns this builds on
-
False sharing is a kind of Interference and Contention Prime
False Sharing instantiates Interference and Contention because independently useful updates are coupled through a shared hardware bottleneck and each participant's progress imposes avoidable service cost on the others.
Hierarchy paths (3) — routes to 2 parentless roots
- False sharing → Interference and Contention → Constraint
- False sharing → Interference and Contention → Concurrency
- False sharing → Interference and Contention → Scarcity → Constraint
Neighborhood in Abstraction Space¶
False sharing sits in a sparse region of the domain-specific corpus (92nd percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.
Family — Unclustered & Miscellaneous (1565 abstractions)
Nearest neighbors
- Cache coherence — 0.84
- Cache Inclusion Policy — 0.79
- Firefly (cache coherence protocol) — 0.79
- CPU cache — 0.78
- Cache hierarchy — 0.77
Computed from structural-signature embeddings · 2026-09-08