Todos los libros

Profesional

Apps Acerca de Coach Iniciar sesión Empezar a leer

Quantitative Finance · Glosario

¿Qué es Priority inversion?

Definition 11.7 Low-Latency Software · Capítulo 11 — Lock-Free Programming

Priority inversion occurs when a high-priority thread waits for a resource held by a low-priority thread that cannot run because medium-priority threads take its processor; the high-priority thread is effectively demoted below the medium ones.

One to four threads counting a million events each into a shared counter protected by a mutex, updated by a CAS loop or by fetch_add, or into padded per-thread counters summed at the end. Only the design that shares nothing scales. Measured on a laptop (Intel Core Ultra 7 155H) under WSL2, no isolated cores, threads unpinned. Data: bench_lockfree.py.
Figure 11.3. One to four threads counting a million events each into a shared counter protected by a mutex, updated by a CAS loop or by fetch_add, or into padded per-thread counters summed at the end. Only the design that shares nothing scales. Measured on a laptop (Intel Core Ultra 7 155H) under WSL2, no isolated cores, threads unpinned. Data: bench_lockfree.py.
Leer en el capítulo →