# Static presentation guide

## 01 / Open or host

Open [`index.html`](../index.html) directly or serve the repository with any static host, including GitHub Pages. There is no package installation, build pipeline, CDN, analytics, or browser-to-native bridge. The reference site's dark palette, numbered article structure and architecture cards inspired the presentation; no reference files are modified.

Local scripts are deferred and the benchmark JSON is also shipped as a generated JavaScript assignment. This lets the page work under `file://` without relying on fetch permissions. Downloadable JSON and CSV remain the data of record. Missing or malformed capture data produces a visible unavailable message, never synthetic timings.

Files:

| File | Responsibility |
| --- | --- |
| `index.html` | Ten numbered technical sections, semantic controls, native result tables and reproduction links |
| `assets/site.css` | Responsive dark theme, architecture diagram, focus states, reduced-motion and print styles |
| `assets/simulation.js` | Pure deterministic educational scheduler model, independent of the DOM and native capture |
| `assets/viewer.js` | Controls, model rendering, native capture rendering and filters |
| `assets/benchmark-data.js` | Generated offline wrapper around the real JSON capture |
| `assets/benchmarks.json`, `assets/native-runs.csv` | Reproducible native evidence and metadata |
| `Build/simulation.test.js` | Node built-in tests for model semantics, published-data consistency and local links |
| `Build/browser-smoke.js` | Optional isolated headless Edge test of the real offline page and controls |

## 02 / Suggested walkthrough

1. Explain why jobs and OS threads are separate, without promising that more workers always help.
2. Follow producers → three FIFO priority levels → semaphore → fixed workers.
3. Choose **1 worker**, submit a long LOW task, and step once to dispatch it. Submit HIGH and additional LOW tasks. HIGH waits for the running callback but is selected before queued LOW work.
4. Switch to **4 or 8 workers** (resets the model). Add a seeded 60-job mix and step or play. Completion order is duration-dependent even though dequeue selection respects priority.
5. Select **Cancel queued + join** with some jobs running. Queued jobs become cancelled without execution. Step/play until all running callbacks finish; only then does the model become stopped.
6. Move to the **separate native measurements** section. Compare minimal versus integer callbacks and 1/4/8 workers. Preserve the eight-worker slowdown and spread when presenting; do not claim linear scaling.
7. Show the per-task stress validation, lifecycle boundary labels and downloadable observations. Finish with shutdown ownership, starvation and diagnostic-build limitations.

Reset discards an educational model and starts a new one. It does not simulate the native shutdown API. Normal shutdown in the model retains running jobs until their logical durations finish.

## 03 / Simulation versus implementation

The simulation uses logical ticks, seeded durations and worker-ID dispatch order. It has no Win32 scheduling, lock acquisition, memory allocation timing, semaphore permits, monitor thread, overdue reporting, dynamic growth or retire timeout. A JavaScript array represents each queue; it is not an intrusive list implementation. The illustration has a 240-total-job cap to keep the page manageable; the **native queue is unbounded**.

The illustrated guarantees are strict queued priority selection, FIFO ties, non-preemption, and cancel-queued/join-running shutdown. Its checks conserve model task IDs only. They are never described as native stress evidence. The native result section reads a different artifact and never derives values from animation speed or simulated durations.

## 04 / Accessibility and privacy

- Semantic headings, section landmarks, labeled inputs, real buttons and table captions/column headers.
- Keyboard-visible focus, a skip link, keyboard-operable controls and a polite status region.
- No autoplay. Play/Pause has an explicit pressed state and pauses when the page is hidden or work runs out.
- Queue priorities have text labels and numbers as well as color. Active work includes remaining-tick text, not only a meter.
- Reduced-motion preference disables smooth scrolling; manual stepping is always available.
- Responsive layouts collapse on narrow viewports; wide data tables scroll within their own region.
- No external requests or collection of user data. Raw logs/PDBs stay out of public assets; environment publication is allowlisted.

Automated checks do not replace manual screen-reader, zoom, contrast and cross-browser review. The main technical text and download links work without JavaScript; the interactive model and generated tables require it.

## 05 / Validate and update

Node is optional for the site, required only for these no-dependency tests:

```powershell
node --test Build/simulation.test.js
node --check assets/simulation.js
node --check assets/viewer.js
node Build/browser-smoke.js
```

The tests cover fixed worker counts, FIFO priority selection, non-preemption, joined shutdown, exactly-once model lifetimes, deterministic mixes, invalid inputs, CSV/JSON consistency, QPC arithmetic, summary medians, basic publication privacy and local links.

The optional browser smoke test requires Windows, Edge and Node with built-in WebSocket support (Node 24 was used). It creates a separate temporary browser profile under ignored `artifacts/`, loads the site using `file://`, exercises actual controls and result filters, checks narrow-screen overflow and captures desktop/mobile screenshots. It does not interact with the user's browser profile.

### Validation performed for the C-only presentation update

- All 14 Node model/data/link/build-contract checks passed; JavaScript syntax checks passed. The added check enforces a single `.c` source, `/TC`, C17, no C++ test framework, and matching C-language capture metadata.
- Headless Edge passed offline capture loading, lifecycle/throughput table rendering, filtering, non-preemption, queued cancellation plus joined completion, play/pause/reset and 375-pixel viewport overflow checks. No JavaScript exceptions or external HTTP requests were observed.
- The ordinary x64/Win32 Debug/Release rebuild matrix and all eight regression/stress runs passed again after adding measurement support.
- The standalone C17 executable passed all 182 measured repetitions on both x64 Release and Win32 Release. The website displays the newly captured x64 data only. See `BENCHMARKS.md` for boundaries and the preserved raw observations.

Screenshots are generated artifacts, not manually reviewed visual-acceptance evidence. Screen-reader, contrast and cross-browser review remain manual follow-up work.

To update native results, run `Build/Benchmark.ps1 -Publish` after reviewing [`BENCHMARKS.md`](BENCHMARKS.md). Never hand-edit the generated benchmark JSON/JS/CSV or smooth away unfavorable samples. Keep all seven observations and the machine metadata. The website tables update from the capture; historical documentation must be explicitly updated or retained as historical notes.
