Delegation with Trust<T>: A Scalable, Type- and Memory-Safe Alternative to Locks
Noaman AhmadBen BaenenCCChen ChenJakob Eriksson
Noaman Ahmad
Ben Baenen
CCChen Chen
Jakob Eriksson
+4
Trust<T> is a type- and memory-safe alternative to locks for concurrent programs. Instead of synchronizing access with a lock, the programmer places an object in Trust<T>, making it inaccessible except through a designated trustee thread that applies requested operations via the API. This delegation-based approach avoids the per-lock throughput limit; per-object throughput depends on the trustee's capacity, which is typically much higher. In high-contention microbenchmarks, Trust<T> achieves up to 22x higher throughput than locks, and 5-9x in key-value stores and memcached, while remaining competitive even without contention.

arXiv ·
· August 20, 2024