{
 "library": "bootstrap",
 "version": "0.11.0",
 "root": "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5",
 "license": null,
 "slug": "Mutex",
 "ref": "Mutex#b031",
 "hash": "sema:Mutex#mh:SHA-256:b031c2dc75f23526ac765e042cd1ff77f66f0a7a23d57e480b30da0a8343e18e",
 "stub": "b031",
 "layer": "Infrastructure",
 "type": "Primitives",
 "summary": "Ownership-based mutual exclusion",
 "mechanism": "An ownership-bearing Lock#95c2 for a shared Resource#0e5e. An Actor#86fc that successfully acquires it becomes the sole owner and may enter the protected section. Only the owner may release it; another contender becomes owner only through a later successful acquisition after release.",
 "invariants": [
  "Exclusivity: at most one Actor#86fc owns the mutex at a time.",
  "Acquire-before-access: an Actor#86fc enters the protected section only after successful acquisition.",
  "Owner-only release: only the current owner may perform an ordinary release.",
  "Release-after-use: the owner releases the mutex after leaving the protected section."
 ],
 "parameters": {},
 "signature": [],
 "preconditions": [
  "A shared Resource#0e5e and protected section exist.",
  "All contenders use the same mutex state."
 ],
 "postconditions": [
  "A successful acquisition yields exactly one owner.",
  "Non-owners do not enter the protected section.",
  "Release removes the former owner's protected access."
 ],
 "failure_modes": [
  "Deadlock: contenders form a wait cycle and no acquisition can complete.",
  "Orphaned ownership: an owner fails without release, leaving the mutex unavailable.",
  "Starvation: a contender is repeatedly denied under the selected acquisition policy.",
  "Ownership violation: a non-owner releases the mutex or enters the protected section."
 ],
 "domain": "",
 "caution": "Exclusive access — starvation enables denial of service.",
 "sources": [],
 "name": "Mutex",
 "builds_on": [
  {
   "alias": "resource",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Resource",
   "ref": "Resource#0e5e",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Resource"
  },
  {
   "alias": "lock",
   "relation": "references",
   "library": "bootstrap",
   "slug": "Lock",
   "ref": "Lock#95c2",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Lock"
  },
  {
   "alias": "actor",
   "relation": "accepts",
   "library": "bootstrap",
   "slug": "Actor",
   "ref": "Actor#86fc",
   "url": "https://semahash.org/vocabularies/bootstrap/patterns/Actor"
  }
 ],
 "related": [],
 "used_by": [],
 "url": "https://semahash.org/vocabularies/bootstrap/patterns/Mutex",
 "md_url": "https://semahash.org/vocabularies/bootstrap/patterns/Mutex.md",
 "library_url": "https://semahash.org/vocabularies/bootstrap"
}
