83 lines
5.0 KiB
XML
83 lines
5.0 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 1420" role="img" aria-labelledby="title desc">
|
|
<title id="title">Истечение lease и поздняя запись старого worker</title>
|
|
<desc id="desc">Вертикальная временная шкала учебного сценария: worker-A получает lease один и token один, останавливается после истечения lease, worker-B получает lease два и token два, ресурс принимает token два и отвергает поздний token один.</desc>
|
|
<defs>
|
|
<marker id="arrow" viewBox="0 0 12 12" refX="10" refY="6" markerWidth="10" markerHeight="10" orient="auto-start-reverse">
|
|
<path d="M1 1 L11 6 L1 11z" fill="#9fb7d7"/>
|
|
</marker>
|
|
<style>
|
|
.bg { fill: #0b1324; }
|
|
.card { fill: #14213a; stroke: #42658f; stroke-width: 3; }
|
|
.accent { fill: #173e45; stroke: #48c5be; stroke-width: 3; }
|
|
.ok { fill: #1a4136; stroke: #67d5a6; stroke-width: 3; }
|
|
.warn { fill: #422a30; stroke: #ff9a80; stroke-width: 3; }
|
|
.muted { fill: #2a3040; stroke: #71819d; stroke-width: 3; }
|
|
.line { stroke: #9fb7d7; stroke-width: 5; fill: none; marker-end: url(#arrow); }
|
|
.dash { stroke: #71819d; stroke-width: 4; fill: none; stroke-dasharray: 10 10; }
|
|
.title { fill: #ffffff; font: 700 34px Arial, sans-serif; }
|
|
.label { fill: #eaf2ff; font: 600 27px Arial, sans-serif; }
|
|
.body { fill: #d2def2; font: 24px Arial, sans-serif; }
|
|
.small { fill: #b6c7e3; font: 22px Arial, sans-serif; }
|
|
.tag { fill: #87e5db; font: 700 21px Arial, sans-serif; letter-spacing: 1px; }
|
|
.time { fill: #ffcf8b; font: 700 24px Arial, sans-serif; }
|
|
</style>
|
|
</defs>
|
|
<rect class="bg" width="720" height="1420" rx="32"/>
|
|
<text x="360" y="62" text-anchor="middle" class="title">Lease не отменяет старый request</text>
|
|
<text x="360" y="96" text-anchor="middle" class="small">учебный interleaving без реального provider</text>
|
|
|
|
<path d="M118 160 L118 1300" class="dash"/>
|
|
<text x="118" y="151" text-anchor="middle" class="small">время</text>
|
|
|
|
<text x="42" y="210" class="time">t=0</text>
|
|
<circle cx="118" cy="201" r="13" fill="#48c5be"/>
|
|
<rect x="166" y="145" width="500" height="142" rx="22" class="accent"/>
|
|
<text x="198" y="186" class="tag">WORKER-A · ACQUIRE</text>
|
|
<text x="198" y="228" class="label">lease-1, fence token 1</text>
|
|
<text x="198" y="261" class="body">критическая работа начинается</text>
|
|
<path d="M416 287 L416 339" class="line"/>
|
|
|
|
<text x="25" y="386" class="time">t=5000</text>
|
|
<circle cx="118" cy="378" r="13" fill="#ffb270"/>
|
|
<rect x="166" y="339" width="500" height="138" rx="22" class="muted"/>
|
|
<text x="198" y="380" class="tag">LEASE LIMIT</text>
|
|
<text x="198" y="422" class="label">worker-A всё ещё paused</text>
|
|
<text x="198" y="455" class="body">его память не очищается</text>
|
|
<path d="M416 477 L416 529" class="line"/>
|
|
|
|
<text x="25" y="578" class="time">t=6000</text>
|
|
<circle cx="118" cy="569" r="13" fill="#ff9a80"/>
|
|
<rect x="166" y="529" width="500" height="151" rx="22" class="warn"/>
|
|
<text x="198" y="571" class="tag">AUTHORITY</text>
|
|
<text x="198" y="613" class="label">lease-1 истёк и освобождён</text>
|
|
<text x="198" y="646" class="body">это не остановка worker-A</text>
|
|
<path d="M416 680 L416 732" class="line"/>
|
|
|
|
<text x="25" y="780" class="time">t=6000</text>
|
|
<circle cx="118" cy="771" r="13" fill="#48c5be"/>
|
|
<rect x="166" y="732" width="500" height="160" rx="22" class="accent"/>
|
|
<text x="198" y="774" class="tag">WORKER-B · ACQUIRE</text>
|
|
<text x="198" y="816" class="label">lease-2, fence token 2</text>
|
|
<text x="198" y="849" class="body">новое поколение владельца</text>
|
|
<path d="M416 892 L416 944" class="line"/>
|
|
|
|
<text x="25" y="993" class="time">t=6100</text>
|
|
<circle cx="118" cy="984" r="13" fill="#67d5a6"/>
|
|
<rect x="166" y="944" width="500" height="153" rx="22" class="ok"/>
|
|
<text x="198" y="986" class="tag">PROTECTED RESOURCE</text>
|
|
<text x="198" y="1028" class="label">write token 2 → accepted</text>
|
|
<text x="198" y="1061" class="body">highest accepted token = 2</text>
|
|
<path d="M416 1097 L416 1149" class="line"/>
|
|
|
|
<text x="25" y="1198" class="time">t=6200</text>
|
|
<circle cx="118" cy="1189" r="13" fill="#ff9a80"/>
|
|
<rect x="166" y="1149" width="500" height="190" rx="22" class="warn"/>
|
|
<text x="198" y="1191" class="tag">LATE REQUEST FROM A</text>
|
|
<text x="198" y="1233" class="label">write token 1 → rejected</text>
|
|
<text x="198" y="1266" class="body">ресурс не даёт v1 перезаписать v2</text>
|
|
<text x="198" y="1298" class="small">без resource-side fence</text>
|
|
<text x="198" y="1326" class="small">обе записи допустимы</text>
|
|
|
|
<text x="360" y="1372" text-anchor="middle" class="small">Lock координирует владение; ресурс проверяет поколение.</text>
|
|
</svg>
|