Priodomainslib: Prioritized Fine-grained Parallelism for Multicore OCaml
summary
Priodomainslib extends Domainslib with a priority-aware work-stealing scheduler, a priority-aware mutex wrapper that implements the priority protection protocol, and an API where async accepts an optional priority and existing Domainslib code runs unchanged at a single priority. Prototype is a fork with microbenchmarks and a 300-line web‑server demo. Current overhead is nontrivial: Domainslib shows ~2.5x speedup vs Priodomainslib’s ~1.75x on Fibonacci (4 cores), so more engineering remains.
AI-written summary · about
chapters (10)
- 0:00Prioritized fine-grained parallelism
- 2:25PRIodomainslib extension
- 4:30API design and examples
- 8:22Mutexes and priority inversion
- 11:15Priority ceilings in web server
- 13:03PRIodomainslib scheduler design
- 15:52Implementation and benchmarks
- 17:36OCaml runtime limitations
- 18:40Priority protocols and future work
- 19:00Q&A
related talks
23mParallel Sequences in Multicore OCaml
40mWhen magic meets multicore - OCaml and its elegant era of parallelism
25mResponsive Parallelism with Synchronization
34mFrom OCaml 4 to 5 and from Parmap to Effects: A legacy code transition story
14mExecution domains in GHC/Haskell (Lightning Talk)
35mAutomatic Parallelism Management
15mThread-modular Analysis of Release-Acquire Concurrency
46mMulti-Priority Graph-Based Parallel Execution Using Taskflow
