Files
website/static/images/xthv1/xthv1-generations.svg
harraiken d3b870619f
Builds / ExectOS WebSite (push) Successful in 22s
Add XTHV1 registry hive format article
2026-11-29 14:57:54 +01:00

55 lines
4.5 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 920 420" font-family="Helvetica, Arial, sans-serif">
<rect width="920" height="420" fill="#ffffff"/>
<defs>
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#555"/></marker>
<marker id="b" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#c07a2c"/></marker>
</defs>
<text x="460" y="30" font-size="18" font-weight="bold" text-anchor="middle" fill="#222">Copy-on-write commit: generation G + 1 shares unchanged pages with G</text>
<g font-size="12" text-anchor="middle">
<!-- superblocks -->
<rect x="60" y="60" width="200" height="48" rx="4" fill="#4a6fa5"/>
<text x="160" y="80" fill="#fff" font-weight="bold">Slot A: generation G</text><text x="160" y="97" fill="#fff">previous image</text>
<rect x="660" y="60" width="200" height="48" rx="4" fill="#4a6fa5" stroke="#c07a2c" stroke-width="3"/>
<text x="760" y="80" fill="#fff" font-weight="bold">Slot B: generation G + 1</text><text x="760" y="97" fill="#fff">current image</text>
<!-- old tree -->
<rect x="100" y="140" width="120" height="40" rx="4" fill="#7a5ea8"/><text x="160" y="164" fill="#fff">root (G)</text>
<rect x="100" y="210" width="120" height="40" rx="4" fill="#7a5ea8"/><text x="160" y="234" fill="#fff">level 1 (G)</text>
<rect x="40" y="280" width="110" height="40" rx="4" fill="#7a5ea8"/><text x="95" y="304" fill="#fff">level 0 #0 (G)</text>
<rect x="170" y="280" width="110" height="40" rx="4" fill="#7a5ea8"/><text x="225" y="304" fill="#fff">level 0 #1 (G)</text>
<line x1="160" y1="108" x2="160" y2="138" stroke="#555" stroke-width="1.6" marker-end="url(#a)"/>
<line x1="160" y1="180" x2="160" y2="208" stroke="#555" stroke-width="1.6" marker-end="url(#a)"/>
<line x1="140" y1="250" x2="100" y2="278" stroke="#555" stroke-width="1.6" marker-end="url(#a)"/>
<line x1="180" y1="250" x2="220" y2="278" stroke="#555" stroke-width="1.6" marker-end="url(#a)"/>
<!-- new tree -->
<rect x="700" y="140" width="120" height="40" rx="4" fill="#7a5ea8" stroke="#c07a2c" stroke-width="3"/><text x="760" y="164" fill="#fff">root (G+1)</text>
<rect x="700" y="210" width="120" height="40" rx="4" fill="#7a5ea8" stroke="#c07a2c" stroke-width="3"/><text x="760" y="234" fill="#fff">level 1 (G+1)</text>
<rect x="770" y="280" width="120" height="40" rx="4" fill="#7a5ea8" stroke="#c07a2c" stroke-width="3"/><text x="830" y="304" fill="#fff">level 0 #1 (G+1)</text>
<line x1="760" y1="108" x2="760" y2="138" stroke="#c07a2c" stroke-width="1.8" marker-end="url(#b)"/>
<line x1="760" y1="180" x2="760" y2="208" stroke="#c07a2c" stroke-width="1.8" marker-end="url(#b)"/>
<line x1="790" y1="250" x2="825" y2="278" stroke="#c07a2c" stroke-width="1.8" marker-end="url(#b)"/>
<!-- shared: new L1 points to old L0 #0 -->
<path d="M 700 236 C 450 250, 250 262, 125 278" fill="none" stroke="#c07a2c" stroke-width="1.8" stroke-dasharray="6,4" marker-end="url(#b)"/>
<text x="430" y="228" fill="#c07a2c">unchanged subtree is shared by reference</text>
<!-- data pages -->
<g font-family="monospace">
<rect x="20" y="360" width="70" height="36" rx="4" fill="#3c8d5c"/><text x="55" y="382" fill="#fff">LPN 0</text>
<rect x="100" y="360" width="70" height="36" rx="4" fill="#3c8d5c"/><text x="135" y="382" fill="#fff">LPN 1</text>
<rect x="190" y="360" width="70" height="36" rx="4" fill="#3c8d5c"/><text x="225" y="382" fill="#fff">LPN 84</text>
<rect x="800" y="360" width="90" height="36" rx="4" fill="#3c8d5c" stroke="#c07a2c" stroke-width="3"/><text x="845" y="382" fill="#fff">LPN 84'</text>
</g>
<line x1="80" y1="320" x2="58" y2="358" stroke="#555" stroke-width="1.6" marker-end="url(#a)"/>
<line x1="110" y1="320" x2="132" y2="358" stroke="#555" stroke-width="1.6" marker-end="url(#a)"/>
<line x1="225" y1="320" x2="225" y2="358" stroke="#555" stroke-width="1.6" marker-end="url(#a)"/>
<line x1="840" y1="320" x2="845" y2="358" stroke="#c07a2c" stroke-width="1.8" marker-end="url(#b)"/>
<text x="420" y="330" fill="#333">One modified page (LPN 84) costs: the new data page,</text>
<text x="420" y="348" fill="#333">one new node per level and one superblock.</text>
<text x="420" y="372" fill="#333">Nothing reachable from generation G is overwritten,</text>
<text x="420" y="390" fill="#333">so a crash at any point leaves G or G + 1 intact.</text>
</g>
</svg>