Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Quantitative Finance · Glosarium

Apa itu False sharing?

Definition 3.5 Low-Latency Software · Bab 3 — Memory Hierarchy and Caches

False sharing occurs when two cores repeatedly write different variables that lie in the same cache line: neither shares data with the other, yet every write invalidates the other core’s copy and the line travels between them.

False sharing: two threads, pinned to two CPUs, each incrementing its own atomic counter 20 million times, with the counters on one cache line or on two. Measured on a laptop (Intel Core Ultra 7 155H) under WSL2, no isolated cores. Data: bench_mem.py.
Figure 3.3. False sharing: two threads, pinned to two CPUs, each incrementing its own atomic counter 20 million times, with the counters on one cache line or on two. Measured on a laptop (Intel Core Ultra 7 155H) under WSL2, no isolated cores. Data: bench_mem.py.
Baca dalam konteks →