Locking in WebKit | WebKit
We recently replaced all spinlocks, OS-provided mutexes, and condition variables in WebKit with the new WTF::Lock and WTF::Condition — these new primitives have some cool properties.
Locking in WebKit May 6, 2016 by Filip Pizlo @filpizlo Back in August 2015 we replaced all spinlocks and OS-provided mutexes in WebKit with the new WTF::Lock (WTF stands for Web Template Framework). We also replaced all OS-provided condition variables with WTF::Condition . These new primitives have some cool properties: WTF::Lock and WTF::Condition only require one byte of storage each. WTF::Lock only needs two bits in that byte. The small size encourages using huge numbers of very fine-grained locks. OS mutexes often require 64 bytes or more. The small size of WTF::Lock means that there’
saved by
related reading
- Concurrency Patterns in Embedded Rust - Ferrous Systemsferrous-systems.com
- Let futures be futureswithout.boats
- Spinlocks Considered Harmfulmatklad.github.io
- Measuring Mutexes, Spinlocks and how Bad the Linux Scheduler Really is | Probably Danceprobablydance.com
- Unreliable Guide To Locking — The Linux Kernel documentationdocs.kernel.org
- abseil / Performance Hintsabseil.io
- Introduction to Wait-free Algorithms in C++ Programming - Daniel Anderson - CppCon 2024youtube.com
- How to do distributed locking - Martin Kleppmann's blogmartin.kleppmann.com
- A Concurrency Cost Hierarchytravisdowns.github.io
- Speculation in JavaScriptCore | WebKitwebkit.org
- sync package - sync - Go Packagespkg.go.dev
- What is the difference between PBFT, Tendermint, HotStuff, and HotStuff-2?decentralizedthoughts.github.io