<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/solaris-turnstiles-rdmsr-izapzkptm" -->

---
title: Solaris Turnstiles — RDMSR | daily.dev
description: An examination of Solaris' turnstile mechanism, a data structure used to implement priority inheritance for blocking mutexes in kernels. It explains why...
canonical: https://daily.dev/posts/solaris-turnstiles-rdmsr-izapzkptm
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Solaris Turnstiles — RDMSR | daily.dev
og:description: An examination of Solaris' turnstile mechanism, a data structure used to implement priority inheritance for blocking mutexes in kernels. It explains why...
og:url: https://daily.dev/posts/solaris-turnstiles-rdmsr-izapzkptm
og:image: https://api.daily.dev/og/posts/IZaPzkPtm.png
og:image:alt: Solaris Turnstiles — RDMSR
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Solaris Turnstiles — RDMSR

**[Lobsters](https://daily.dev/sources/lobsters)** · 9 min read · 0 upvotes · 0 comments

## Summary

An examination of Solaris' turnstile mechanism, a data structure used to implement priority inheritance for blocking mutexes in kernels. It explains why blocking mutexes need compact bookkeeping and how priority inversion arises, then details how turnstiles solve multi-hop priority inheritance by letting threads donate per-thread turnstile structures to contended locks, located via a hash table keyed on lock address. It also covers limitations around multi-owner locks like reader-writer locks, and traces turnstile-like designs into other UNIX-derived kernels, hobby OSes, and userspace constructs such as WebKit's ParkingLot.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://rdmsr.github.io/writing/turnstiles>

## Questions this post answers

### What is a turnstile in Solaris and why does it exist?

A turnstile is a per-thread data structure donated to a contended lock that tracks waiting threads and priority-inheritance state without bloating the lock itself. Each thread receives its own turnstile at creation since a thread can only block on one lock at a time; when it blocks, it hands that turnstile to the lock, and the kernel locates it via a hash table keyed on the lock's address.

_Explore how kernel locking internals like turnstiles get covered in depth on daily.dev._

### How does priority inheritance solve priority inversion when locks depend on other locks?

Priority inheritance temporarily boosts a lock holder's priority to match a blocked higher-priority waiter, preventing medium-priority tasks from starving it. When locks chain together (A waits on B, B waits on C), the priority must propagate through the entire owner chain via multi-hop inheritance, walking a turnstile-to-owner-to-turnstile path until reaching an unblocked owner.

_Developers debugging latency issues from lock contention can dig deeper into priority inheritance on daily.dev._

### Can priority inheritance handle reader-writer locks with multiple owners?

Not cleanly, because a turnstile supports only a single inheritor, so a writer blocked behind multiple readers has no single owner to donate priority to. Kernels resort to heuristics, such as boosting the first thread that acquired the lock or giving up on priority inheritance entirely for multi-owner locks; Windows NT's AutoBoost is noted as the only scheme claimed to support multiple inheritors, though its internals remain undocumented.

_Anyone designing concurrent data structures can track edge cases like these via daily.dev._

## Similar posts on daily.dev

- [How Solaris' Turnstile Influenced the Modern System Designs of Web Browsers and Language Runtimes](https://daily.dev/posts/how-solaris-turnstile-influenced-the-modern-system-designs-of-web-browsers-and-language-runtimes-oe1v3ffpn) · InfoQ · 0 upvotes · 0 comments
- [The Staggering Complexity And Subtlety Of Concurrency](https://daily.dev/posts/the-staggering-complexity-and-subtlety-of-concurrency-e4mpqhp2q) · Hackaday · 1 upvotes · 0 comments
- [Inside Rust's std and parking\_lot mutexes - who wins?](https://daily.dev/posts/inside-rust-s-std-and-parking-lot-mutexes---who-wins--1mfqrkl67) · Hacker News · 1 upvotes · 0 comments
- [OSTEP Chapter 9: Proportional Share Scheduling](https://daily.dev/posts/ostep-chapter-9-proportional-share-scheduling-xwre2u3hn) · Metadata · 0 upvotes · 0 comments

---

[View this post on daily.dev](https://daily.dev/posts/solaris-turnstiles-rdmsr-izapzkptm)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Solaris Turnstiles — RDMSR","url":"https://daily.dev/posts/solaris-turnstiles-rdmsr-izapzkptm","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/solaris-turnstiles-rdmsr-izapzkptm"},"datePublished":"2026-09-09T17:16:34.393Z","dateModified":"2026-09-09T17:16:59.594Z","description":"An examination of Solaris' turnstile mechanism, a data structure used to implement priority inheritance for blocking mutexes in kernels. It explains why...","image":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","thumbnailUrl":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/solaris-turnstiles-rdmsr-izapzkptm","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"Solaris Turnstiles — RDMSR"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/solaris-turnstiles-rdmsr-izapzkptm#faq","mainEntity":[{"@type":"Question","name":"What is a turnstile in Solaris and why does it exist?","acceptedAnswer":{"@type":"Answer","text":"A turnstile is a per-thread data structure donated to a contended lock that tracks waiting threads and priority-inheritance state without bloating the lock itself. Each thread receives its own turnstile at creation since a thread can only block on one lock at a time; when it blocks, it hands that turnstile to the lock, and the kernel locates it via a hash table keyed on the lock's address. Explore how kernel locking internals like turnstiles get covered in depth on daily.dev."}},{"@type":"Question","name":"How does priority inheritance solve priority inversion when locks depend on other locks?","acceptedAnswer":{"@type":"Answer","text":"Priority inheritance temporarily boosts a lock holder's priority to match a blocked higher-priority waiter, preventing medium-priority tasks from starving it. When locks chain together (A waits on B, B waits on C), the priority must propagate through the entire owner chain via multi-hop inheritance, walking a turnstile-to-owner-to-turnstile path until reaching an unblocked owner. Developers debugging latency issues from lock contention can dig deeper into priority inheritance on daily.dev."}},{"@type":"Question","name":"Can priority inheritance handle reader-writer locks with multiple owners?","acceptedAnswer":{"@type":"Answer","text":"Not cleanly, because a turnstile supports only a single inheritor, so a writer blocked behind multiple readers has no single owner to donate priority to. Kernels resort to heuristics, such as boosting the first thread that acquired the lock or giving up on priority inheritance entirely for multi-owner locks; Windows NT's AutoBoost is noted as the only scheme claimed to support multiple inheritors, though its internals remain undocumented. Anyone designing concurrent data structures can track edge cases like these via daily.dev."}}]}
```

