Files
roro9stack/site/content/devlog/roro9stack-s1/runtime.svg
T
twislaandClaude Sonnet 5.5 6e54658ba4
Site / build (pull_request) Successful in 9s
Site: the devlog, the blog's roro9stack posts in the site's style; Devlog replaces Blog in the navigation
Seven posts imported into site/content/devlog/ with their text unchanged,
links between them pointing to /devlog/, and shortcodes (sign, cast, steps,
asides, folded sections, diagrams, captions) restyled in the site's palette.
The 17 inline SVG diagrams carried <style> blocks and style attributes the
site's Content-Security-Policy refuses: their rules moved to
devlog-diagrams.css, and a diagram's minimum width is a class. An Atom feed
at /devlog/atom.xml.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
2026-10-06 20:51:33 +02:00

33 lines
2.6 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 760 300" role="img" aria-label="One second on core 1, twice. In the first, the main loop shares the core with another task: it is switched out several times, and each time FreeRTOS adds the time it ran to its counter, so the counter keeps up and reads 60 percent. In the second, the main loop has the core to itself: it runs for the whole second and is never switched out, so its counter hardly moves and reads 2 percent, while the idle task's counter reads 0 percent. Two percent plus zero percent leaves 98 percent of the core unaccounted for: it belongs to the task that is still running, the one taking the sample.">
<g font-family="JetBrains Mono, ui-monospace, monospace" fill="currentColor" font-size="10">
<!-- shared core -->
<text x="16" y="22" font-size="12" font-weight="600">The loop shares core 1</text>
<text x="16" y="48" class="rt-dim">running</text>
<rect class="rt-run" x="110" y="36" width="110" height="16"/>
<rect class="rt-other" x="220" y="36" width="60" height="16"/>
<rect class="rt-run" x="280" y="36" width="130" height="16"/>
<rect class="rt-other" x="410" y="36" width="90" height="16"/>
<rect class="rt-run" x="500" y="36" width="120" height="16"/>
<rect class="rt-other" x="620" y="36" width="100" height="16"/>
<text x="16" y="88" class="rt-dim">its counter</text>
<line class="rt-axis" x1="110" y1="110" x2="720" y2="110"/>
<polyline class="rt-count" points="110,110 220,110 220,96 410,96 410,80 620,80 620,66 720,66"/>
<line class="rt-tick" x1="220" y1="54" x2="220" y2="110"/>
<line class="rt-tick" x1="410" y1="54" x2="410" y2="110"/>
<line class="rt-tick" x1="620" y1="54" x2="620" y2="110"/>
<text x="226" y="124" class="rt-dim">added when it's switched out</text>
<text class="f-green" x="728" y="70">60%</text>
<!-- alone -->
<text x="16" y="166" font-size="12" font-weight="600">The loop has core 1 to itself</text>
<text x="16" y="192" class="rt-dim">running</text>
<rect class="rt-run" x="110" y="180" width="610" height="16"/>
<text x="16" y="232" class="rt-dim">its counter</text>
<line class="rt-axis" x1="110" y1="250" x2="720" y2="250"/>
<polyline class="rt-count-bad" points="110,250 126,250 126,247 720,247"/>
<text class="f-red" x="728" y="250">2%</text>
<text x="134" y="238" class="rt-dim">never switched out, so nothing is added: idle 0% + loop 2% = 2% of a core that's 100% busy</text>
<text x="16" y="284" class="rt-dim">The missing 98% belongs to the task still running: the one taking the sample.</text>
</g>
</svg>