Skip to content

aethne0/kitchen-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kitchen-sync

Rust

Implementing RAII Mellor-Crummey-Scott lock, as well as others. Only implementing for linux atm.

Implementing some concurrency primitives that I find interesting. Based mostly on Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. These are just using spinning and thread::yield_now()/std::hint::spin_loop() atm, no OS features (eg Futex et al).

Partly learning because I wanted to contribute an optimization based on flat-combining to an open-source LSM tree I use but experienced too many skill issues. Flat-combining is very close to the implementation of the "List based queueing lock" ("MCSLock") described in the 1991 paper.

todo: can we just use stdlibs cross-platform futex wrapper? Futex is used for (basically) everything

        all(target_os = "windows", not(target_vendor = "win7")),
        target_os = "linux",
        target_os = "android",
        target_os = "freebsd",
        target_os = "openbsd",
        target_os = "motor",
        target_os = "dragonfly",
        all(target_family = "wasm", target_feature = "atomics"),
        target_os = "hermit",

About

implementing concurrency primitives to learn

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages