39 lines
5.2 KiB
XML
39 lines
5.2 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="208px" preserveAspectRatio="none" style="width:812px;height:208px;" version="1.1" viewBox="0 0 812 208" width="812px" zoomAndPan="magnify"><defs/><g><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="296" x="261.5" y="12.8281">A8 PATTERNS — choose the synchronization contract</text><!--MD5=[0c94bbd458004588e03de05ccccd09d9]
|
||
entity critical--><rect fill="#EDF6FA" height="69.0323" style="stroke: #2C7794; stroke-width: 1.5;" width="185" x="6" y="24.6241"/><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="99" x="16" y="47.4522">01 Critical section</text><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="165" x="16" y="63.7963">very short CPU-local invariant</text><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="64" x="16" y="80.1404">never block</text><!--MD5=[e9b87bd7eea3cd1afcf2413a9fa81c40]
|
||
entity suspend--><rect fill="#EDF6FA" height="69.0323" style="stroke: #2C7794; stroke-width: 1.5;" width="159" x="226" y="24.6241"/><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="139" x="236" y="47.4522">02 Scheduler suspension</text><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="93" x="236" y="63.7963">defer scheduling</text><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="99" x="236" y="80.1404">interrupts still run</text><!--MD5=[a15aec3e997c0b90fdfa616e6e255e24]
|
||
entity mutex--><rect fill="#EDF6FA" height="69.0323" style="stroke: #2C7794; stroke-width: 1.5;" width="197" x="420" y="24.6241"/><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="52" x="430" y="47.4522">03 Mutex</text><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="177" x="430" y="63.7963">ownership + priority inheritance</text><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="93" x="430" y="80.1404">task context only</text><!--MD5=[c47f0c0e15548abdaedf4a672b82b47b]
|
||
entity gatekeeper--><rect fill="#EDF6FA" height="69.0323" style="stroke: #2C7794; stroke-width: 1.5;" width="150" x="651.5" y="24.6241"/><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="109" x="661.5" y="47.4522">04 Gatekeeper task</text><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="124" x="661.5" y="63.7963">single resource owner</text><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="130" x="661.5" y="80.1404">message-based access</text><path d="M393.5,153.6541 L393.5,196.3423 A0,0 0 0 0 393.5,196.3423 L643.5,196.3423 A0,0 0 0 0 643.5,196.3423 L643.5,163.6541 L633.5,153.6541 L522.5,153.6541 L518.5,93.9941 L514.5,153.6541 L393.5,153.6541 A0,0 0 0 0 393.5,153.6541 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M633.5,153.6541 L633.5,163.6541 L643.5,163.6541 L633.5,153.6541 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="145" x="399.5" y="171.4822">FC08 selects this contract.</text><text fill="#000000" font-family="Monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="229" x="399.5" y="187.8263">A binary semaphore would not prove PIP.</text><!--MD5=[43f9e7dad0b185143c57098fbc752e3b]
|
||
link critical to suspend--><!--MD5=[8c3c9b66a323ecbbfdeb4278884cf545]
|
||
link suspend to mutex--><!--MD5=[23c46de2c675a24a276d91376df1cd89]
|
||
link mutex to gatekeeper--><!--MD5=[30f74b2029b88fbb954d44fee45dd65e]
|
||
@startuml
|
||
skinparam backgroundColor transparent
|
||
skinparam shadowing false
|
||
skinparam defaultFontName Monospace
|
||
skinparam defaultFontSize 12
|
||
skinparam rectangleBorderColor #2c7794
|
||
skinparam rectangleBackgroundColor #edf6fa
|
||
title A8 PATTERNS — choose the synchronization contract
|
||
rectangle "01 Critical section\nvery short CPU-local invariant\nnever block" as critical
|
||
rectangle "02 Scheduler suspension\ndefer scheduling\ninterrupts still run" as suspend
|
||
rectangle "03 Mutex\nownership + priority inheritance\ntask context only" as mutex
|
||
rectangle "04 Gatekeeper task\nsingle resource owner\nmessage-based access" as gatekeeper
|
||
critical -[hidden]right- suspend
|
||
suspend -[hidden]right- mutex
|
||
mutex -[hidden]right- gatekeeper
|
||
note bottom of mutex
|
||
FC08 selects this contract.
|
||
A binary semaphore would not prove PIP.
|
||
end note
|
||
@enduml
|
||
|
||
PlantUML version 1.2020.02(Sun Mar 01 11:22:07 CET 2020)
|
||
(GPL source distribution)
|
||
Java Runtime: OpenJDK Runtime Environment
|
||
JVM: OpenJDK 64-Bit Server VM
|
||
Java Version: 25.0.4-ea+4-1-Debian
|
||
Operating System: Linux
|
||
Default Encoding: UTF-8
|
||
Language: en
|
||
Country: null
|
||
--></g></svg> |