{ "schema": "esc-card-react-view.v1", "card": { "id": "mpabi-freertos-c-03-scheduler", "series": "freertos-c", "series_title": "FreeRTOS C", "number": "03", "count": "15", "slug": "tick-priority-preemption-timeslicing", "title": "Tick, priorytety, wywłaszczenie i time slicing", "topic": "Scheduler FreeRTOS obserwowany w C i Hazard3", "project": "Freestanding C nad FreeRTOS", "subject": "Informatyka", "level": "Rok 2 · L03 · RV32I/Hazard3", "revision_date": "2026-07-18T00:00:00+02:00", "status": "Gotowa", "version": "v00.01", "uuid": "c4bf7933-9a39-4968-b40e-158bafbb3eea", "author": "M. Pabiszczak", "year": "2026" }, "library": { "schema": "stem-card-library.v2", "workspace": "edu", "subjects": [ { "id": "inf", "title": "INF · Informatyka", "current": true, "levels": [ { "id": "year-1", "title": "Rok 1", "current": false, "series": [ { "id": "console-bash", "title": "Bash · Console Tools", "current": false, "catalog_only": true, "role": "", "status": "", "cards": [ { "id": "L01", "title": "BusyBox — the Swiss Army Knife", "repo": "lab-console-busybox", "href": "", "available": false, "current": false, "number": "01", "version": "", "status": "planned", "tasks": [] }, { "id": "L02", "title": "Tmux — sessions, windows and panes", "repo": "lab-console-tmux", "href": "", "available": false, "current": false, "number": "02", "version": "", "status": "planned", "tasks": [] }, { "id": "L03", "title": "Neovim — navigation and editing", "repo": "lab-console-neovim", "href": "", "available": false, "current": false, "number": "03", "version": "", "status": "planned", "tasks": [] }, { "id": "L04", "title": "Git Basics I — status, add and commit", "repo": "lab-console-git-basics-1", "href": "", "available": false, "current": false, "number": "04", "version": "", "status": "planned", "tasks": [] }, { "id": "L05", "title": "Git Basics II — log, diff and restore", "repo": "lab-console-git-basics-2", "href": "", "available": false, "current": false, "number": "05", "version": "", "status": "planned", "tasks": [] }, { "id": "L06", "title": "Git Branching I — branch, switch and merge", "repo": "lab-console-git-branching-1", "href": "", "available": false, "current": false, "number": "06", "version": "", "status": "planned", "tasks": [] }, { "id": "L07", "title": "Git Branching II — rebase and conflicts", "repo": "lab-console-git-branching-2", "href": "", "available": false, "current": false, "number": "07", "version": "", "status": "planned", "tasks": [] }, { "id": "L08", "title": "Docker Fundamentals", "repo": "lab-console-docker", "href": "", "available": false, "current": false, "number": "08", "version": "", "status": "planned", "tasks": [] } ] }, { "id": "rv32i-asm", "title": "ASM · RV32I From Blinker to RISC-V", "current": false, "catalog_only": true, "role": "", "status": "", "cards": [ { "id": "L01", "title": "Number Systems and Storage", "repo": "lab-rv32i-asm-number-systems", "href": "", "available": false, "current": false, "number": "01", "version": "", "status": "planned", "tasks": [] }, { "id": "L02", "title": "FPGA Bring-up and Programming", "repo": "lab-rv32i-asm-fpga-bringup", "href": "", "available": false, "current": false, "number": "02", "version": "", "status": "planned", "tasks": [] }, { "id": "L03", "title": "Blinker and Synchronous Logic", "repo": "lab-rv32i-asm-blinker", "href": "", "available": false, "current": false, "number": "03", "version": "", "status": "planned", "tasks": [] }, { "id": "L04", "title": "The RISC-V ISA and Instruction Decoder", "repo": "lab-rv32i-asm-decoder", "href": "", "available": false, "current": false, "number": "04", "version": "", "status": "planned", "tasks": [] }, { "id": "L05", "title": "ALU and the Verilog Assembler", "repo": "lab-rv32i-asm-alu", "href": "", "available": false, "current": false, "number": "05", "version": "", "status": "planned", "tasks": [] }, { "id": "L06", "title": "Control Flow — Jumps and Branches", "repo": "lab-rv32i-asm-control-flow", "href": "", "available": false, "current": false, "number": "06", "version": "", "status": "planned", "tasks": [] }, { "id": "L07", "title": "Addresses and Memory", "repo": "lab-rv32i-asm-addresses-memory", "href": "", "available": false, "current": false, "number": "07", "version": "", "status": "planned", "tasks": [] }, { "id": "L08", "title": "Subroutines and the RISC-V ABI", "repo": "lab-rv32i-asm-subroutines-abi", "href": "", "available": false, "current": false, "number": "08", "version": "", "status": "planned", "tasks": [] }, { "id": "L09", "title": "Load and Store", "repo": "lab-rv32i-asm-load-store", "href": "", "available": false, "current": false, "number": "09", "version": "", "status": "planned", "tasks": [] } ] }, { "id": "c", "title": "C · Freestanding RV32I and K&R", "current": false, "catalog_only": true, "role": "", "status": "", "cards": [ { "id": "C01", "title": "ASM, C and GCC", "repo": "lab-rv32i-strlen-asm-c-gcc", "href": "", "available": false, "current": false, "number": "01", "version": "", "status": "existing", "tasks": [] }, { "id": "C02", "title": ".bss, .data and static storage", "repo": "lab-rv32i-strlen-bss-data-stack", "href": "", "available": false, "current": false, "number": "02", "version": "", "status": "existing", "tasks": [] }, { "id": "C03", "title": "ABI and Stack Frame", "repo": "lab-rv32i-strlen-abi-stack", "href": "", "available": false, "current": false, "number": "03", "version": "", "status": "existing", "tasks": [] }, { "id": "C04", "title": "Types, Operators and Expressions", "repo": "lab-rv32i-c-types-operators-expressions", "href": "", "available": false, "current": false, "number": "04", "version": "", "status": "existing", "tasks": [] }, { "id": "C05", "title": "Control Flow", "repo": "lab-rv32i-c-control-flow", "href": "", "available": false, "current": false, "number": "05", "version": "", "status": "existing", "tasks": [] }, { "id": "C06", "title": "Functions and Program Structure", "repo": "lab-rv32i-c-functions-program-structure", "href": "", "available": false, "current": false, "number": "06", "version": "", "status": "existing", "tasks": [] }, { "id": "C07", "title": "Pointers, Arrays and Linear Allocator", "repo": "lab-rv32i-c-pointers-arrays", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/98dbe323-c624-53d6-9fe2-4ee688c44b38", "available": true, "current": false, "number": "07", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "task01" }, { "id": "task02", "title": "task02" }, { "id": "task03", "title": "task03" }, { "id": "task04", "title": "K&R 5.4 -- Linear Memory Allocator" }, { "id": "task05", "title": "task05" }, { "id": "task06", "title": "task06" }, { "id": "task07", "title": "task07" }, { "id": "task08", "title": "task08" }, { "id": "task09", "title": "task09" }, { "id": "task10", "title": "task10" }, { "id": "task11", "title": "task11" }, { "id": "task12", "title": "task12" } ] }, { "id": "C08", "title": "Structures and Linked State", "repo": "lab-rv32i-c-structures", "href": "", "available": false, "current": false, "number": "08", "version": "", "status": "existing", "tasks": [] }, { "id": "C09", "title": "smalloc, sbrk and minimal libc", "repo": "lab-rv32i-c-smalloc-sbrk-libc", "href": "", "available": false, "current": false, "number": "09", "version": "", "status": "planned", "tasks": [] }, { "id": "C10", "title": "RV32I Traps and Interrupt Control", "repo": "lab-rv32i-c-interrupts", "href": "", "available": false, "current": false, "number": "10", "version": "", "status": "planned", "tasks": [] }, { "id": "C11", "title": "Machine Timer and Periodic Work", "repo": "lab-rv32i-c-timer", "href": "", "available": false, "current": false, "number": "11", "version": "", "status": "planned", "tasks": [] }, { "id": "C12", "title": "UART — polling and interrupts", "repo": "lab-rv32i-c-uart", "href": "", "available": false, "current": false, "number": "12", "version": "", "status": "planned", "tasks": [] }, { "id": "C13", "title": "GPIO, Edges and Debounce", "repo": "lab-rv32i-c-gpio", "href": "", "available": false, "current": false, "number": "13", "version": "", "status": "planned", "tasks": [] } ] } ] }, { "id": "year-2", "title": "Rok 2", "current": true, "series": [ { "id": "cpp", "title": "C++", "current": false, "catalog_only": true, "role": "", "status": "", "cards": [ { "id": "CPP01", "title": "Translation Units, Linkage and Namespaces", "repo": "lab-cpp-build-namespaces", "href": "", "available": false, "current": false, "number": "01", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP02", "title": "Classes, Encapsulation and Invariants", "repo": "lab-cpp-classes-invariants", "href": "", "available": false, "current": false, "number": "02", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP03", "title": "Construction, Destruction and RAII", "repo": "lab-cpp-lifetime-raii", "href": "", "available": false, "current": false, "number": "03", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP04", "title": "References, const and Value Categories", "repo": "lab-cpp-references-const", "href": "", "available": false, "current": false, "number": "04", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP05", "title": "Copy, Move and the Rule of Zero/Five", "repo": "lab-cpp-copy-move", "href": "", "available": false, "current": false, "number": "05", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP06", "title": "Ownership and Resource Types", "repo": "lab-cpp-ownership", "href": "", "available": false, "current": false, "number": "06", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP07", "title": "Function and Class Templates", "repo": "lab-cpp-templates", "href": "", "available": false, "current": false, "number": "07", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP08", "title": "Static Polymorphism and CRTP", "repo": "lab-cpp-static-polymorphism", "href": "", "available": false, "current": false, "number": "08", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP09", "title": "Inheritance, Interfaces and Dynamic Dispatch", "repo": "lab-cpp-dynamic-polymorphism", "href": "", "available": false, "current": false, "number": "09", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP10", "title": "Operator Overloading and Strong Types", "repo": "lab-cpp-strong-types", "href": "", "available": false, "current": false, "number": "10", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP11", "title": "Containers, Iterators and Algorithms", "repo": "lab-cpp-containers-iterators", "href": "", "available": false, "current": false, "number": "11", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP12", "title": "Lambdas, Function Objects and Callables", "repo": "lab-cpp-lambdas-callables", "href": "", "available": false, "current": false, "number": "12", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP13", "title": "Error Models with and without Exceptions", "repo": "lab-cpp-error-models", "href": "", "available": false, "current": false, "number": "13", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP14", "title": "Object Layout, ABI and Binary Evidence", "repo": "lab-cpp-abi-evidence", "href": "", "available": false, "current": false, "number": "14", "version": "", "status": "planned", "tasks": [] }, { "id": "CPP15", "title": "Resource-type Integration Project", "repo": "lab-cpp-resource-integration", "href": "", "available": false, "current": false, "number": "15", "version": "", "status": "planned", "tasks": [] } ] }, { "id": "freertos-c", "title": "FreeRTOS C", "current": true, "catalog_only": true, "role": "", "status": "", "cards": [ { "id": "FC01", "title": "heap_4: From Linear Cursor to Reusable Blocks", "repo": "lab-rv32i-freertos-heap4", "href": "", "available": false, "current": false, "number": "01", "version": "", "status": "existing", "tasks": [] }, { "id": "FC02", "title": "First Task, TCB and Task Stack", "repo": "lab-rv32i-freertos-c-first-task", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/a2538a1a-3c37-4c14-a6ea-db5aba8fd038", "available": true, "current": false, "number": "02", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Pierwszy task FreeRTOS — callback, context, TCB i stos" } ] }, { "id": "FC03", "title": "Tick, Scheduler, Priorities and Time Slicing", "repo": "lab-rv32i-freertos-c-scheduler", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/2214a13f-34c6-40a1-a561-70a00ec98285", "available": true, "current": true, "number": "03", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Kontrolowany eksperyment schedulera FreeRTOS" } ] }, { "id": "FC04", "title": "Delay, Blocking and Task States", "repo": "lab-rv32i-freertos-c-delay-state", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/4a7ef04c-ab08-5783-9192-5b02a90f05f8", "available": true, "current": false, "number": "04", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Delay, blokowanie, zawieszenie i self-delete" } ] }, { "id": "FC05", "title": "Queues and Byte-copy Semantics", "repo": "lab-rv32i-freertos-c-queue", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/8ee8f36a-471b-51bc-97b8-e204bd541c61", "available": true, "current": false, "number": "05", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Kolejka długości 1: empty, full, copy i FIFO" } ] }, { "id": "FC06", "title": "Software Timers and the Daemon Task", "repo": "lab-rv32i-freertos-c-software-timers", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/ab188300-f03d-5ddb-8316-b9534876a5bc", "available": true, "current": false, "number": "06", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "One-shot, auto-reload i timer daemon" } ] }, { "id": "FC07", "title": "Interrupt-safe API and Semaphore Handoff", "repo": "lab-rv32i-freertos-c-isr-semaphore", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/a6da1075-8d1f-5615-b0e6-0fc33e59e1e3", "available": true, "current": false, "number": "07", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "External IRQ → FromISR semaphore → high-priority task" } ] }, { "id": "FC08", "title": "Critical Sections, Mutexes and Priority Inheritance", "repo": "lab-rv32i-freertos-c-resource-management", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/2392f81a-ed6c-510b-86b5-06c5e2f1c6aa", "available": true, "current": false, "number": "08", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Low/Medium/High: ownership i dziedziczenie priorytetu" } ] }, { "id": "FC09", "title": "Event Groups and Multi-event Synchronization", "repo": "lab-rv32i-freertos-c-event-groups", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/3f4c1b8b-d54b-58d5-b92d-87a7233cbd9f", "available": true, "current": false, "number": "09", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "ALL-ready i trzyosobowa bariera" } ] }, { "id": "FC10", "title": "Direct-to-task Notifications", "repo": "lab-rv32i-freertos-c-notifications", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/3b57334e-2c35-5207-a51d-9321906db078", "available": true, "current": false, "number": "10", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Count, overwrite i bit flags na jednym slocie" } ] }, { "id": "FC11", "title": "Static Allocation and Bounded Storage", "repo": "lab-rv32i-freertos-c-static-allocation", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/f4d7caf3-d665-5a2d-b9eb-39a120a64ff7", "available": true, "current": false, "number": "11", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Same behavior, two storage policies" } ] }, { "id": "FC12", "title": "Assertions, Hooks, Stack Checks and Runtime Diagnostics", "repo": "lab-rv32i-freertos-c-diagnostics", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/c3027314-85a4-5e4a-af13-0939c7467a62", "available": true, "current": false, "number": "12", "version": "v00.01", "status": "planned", "tasks": [ { "id": "task01", "title": "Diagnose before changing the program" } ] }, { "id": "FC13", "title": "UART Interrupt-to-task Pipeline", "repo": "lab-rv32i-freertos-c-uart", "href": "", "available": false, "current": false, "number": "13", "version": "", "status": "planned", "tasks": [] }, { "id": "FC14", "title": "GPIO, Hardware Timer and Deferred Work", "repo": "lab-rv32i-freertos-c-gpio-timer", "href": "", "available": false, "current": false, "number": "14", "version": "", "status": "planned", "tasks": [] }, { "id": "FC15", "title": "Integrated Deterministic FreeRTOS C Application", "repo": "lab-rv32i-freertos-c-integration", "href": "", "available": false, "current": false, "number": "15", "version": "", "status": "planned", "tasks": [] } ] }, { "id": "freertos-cpp", "title": "FreeRTOS C++", "current": false, "catalog_only": true, "role": "", "status": "", "cards": [ { "id": "K02", "title": "C++ Task Wrapper, CRTP and Lifecycle", "repo": "lab-rv32i-freertos-task-stack-vector", "href": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/948ce9fd-3d0c-5721-a0ae-ef422008fec8", "available": true, "current": false, "number": "02", "version": "v00.04", "status": "existing", "tasks": [ { "id": "task01", "title": "C++ Task wrapper — OOP i debugowanie cyklu życia" } ] }, { "id": "K03", "title": "Vector V1 — Destructor, Move, Ownership and RAII", "repo": "lab-rv32i-freertos-vector-raii", "href": "", "available": false, "current": false, "number": "03", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Vector V1 — transfer własności i powrót heapu" } ] }, { "id": "K04", "title": "Scheduler States, Priorities and Typed Ticks", "repo": "lab-rv32i-freertos-scheduler-states", "href": "", "available": false, "current": false, "number": "04", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Osiem snapshotów decyzji schedulera" } ] }, { "id": "K05", "title": "C++ Heap Bridge, Heap Models and HeapStats", "repo": "lab-rv32i-freertos-heap-models", "href": "", "available": false, "current": false, "number": "05", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Fragmentacja, koalescencja i historyczny watermark" } ] }, { "id": "K06", "title": "MemoryResource and FreeRtosAllocator", "repo": "lab-rv32i-freertos-allocator-resource", "href": "", "available": false, "current": false, "number": "06", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Dwa zasoby, jeden typed allocator" } ] }, { "id": "K07", "title": "TaskHandle_t, Explicit Start and Static Trampoline", "repo": "lab-rv32i-freertos-task-wrapper", "href": "", "available": false, "current": false, "number": "07", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Stabilny obiekt przez statyczny trampoline" } ] }, { "id": "K08", "title": "DynamicTask, StaticTask, Deletion and Lifetime", "repo": "lab-rv32i-freertos-static-task", "href": "", "available": false, "current": false, "number": "08", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Dwie polityki storage i pełna oś delete" } ] }, { "id": "K09", "title": "Scheduler Facade and Scoped Kernel Guards", "repo": "lab-rv32i-freertos-kernel-facade", "href": "", "available": false, "current": false, "number": "09", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Fasada kernela i restore na każdej ścieżce" } ] }, { "id": "K10", "title": "Queue and StaticQueue", "repo": "lab-rv32i-freertos-queue", "href": "", "available": false, "current": false, "number": "10", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Typed byte-copy queue z dwiema politykami storage" } ] }, { "id": "K11", "title": "Mutex, LockGuard and Priority Inheritance", "repo": "lab-rv32i-freertos-mutex", "href": "", "available": false, "current": false, "number": "11", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "LockGuard i zmierzone priority inheritance" } ] }, { "id": "K12", "title": "Semaphores and Task Notifications", "repo": "lab-rv32i-freertos-semaphore-notify", "href": "", "available": false, "current": false, "number": "12", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Semaphore slots i jednoodbiorcza notification" } ] }, { "id": "K13", "title": "EventGroup and Coordinated State", "repo": "lab-rv32i-freertos-event-group", "href": "", "available": false, "current": false, "number": "13", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Typed EventGroup i trzy źródła stanu" } ] }, { "id": "K14", "title": "Software Timer and the Timer Daemon Task", "repo": "lab-rv32i-freertos-sw-timer", "href": "", "available": false, "current": false, "number": "14", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "Static one-shot i periodic timer na daemon tasku" } ] }, { "id": "K15", "title": "Explicit FromISR, UART and GPIO Wrappers", "repo": "lab-rv32i-freertos-isr-drivers", "href": "", "available": false, "current": false, "number": "15", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "UART queue i GPIO notify z realnego IRQ" } ] }, { "id": "K16", "title": "Integrated Real-time Application and Evidence", "repo": "lab-rv32i-freertos-integration", "href": "", "available": false, "current": false, "number": "16", "version": "v00.01", "status": "existing", "tasks": [ { "id": "task01", "title": "End-to-end RTOS service i evidence report" } ] } ] }, { "id": "posix-threads", "title": "POSIX Threads", "current": false, "catalog_only": true, "role": "", "status": "", "cards": [ { "id": "PT01", "title": "Process and Thread Execution Context", "repo": "lab-posix-process-thread", "href": "", "available": false, "current": false, "number": "01", "version": "", "status": "planned", "tasks": [] }, { "id": "PT02", "title": "pthread_create, pthread_join and Lifecycle", "repo": "lab-posix-pthread-create-join", "href": "", "available": false, "current": false, "number": "02", "version": "", "status": "planned", "tasks": [] }, { "id": "PT03", "title": "Arguments, Return Values and Ownership", "repo": "lab-posix-thread-arguments", "href": "", "available": false, "current": false, "number": "03", "version": "", "status": "planned", "tasks": [] }, { "id": "PT04", "title": "Data Races and the Happens-before Question", "repo": "lab-posix-data-races", "href": "", "available": false, "current": false, "number": "04", "version": "", "status": "planned", "tasks": [] }, { "id": "PT05", "title": "Mutex, Critical Section and Deadlock", "repo": "lab-posix-mutex", "href": "", "available": false, "current": false, "number": "05", "version": "", "status": "planned", "tasks": [] }, { "id": "PT06", "title": "Condition Variables and Predicates", "repo": "lab-posix-condition-variable", "href": "", "available": false, "current": false, "number": "06", "version": "", "status": "planned", "tasks": [] }, { "id": "PT07", "title": "Bounded Producer–Consumer Queue", "repo": "lab-posix-producer-consumer", "href": "", "available": false, "current": false, "number": "07", "version": "", "status": "planned", "tasks": [] }, { "id": "PT08", "title": "POSIX Semaphores", "repo": "lab-posix-semaphore", "href": "", "available": false, "current": false, "number": "08", "version": "", "status": "planned", "tasks": [] }, { "id": "PT09", "title": "Reader–Writer Lock", "repo": "lab-posix-rwlock", "href": "", "available": false, "current": false, "number": "09", "version": "", "status": "planned", "tasks": [] }, { "id": "PT10", "title": "C Atomics and Memory Ordering", "repo": "lab-posix-atomics", "href": "", "available": false, "current": false, "number": "10", "version": "", "status": "planned", "tasks": [] }, { "id": "PT11", "title": "Cancellation, Cleanup and Safe Shutdown", "repo": "lab-posix-cancellation-cleanup", "href": "", "available": false, "current": false, "number": "11", "version": "", "status": "planned", "tasks": [] }, { "id": "PT12", "title": "Thread-local Storage", "repo": "lab-posix-thread-local", "href": "", "available": false, "current": false, "number": "12", "version": "", "status": "planned", "tasks": [] }, { "id": "PT13", "title": "Scheduling Policy, Priority and Affinity", "repo": "lab-posix-scheduling", "href": "", "available": false, "current": false, "number": "13", "version": "", "status": "planned", "tasks": [] }, { "id": "PT14", "title": "GDB, Sanitizers and Race Evidence", "repo": "lab-posix-thread-debugging", "href": "", "available": false, "current": false, "number": "14", "version": "", "status": "planned", "tasks": [] }, { "id": "PT15", "title": "POSIX Threads vs FreeRTOS Integration", "repo": "lab-posix-freertos-comparison", "href": "", "available": false, "current": false, "number": "15", "version": "", "status": "planned", "tasks": [] } ] }, { "id": "oop", "title": "OOP and Design Patterns", "current": false, "catalog_only": true, "role": "reference", "status": "", "cards": [ { "id": "OOP01", "title": "Strategy — Replaceable Behaviour", "repo": "lab-cpp-oop-strategy", "href": "", "available": false, "current": false, "number": "01", "version": "", "status": "design", "tasks": [] }, { "id": "OOP02", "title": "Adapter — Stable Boundary", "repo": "lab-cpp-oop-adapter", "href": "", "available": false, "current": false, "number": "02", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP03", "title": "Template Method — Fixed Skeleton", "repo": "lab-cpp-oop-template-method", "href": "", "available": false, "current": false, "number": "03", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP04", "title": "Static vs Dynamic Dispatch", "repo": "lab-cpp-oop-dispatch", "href": "", "available": false, "current": false, "number": "04", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP05", "title": "RAII and Ownership", "repo": "lab-cpp-oop-raii", "href": "", "available": false, "current": false, "number": "05", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP06", "title": "State — Explicit Behaviour", "repo": "lab-cpp-oop-state", "href": "", "available": false, "current": false, "number": "06", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP07", "title": "Facade — Subsystem Boundary", "repo": "lab-cpp-oop-facade", "href": "", "available": false, "current": false, "number": "07", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP08", "title": "Command — Request as Object", "repo": "lab-cpp-oop-command", "href": "", "available": false, "current": false, "number": "08", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP09", "title": "Observer — Subscription and Telemetry", "repo": "lab-cpp-oop-observer", "href": "", "available": false, "current": false, "number": "09", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP10", "title": "Factory Method — Resource Policy", "repo": "lab-cpp-oop-factory-method", "href": "", "available": false, "current": false, "number": "10", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP11", "title": "Builder — Valid Configuration", "repo": "lab-cpp-oop-builder", "href": "", "available": false, "current": false, "number": "11", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP12", "title": "Decorator — Measurement and Diagnostics", "repo": "lab-cpp-oop-decorator", "href": "", "available": false, "current": false, "number": "12", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP13", "title": "Composite — Component Tree", "repo": "lab-cpp-oop-composite", "href": "", "available": false, "current": false, "number": "13", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP14", "title": "Chain of Responsibility", "repo": "lab-cpp-oop-chain", "href": "", "available": false, "current": false, "number": "14", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP15", "title": "Pattern-language Integration", "repo": "lab-cpp-oop-integration", "href": "", "available": false, "current": false, "number": "15", "version": "", "status": "planned", "tasks": [] } ] } ] }, { "id": "year-3", "title": "Rok 3 · plan", "current": false, "series": [ { "id": "modern-cpp-stl", "title": "Modern C++ / STL", "current": false, "catalog_only": true, "role": "", "status": "scope-reserved", "cards": [] }, { "id": "std-threads", "title": "std::thread / std::jthread", "current": false, "catalog_only": true, "role": "", "status": "scope-reserved", "cards": [] }, { "id": "boost-asio", "title": "Boost.Asio", "current": false, "catalog_only": true, "role": "", "status": "scope-reserved", "cards": [] }, { "id": "oop", "title": "OOP and Design Patterns", "current": false, "catalog_only": true, "role": "reference", "status": "", "cards": [ { "id": "OOP01", "title": "Strategy — Replaceable Behaviour", "repo": "lab-cpp-oop-strategy", "href": "", "available": false, "current": false, "number": "01", "version": "", "status": "design", "tasks": [] }, { "id": "OOP02", "title": "Adapter — Stable Boundary", "repo": "lab-cpp-oop-adapter", "href": "", "available": false, "current": false, "number": "02", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP03", "title": "Template Method — Fixed Skeleton", "repo": "lab-cpp-oop-template-method", "href": "", "available": false, "current": false, "number": "03", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP04", "title": "Static vs Dynamic Dispatch", "repo": "lab-cpp-oop-dispatch", "href": "", "available": false, "current": false, "number": "04", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP05", "title": "RAII and Ownership", "repo": "lab-cpp-oop-raii", "href": "", "available": false, "current": false, "number": "05", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP06", "title": "State — Explicit Behaviour", "repo": "lab-cpp-oop-state", "href": "", "available": false, "current": false, "number": "06", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP07", "title": "Facade — Subsystem Boundary", "repo": "lab-cpp-oop-facade", "href": "", "available": false, "current": false, "number": "07", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP08", "title": "Command — Request as Object", "repo": "lab-cpp-oop-command", "href": "", "available": false, "current": false, "number": "08", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP09", "title": "Observer — Subscription and Telemetry", "repo": "lab-cpp-oop-observer", "href": "", "available": false, "current": false, "number": "09", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP10", "title": "Factory Method — Resource Policy", "repo": "lab-cpp-oop-factory-method", "href": "", "available": false, "current": false, "number": "10", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP11", "title": "Builder — Valid Configuration", "repo": "lab-cpp-oop-builder", "href": "", "available": false, "current": false, "number": "11", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP12", "title": "Decorator — Measurement and Diagnostics", "repo": "lab-cpp-oop-decorator", "href": "", "available": false, "current": false, "number": "12", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP13", "title": "Composite — Component Tree", "repo": "lab-cpp-oop-composite", "href": "", "available": false, "current": false, "number": "13", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP14", "title": "Chain of Responsibility", "repo": "lab-cpp-oop-chain", "href": "", "available": false, "current": false, "number": "14", "version": "", "status": "planned", "tasks": [] }, { "id": "OOP15", "title": "Pattern-language Integration", "repo": "lab-cpp-oop-integration", "href": "", "available": false, "current": false, "number": "15", "version": "", "status": "planned", "tasks": [] } ] } ] }, { "id": "year-4", "title": "Rok 4 · plan", "current": false, "series": [ { "id": "transformers-gpu", "title": "Transformers on GPU", "current": false, "catalog_only": true, "role": "", "status": "scope-reserved", "cards": [] } ] } ] }, { "id": "fiz", "title": "FIZ · Fizyka", "current": false, "levels": [ { "id": "all", "title": "Katalog", "current": false, "series": [ { "id": "fiz", "title": "Fizyka", "current": false, "catalog_only": false, "role": "", "status": "", "cards": [ { "id": "ruch-1d", "title": "Ruch 1D", "repo": "ruch-1d", "href": "", "available": false, "current": false, "number": "", "version": "", "status": "", "tasks": [] }, { "id": "ruch-2d", "title": "Ruch 2D", "repo": "ruch-2d", "href": "", "available": false, "current": false, "number": "", "version": "", "status": "", "tasks": [] }, { "id": "ruch-po-okregu", "title": "Ruch po okręgu", "repo": "ruch-po-okregu", "href": "", "available": false, "current": false, "number": "", "version": "", "status": "", "tasks": [] } ] } ] } ] } ] }, "total_pages": 9, "front": { "header_html": "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n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n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
", "left_margin_html": "
TECH
", "right_margin_html": "
OG
", "goal_title": "Cel karty", "goal_html": "

Uczeń rozróżnia wybór najwyższego priorytetu od time slicing między równymi priorytetami. Odtwarza tick oraz natychmiastowe wywłaszczenie po zmianie priorytetu i wiąże ślad aplikacji ze stanem Hazard3/GDB.

", "scope_title": "Zakres karty", "scope_html": "

Dwa CPU-bound taski o priorytecie 2 tworzą ślad A-B-A. Peer A podnosi Ready task z priorytetu 0 do 3; HIGH musi wykonać się przed powrotem vTaskPrioritySet. Verifier o priorytecie 1 publikuje PASS dopiero po zakończeniu wyższych tasków. Poza zakresem są delay, kolejki, semafory, ISR-safe API i C++.

", "scope_columns": [ "chapter", "task", "idea", "priority", "status", "version" ], "scope_headers": [ "Lekcja", "Task", "Najważniejsza idea", "Priorytet", "Status", "Version" ], "scope_rows": [ { "chapter": "FC03", "task": "Task01", "idea_html": "

Tick, priority selection, preemption i time slicing

", "priority": "główny", "status": "ready", "status_label": "opracowane", "version": "v00.01", "key": true } ] }, "sections": [ { "id": "section-1-content", "index": 1, "title": "A1 — Context", "show_heading": false, "toc_entry": true, "header_html": "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [], "assets": [ { "label": "fig:a1-context", "logical_label": "fig:a1-context", "figure_number": 1, "caption": "A1 CONTEXT — timer, port, scheduler i taski aplikacji. — część 1/1 (r1 c1)", "alt": "Pionowy kontekst ticka i schedulera FreeRTOS na Hazard3.", "href": "figures/a1-context.svg", "source_href": "figures/a1-context.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc03-a1-context-tile-1", "title": "A1 · granice ticka i schedulera", "task": { "id": "task01", "label": "Task01 · scheduler experiment" }, "block": { "id": "a1-context", "label": "A1 CONTEXT", "description": "Kierunek wykonania i odpowiedzialności." }, "phases": [ { "id": "tick-boundary", "label": "TICK / SCHEDULER", "steps": [ { "id": "timer", "number": 1, "label": "mtime reaches mtimecmp", "mode": "CODE", "strategy_ref": "code.tick-boundary", "svg_label": "01", "svg_target": "Timer", "code_ref": "include/FreeRTOSConfig.h:4", "description": "Hazard3 generuje machine-timer interrupt.", "evidence": "Adresy mtime i mtimecmp pochodzą z konfiguracji portu.", "strategy": { "id": "task01/a1-context/tick-boundary/timer", "kind": "code", "action": "open", "prerequisites": [ "repozytorium FC03", "zweryfikowany source blob" ], "layout": [ "read-only source", "granica timer/port/kernel/aplikacja" ], "commands": [ "rg -n 'configTICK_RATE_HZ|vApplicationTickHook|xTaskIncrementTick' include src vendor/FreeRTOS-Kernel" ], "expected_observations": [ "tick jest okazją do planowania", "aplikacja zapisuje tylko ograniczony rekord" ], "assertions": [ "tick hook nie drukuje i nie blokuje", "aplikacja nie zależy od pxCurrentTCB" ], "evidence_fields": [ "code_ref", "source_git_blob", "kotwica UML" ], "template_id": "code.tick-boundary" } }, { "id": "port", "number": 2, "label": "RV32I port handles the tick", "mode": "CODE", "strategy_ref": "code.tick-boundary", "svg_label": "02", "svg_target": "Port", "code_ref": "vendor/FreeRTOS-Kernel/portable/GCC/RISC-V/portASM.S:1", "description": "Port przełącza domenę ISR i wchodzi do kernela.", "evidence": "Tick hook działa w kontekście przerwania.", "strategy": { "id": "task01/a1-context/tick-boundary/port", "kind": "code", "action": "open", "prerequisites": [ "repozytorium FC03", "zweryfikowany source blob" ], "layout": [ "read-only source", "granica timer/port/kernel/aplikacja" ], "commands": [ "rg -n 'configTICK_RATE_HZ|vApplicationTickHook|xTaskIncrementTick' include src vendor/FreeRTOS-Kernel" ], "expected_observations": [ "tick jest okazją do planowania", "aplikacja zapisuje tylko ograniczony rekord" ], "assertions": [ "tick hook nie drukuje i nie blokuje", "aplikacja nie zależy od pxCurrentTCB" ], "evidence_fields": [ "code_ref", "source_git_blob", "kotwica UML" ], "template_id": "code.tick-boundary" } }, { "id": "scheduler", "number": 3, "label": "scheduler selects a Ready task", "mode": "CODE", "strategy_ref": "code.tick-boundary", "svg_label": "03", "svg_target": "Scheduler", "code_ref": "vendor/FreeRTOS-Kernel/tasks.c:1", "description": "Priorytet wybiera klasę, time slicing rotuje równych.", "evidence": "Reguły pozostają własnością kernela.", "strategy": { "id": "task01/a1-context/tick-boundary/scheduler", "kind": "code", "action": "open", "prerequisites": [ "repozytorium FC03", "zweryfikowany source blob" ], "layout": [ "read-only source", "granica timer/port/kernel/aplikacja" ], "commands": [ "rg -n 'configTICK_RATE_HZ|vApplicationTickHook|xTaskIncrementTick' include src vendor/FreeRTOS-Kernel" ], "expected_observations": [ "tick jest okazją do planowania", "aplikacja zapisuje tylko ograniczony rekord" ], "assertions": [ "tick hook nie drukuje i nie blokuje", "aplikacja nie zależy od pxCurrentTCB" ], "evidence_fields": [ "code_ref", "source_git_blob", "kotwica UML" ], "template_id": "code.tick-boundary" } }, { "id": "application", "number": 4, "label": "application records evidence", "mode": "CODE", "strategy_ref": "code.tick-boundary", "svg_label": "04", "svg_target": "Application", "code_ref": "src/tasks/task01_scheduler.c:116", "description": "Aplikacja zapisuje tylko bounded evidence.", "evidence": "Brak drukowania, alokacji i blokowania w tick hook.", "strategy": { "id": "task01/a1-context/tick-boundary/application", "kind": "code", "action": "open", "prerequisites": [ "repozytorium FC03", "zweryfikowany source blob" ], "layout": [ "read-only source", "granica timer/port/kernel/aplikacja" ], "commands": [ "rg -n 'configTICK_RATE_HZ|vApplicationTickHook|xTaskIncrementTick' include src vendor/FreeRTOS-Kernel" ], "expected_observations": [ "tick jest okazją do planowania", "aplikacja zapisuje tylko ograniczony rekord" ], "assertions": [ "tick hook nie drukuje i nie blokuje", "aplikacja nie zależy od pxCurrentTCB" ], "evidence_fields": [ "code_ref", "source_git_blob", "kotwica UML" ], "template_id": "code.tick-boundary" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 614.0, "height": 502.0, "full_x": 0.0, "full_y": 0.0, "full_width": 614.0, "full_height": 502.0, "page_width": 660.0, "page_height": 760.0, "overview": true, "step_ids": [ "application", "port", "scheduler", "timer" ] }, "diagram_title": "A1 · granice ticka i schedulera", "diagram_block_label": "A1 CONTEXT", "diagram_description": "Kierunek wykonania i odpowiedzialności.", "diagram_phase_labels": [ "TICK / SCHEDULER" ] } ], "steps": [], "spread_group": "", "spread_label": "A1 CONTEXT — timer, port, scheduler i taski aplikacji.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "portrait" }, { "id": "section-2-content", "index": 2, "title": "A2 — Structure", "show_heading": false, "toc_entry": true, "header_html": "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [], "assets": [ { "label": "fig:a2-structure", "logical_label": "fig:a2-structure", "figure_number": 2, "caption": "A2 STRUCTURE — konteksty tasków i rekordy śladów. — część 1/1 (r1 c1)", "alt": "Struktury peer, high probe, verifier i dwa rekordy dowodowe.", "href": "figures/a2-structure.svg", "source_href": "figures/a2-structure.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc03-a2-structure-tile-1", "title": "A2 · dane eksperymentu", "task": { "id": "task01", "label": "Task01 · scheduler experiment" }, "block": { "id": "a2-structure", "label": "A2 STRUCTURE", "description": "Jawne dane aplikacji, nie kopia prywatnych struktur kernela." }, "phases": [ { "id": "contexts-traces", "label": "CONTEXTS / TRACES", "steps": [ { "id": "peers", "number": 1, "label": "two equal-priority peer contexts", "mode": "CODE", "strategy_ref": "code.scheduler-data", "svg_label": "01", "svg_target": "Peers", "code_ref": "include/task01_scheduler.h:23", "description": "Peery dzielą typ, ale mają osobne context, handle i stosy.", "evidence": "configured_priority=2 dla obu.", "strategy": { "id": "task01/a2-structure/contexts-traces/peers", "kind": "code", "action": "open", "prerequisites": [ "freestanding C11", "include/task01_scheduler.h" ], "layout": [ "konteksty C", "priorytety", "bufory śladów" ], "commands": [ "rg -n 'PeerContext|HighProbeContext|g_switch_task|g_preemption_order' include src" ], "expected_observations": [ "taski mają jawne konteksty", "rekordy mają stałą pojemność" ], "assertions": [ "high ma kontrakt 0→3", "verifier ma priorytet 1" ], "evidence_fields": [ "layout pól", "stałe priorytetów", "pojemność śladu" ], "template_id": "code.scheduler-data" } }, { "id": "probe", "number": 2, "label": "high probe priority contract 0 to 3", "mode": "CODE", "strategy_ref": "code.scheduler-data", "svg_label": "02", "svg_target": "Probe", "code_ref": "include/task01_scheduler.h:43", "description": "Probe jest Ready, lecz początkowo poniżej verifiera.", "evidence": "initial_priority=0, target_priority=3.", "strategy": { "id": "task01/a2-structure/contexts-traces/probe", "kind": "code", "action": "open", "prerequisites": [ "freestanding C11", "include/task01_scheduler.h" ], "layout": [ "konteksty C", "priorytety", "bufory śladów" ], "commands": [ "rg -n 'PeerContext|HighProbeContext|g_switch_task|g_preemption_order' include src" ], "expected_observations": [ "taski mają jawne konteksty", "rekordy mają stałą pojemność" ], "assertions": [ "high ma kontrakt 0→3", "verifier ma priorytet 1" ], "evidence_fields": [ "layout pól", "stałe priorytetów", "pojemność śladu" ], "template_id": "code.scheduler-data" } }, { "id": "verifier", "number": 3, "label": "verifier is deliberately lowest runnable task", "mode": "RUN", "event_id": "E03", "strategy_ref": "run.prepare", "svg_label": "03", "svg_target": "Verify", "code_ref": "src/tasks/task01_scheduler.c:519", "snapshot_ref": "task01.priorities", "description": "Verifier ma priorytet 1.", "evidence": "Nie może opublikować PASS przed zakończeniem peerów.", "strategy": { "id": "task01/a2-structure/contexts-traces/verifier", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3 online", "czysta RAM", "aktualny ELF" ], "layout": [ "source", "konteksty", "uchwyty", "priorytety" ], "commands": [ "print g_high_probe", "print g_peer_a", "print g_peer_b", "print g_verifier" ], "expected_observations": [ "high jest Ready przy priorytecie 0", "peery mają priorytet 2, verifier 1" ], "assertions": [ "wszystkie uchwyty są ważne przed startem schedulera", "publiczne API zwraca oczekiwane priorytety" ], "evidence_fields": [ "event_id", "handle", "priority", "timestamp" ], "template_id": "run.prepare" } }, { "id": "switch-trace", "number": 4, "label": "task-change trace stores id and tick", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.timeslice", "svg_label": "04", "svg_target": "SwitchTrace", "code_ref": "src/tasks/task01_scheduler.c:172", "snapshot_ref": "task01.timeslice", "description": "Powtórzenia w tej samej obserwowanej zmianie nie są logowane.", "evidence": "Zatwierdzony podciąg A/B/A.", "strategy": { "id": "task01/a2-structure/contexts-traces/switch-trace", "kind": "run", "action": "replay", "prerequisites": [ "dwa CPU-bound taski priority=2", "time slicing włączony" ], "layout": [ "pętle peerów", "task-change trace", "ticki" ], "commands": [ "print g_switch_task", "print g_switch_tick", "print g_aba_task", "print g_peer_changes" ], "expected_observations": [ "zatwierdzony ślad zawiera A→B→A", "ticki są niemalejące" ], "assertions": [ "zapisywana jest jedna pozycja na obserwowaną zmianę taska", "dowód nie zakłada równego udziału CPU" ], "evidence_fields": [ "triplet A/B/A", "ticks", "change count", "timestamp" ], "template_id": "run.timeslice" } }, { "id": "order-trace", "number": 5, "label": "preemption markers are separate", "mode": "RUN", "event_id": "E10", "strategy_ref": "run.preempt", "svg_label": "05", "svg_target": "OrderTrace", "code_ref": "src/tasks/task01_scheduler.c:305", "snapshot_ref": "task01.after-raise", "description": "Marker projection nie udaje pełnego task trace.", "evidence": "before/HIGH/after.", "strategy": { "id": "task01/a2-structure/contexts-traces/order-trace", "kind": "run", "action": "replay", "prerequisites": [ "A→B→A wykryte", "high Ready przy priorytecie 0" ], "layout": [ "call site vTaskPrioritySet", "high task", "markery kolejności" ], "commands": [ "print g_preemption_order", "print g_high_probe", "info registers pc sp a0 a1" ], "expected_observations": [ "high uruchamia się przy priorytecie 3", "caller nie zapisuje after przed HIGH" ], "assertions": [ "projekcja markerów to before/HIGH/after", "verifier jeszcze nie działa" ], "evidence_fields": [ "marker projection", "priority", "PC", "SP", "timestamp" ], "template_id": "run.preempt" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 896.0, "height": 324.0, "full_x": 0.0, "full_y": 0.0, "full_width": 896.0, "full_height": 324.0, "page_width": 940.0, "page_height": 560.0, "overview": true, "step_ids": [ "order-trace", "peers", "probe", "switch-trace", "verifier" ] }, "diagram_title": "A2 · dane eksperymentu", "diagram_block_label": "A2 STRUCTURE", "diagram_description": "Jawne dane aplikacji, nie kopia prywatnych struktur kernela.", "diagram_phase_labels": [ "CONTEXTS / TRACES" ] } ], "steps": [], "spread_group": "", "spread_label": "A2 STRUCTURE — konteksty tasków i rekordy śladów.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "landscape" }, { "id": "section-3-content", "index": 3, "title": "A4 — Application", "show_heading": false, "toc_entry": true, "header_html": "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [], "assets": [ { "label": "fig:a4-application", "logical_label": "fig:a4-application", "figure_number": 3, "caption": "A4 APPLICATION — topologia tasków i inwarianty priorytetów. — część 1/1 (r1 c1)", "alt": "Dwa peery, high probe i verifier w kontrolowanym eksperymencie.", "href": "figures/a4-application.svg", "source_href": "figures/a4-application.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc03-a4-application-tile-1", "title": "A4 · topologia eksperymentu", "task": { "id": "task01", "label": "Task01 · scheduler experiment" }, "block": { "id": "a4-application", "label": "A4 APPLICATION", "description": "Konkretny przypadek użycia schedulera." }, "phases": [ { "id": "priority-topology", "label": "TASKS / PRIORITIES", "steps": [ { "id": "peer-a", "number": 1, "label": "peer A runs CPU-bound at priority 2", "mode": "RUN", "event_id": "E05", "strategy_ref": "run.timeslice", "svg_label": "01", "svg_target": "PeerA", "code_ref": "src/tasks/task01_scheduler.c:248", "snapshot_ref": "task01.peer-entry", "description": "Peer A rejestruje zmiany i inicjuje raise.", "evidence": "Własny context, TCB i stos.", "strategy": { "id": "task01/a4-application/priority-topology/peer-a", "kind": "run", "action": "replay", "prerequisites": [ "dwa CPU-bound taski priority=2", "time slicing włączony" ], "layout": [ "pętle peerów", "task-change trace", "ticki" ], "commands": [ "print g_switch_task", "print g_switch_tick", "print g_aba_task", "print g_peer_changes" ], "expected_observations": [ "zatwierdzony ślad zawiera A→B→A", "ticki są niemalejące" ], "assertions": [ "zapisywana jest jedna pozycja na obserwowaną zmianę taska", "dowód nie zakłada równego udziału CPU" ], "evidence_fields": [ "triplet A/B/A", "ticks", "change count", "timestamp" ], "template_id": "run.timeslice" } }, { "id": "peer-b", "number": 2, "label": "peer B competes at equal priority", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.timeslice", "svg_label": "02", "svg_target": "PeerB", "code_ref": "src/tasks/task01_scheduler.c:248", "snapshot_ref": "task01.timeslice", "description": "B jest konieczny do podciągu A/B/A.", "evidence": "Oba peery wykonują pracę.", "strategy": { "id": "task01/a4-application/priority-topology/peer-b", "kind": "run", "action": "replay", "prerequisites": [ "dwa CPU-bound taski priority=2", "time slicing włączony" ], "layout": [ "pętle peerów", "task-change trace", "ticki" ], "commands": [ "print g_switch_task", "print g_switch_tick", "print g_aba_task", "print g_peer_changes" ], "expected_observations": [ "zatwierdzony ślad zawiera A→B→A", "ticki są niemalejące" ], "assertions": [ "zapisywana jest jedna pozycja na obserwowaną zmianę taska", "dowód nie zakłada równego udziału CPU" ], "evidence_fields": [ "triplet A/B/A", "ticks", "change count", "timestamp" ], "template_id": "run.timeslice" } }, { "id": "high", "number": 3, "label": "peer A raises high probe to 3", "mode": "RUN", "event_id": "E09", "strategy_ref": "run.preempt", "svg_label": "03", "svg_target": "High", "code_ref": "src/tasks/task01_scheduler.c:346", "snapshot_ref": "task01.high-preempts", "description": "High preemptuje caller i self-delete.", "evidence": "Marker HIGH poprzedza after_raise.", "strategy": { "id": "task01/a4-application/priority-topology/high", "kind": "run", "action": "replay", "prerequisites": [ "A→B→A wykryte", "high Ready przy priorytecie 0" ], "layout": [ "call site vTaskPrioritySet", "high task", "markery kolejności" ], "commands": [ "print g_preemption_order", "print g_high_probe", "info registers pc sp a0 a1" ], "expected_observations": [ "high uruchamia się przy priorytecie 3", "caller nie zapisuje after przed HIGH" ], "assertions": [ "projekcja markerów to before/HIGH/after", "verifier jeszcze nie działa" ], "evidence_fields": [ "marker projection", "priority", "PC", "SP", "timestamp" ], "template_id": "run.preempt" } }, { "id": "verifier", "number": 4, "label": "verifier runs last at priority 1", "mode": "RUN", "event_id": "E12", "strategy_ref": "run.pass", "svg_label": "04", "svg_target": "Verifier", "code_ref": "src/tasks/task01_scheduler.c:386", "snapshot_ref": "task01.pass", "description": "Verifier publikuje końcowy dowód.", "evidence": "PASS dopiero po self-delete tasków o priorytecie 2/3.", "strategy": { "id": "task01/a4-application/priority-topology/verifier", "kind": "run", "action": "replay", "prerequisites": [ "high i oba peery zakończone", "verifier wybrany" ], "layout": [ "konteksty", "ślady", "końcowe asercje" ], "commands": [ "print g_scheduler_pass", "print g_aba_task", "print g_preemption_order", "print g_tick_hook_count" ], "expected_observations": [ "A/B/A i before/HIGH/after są obecne", "program kończy się PASS" ], "assertions": [ "PASS=1", "g_peers_finished=2", "tick hook count>=2" ], "evidence_fields": [ "PASS", "traces", "ticks", "source blob", "image hash", "timestamp" ], "template_id": "run.pass" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 895.0, "height": 233.0, "full_x": 0.0, "full_y": 0.0, "full_width": 895.0, "full_height": 233.0, "page_width": 940.0, "page_height": 560.0, "overview": true, "step_ids": [ "high", "peer-a", "peer-b", "verifier" ] }, "diagram_title": "A4 · topologia eksperymentu", "diagram_block_label": "A4 APPLICATION", "diagram_description": "Konkretny przypadek użycia schedulera.", "diagram_phase_labels": [ "TASKS / PRIORITIES" ] } ], "steps": [], "spread_group": "", "spread_label": "A4 APPLICATION — topologia tasków i inwarianty priorytetów.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "landscape" }, { "id": "section-4-content", "index": 4, "title": "A5 — Flow", "show_heading": false, "toc_entry": true, "header_html": "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [], "assets": [ { "label": "fig:a5-flow-a", "logical_label": "fig:a5-flow-a", "figure_number": 4, "caption": "A5 część 1/2 — konfiguracja, start, pierwszy tick i A-B-A. — część 1/1 (r1 c1)", "alt": "Pierwsza połowa sekwencji eksperymentu schedulera.", "href": "figures/a5-flow-a.svg", "source_href": "figures/a5-flow-a.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-sequence", "storage_key": "fc03-a5-flow-a-tile-1", "title": "część 1/2 · przygotowanie i time slicing", "task": { "id": "task01", "label": "Task01 · scheduler experiment" }, "block": { "id": "a5-flow", "label": "A5 FLOW", "description": "Jeden przebieg E01–E12 i wspólni uczestnicy." }, "phases": [ { "id": "prepare-timeslice", "label": "PREPARE / TIME SLICE", "steps": [ { "id": "config", "number": 1, "label": "scheduler configuration committed", "mode": "RUN", "event_id": "E01", "strategy_ref": "run.prepare", "svg_label": "01", "code_ref": "src/tasks/task01_scheduler.c:486", "snapshot_ref": "task01.config", "description": "Eksperyment zaczyna się z czystą RAM.", "evidence": "One core, preemption, time slicing i tick hook są w kodzie konfiguracji.", "strategy": { "id": "task01/a5-flow/prepare-timeslice/config", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3 online", "czysta RAM", "aktualny ELF" ], "layout": [ "source", "konteksty", "uchwyty", "priorytety" ], "commands": [ "print g_high_probe", "print g_peer_a", "print g_peer_b", "print g_verifier" ], "expected_observations": [ "high jest Ready przy priorytecie 0", "peery mają priorytet 2, verifier 1" ], "assertions": [ "wszystkie uchwyty są ważne przed startem schedulera", "publiczne API zwraca oczekiwane priorytety" ], "evidence_fields": [ "event_id", "handle", "priority", "timestamp" ], "template_id": "run.prepare" } }, { "id": "high-ready", "number": 2, "label": "high probe Ready at priority 0", "mode": "RUN", "event_id": "E02", "strategy_ref": "run.prepare", "svg_label": "02", "code_ref": "src/tasks/task01_scheduler.c:488", "snapshot_ref": "task01.high-dormant", "description": "High istnieje, lecz nie może jeszcze wyprzedzić verifiera.", "evidence": "handle != NULL, phase=READY.", "strategy": { "id": "task01/a5-flow/prepare-timeslice/high-ready", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3 online", "czysta RAM", "aktualny ELF" ], "layout": [ "source", "konteksty", "uchwyty", "priorytety" ], "commands": [ "print g_high_probe", "print g_peer_a", "print g_peer_b", "print g_verifier" ], "expected_observations": [ "high jest Ready przy priorytecie 0", "peery mają priorytet 2, verifier 1" ], "assertions": [ "wszystkie uchwyty są ważne przed startem schedulera", "publiczne API zwraca oczekiwane priorytety" ], "evidence_fields": [ "event_id", "handle", "priority", "timestamp" ], "template_id": "run.prepare" } }, { "id": "priorities", "number": 3, "label": "public API confirms 0,2,2,1", "mode": "RUN", "event_id": "E03", "strategy_ref": "run.prepare", "svg_label": "03", "code_ref": "src/tasks/task01_scheduler.c:527", "snapshot_ref": "task01.priorities", "description": "Priorytety są odczytywane przez publiczne API.", "evidence": "high=0, A=2, B=2, verifier=1.", "strategy": { "id": "task01/a5-flow/prepare-timeslice/priorities", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3 online", "czysta RAM", "aktualny ELF" ], "layout": [ "source", "konteksty", "uchwyty", "priorytety" ], "commands": [ "print g_high_probe", "print g_peer_a", "print g_peer_b", "print g_verifier" ], "expected_observations": [ "high jest Ready przy priorytecie 0", "peery mają priorytet 2, verifier 1" ], "assertions": [ "wszystkie uchwyty są ważne przed startem schedulera", "publiczne API zwraca oczekiwane priorytety" ], "evidence_fields": [ "event_id", "handle", "priority", "timestamp" ], "template_id": "run.prepare" } }, { "id": "scheduler", "number": 4, "label": "vTaskStartScheduler", "mode": "RUN", "event_id": "E04", "strategy_ref": "run.prepare", "svg_label": "04", "code_ref": "src/tasks/task01_scheduler.c:545", "snapshot_ref": "task01.scheduler", "description": "Ostatni checkpoint na startup stack.", "evidence": "Wszystkie handle są ważne.", "strategy": { "id": "task01/a5-flow/prepare-timeslice/scheduler", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3 online", "czysta RAM", "aktualny ELF" ], "layout": [ "source", "konteksty", "uchwyty", "priorytety" ], "commands": [ "print g_high_probe", "print g_peer_a", "print g_peer_b", "print g_verifier" ], "expected_observations": [ "high jest Ready przy priorytecie 0", "peery mają priorytet 2, verifier 1" ], "assertions": [ "wszystkie uchwyty są ważne przed startem schedulera", "publiczne API zwraca oczekiwane priorytety" ], "evidence_fields": [ "event_id", "handle", "priority", "timestamp" ], "template_id": "run.prepare" } }, { "id": "peer-entry", "number": 5, "label": "first equal-priority peer runs", "mode": "RUN", "event_id": "E05", "strategy_ref": "run.timeslice", "svg_label": "05", "code_ref": "src/tasks/task01_scheduler.c:248", "snapshot_ref": "task01.peer-entry", "description": "Pierwszy peer przechodzi do Running.", "evidence": "SP należy do jego task stack.", "strategy": { "id": "task01/a5-flow/prepare-timeslice/peer-entry", "kind": "run", "action": "replay", "prerequisites": [ "dwa CPU-bound taski priority=2", "time slicing włączony" ], "layout": [ "pętle peerów", "task-change trace", "ticki" ], "commands": [ "print g_switch_task", "print g_switch_tick", "print g_aba_task", "print g_peer_changes" ], "expected_observations": [ "zatwierdzony ślad zawiera A→B→A", "ticki są niemalejące" ], "assertions": [ "zapisywana jest jedna pozycja na obserwowaną zmianę taska", "dowód nie zakłada równego udziału CPU" ], "evidence_fields": [ "triplet A/B/A", "ticks", "change count", "timestamp" ], "template_id": "run.timeslice" } }, { "id": "first-tick", "number": 6, "label": "first machine-timer tick observed", "mode": "RUN", "event_id": "E06", "strategy_ref": "run.tick", "svg_label": "06", "code_ref": "src/tasks/task01_scheduler.c:116", "snapshot_ref": "task01.first-tick", "description": "ISR-safe sink przechwytuje pierwszy tick.", "evidence": "mcause=0x80000007, mepc i ISR SP.", "strategy": { "id": "task01/a5-flow/prepare-timeslice/first-tick", "kind": "run", "action": "replay", "prerequisites": [ "scheduler uruchomiony", "tick hook włączony" ], "layout": [ "tick hook", "CSR", "ISR stack", "przerwany task" ], "commands": [ "print g_tick_hook_count", "print/x g_first_tick_mcause", "print/x g_first_tick_mepc", "print/x g_first_tick_sp" ], "expected_observations": [ "mcause oznacza machine-timer interrupt", "mepc wskazuje przerwany kod" ], "assertions": [ "checkpoint ticka jest jednorazowy", "sink ISR nie korzysta z task-context API" ], "evidence_fields": [ "tick", "mcause", "mepc", "ISR SP", "timestamp" ], "template_id": "run.tick" } }, { "id": "timeslice", "number": 7, "label": "trace contains A to B to A", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.timeslice", "svg_label": "07", "code_ref": "src/tasks/task01_scheduler.c:290", "snapshot_ref": "task01.timeslice", "description": "Checkpoint emituje peer A po wykryciu podciągu.", "evidence": "A/B/A i niemalejące ticki.", "strategy": { "id": "task01/a5-flow/prepare-timeslice/timeslice", "kind": "run", "action": "replay", "prerequisites": [ "dwa CPU-bound taski priority=2", "time slicing włączony" ], "layout": [ "pętle peerów", "task-change trace", "ticki" ], "commands": [ "print g_switch_task", "print g_switch_tick", "print g_aba_task", "print g_peer_changes" ], "expected_observations": [ "zatwierdzony ślad zawiera A→B→A", "ticki są niemalejące" ], "assertions": [ "zapisywana jest jedna pozycja na obserwowaną zmianę taska", "dowód nie zakłada równego udziału CPU" ], "evidence_fields": [ "triplet A/B/A", "ticks", "change count", "timestamp" ], "template_id": "run.timeslice" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 903.0, "height": 310.0, "full_x": 0.0, "full_y": 0.0, "full_width": 903.0, "full_height": 310.0, "page_width": 940.0, "page_height": 560.0, "overview": true, "step_ids": [ "config", "first-tick", "high-ready", "peer-entry", "priorities", "scheduler", "timeslice" ] }, "diagram_title": "część 1/2 · przygotowanie i time slicing", "diagram_block_label": "A5 FLOW", "diagram_description": "Jeden przebieg E01–E12 i wspólni uczestnicy.", "diagram_phase_labels": [ "PREPARE / TIME SLICE" ] } ], "steps": [], "spread_group": "fc03-scheduler-flow", "spread_label": "FC03 · scheduler experiment", "spread_columns": 2, "spread_index": 1, "spread_count": 2, "page_orientation": "landscape" }, { "id": "section-5-content", "index": 5, "title": "A5 — Flow", "show_heading": false, "toc_entry": false, "header_html": "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n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n\n\n\n\n\n\n\n\n\n\n\n
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [], "assets": [ { "label": "fig:a5-flow-b", "logical_label": "fig:a5-flow-b", "figure_number": 5, "caption": "A5 część 2/2 — priority raise, natychmiastowe wywłaszczenie i PASS. — część 1/1 (r1 c1)", "alt": "Druga połowa sekwencji eksperymentu schedulera.", "href": "figures/a5-flow-b.svg", "source_href": "figures/a5-flow-b.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-sequence", "storage_key": "fc03-a5-flow-b-tile-1", "title": "część 2/2 · preemption i zakończenie", "task": { "id": "task01", "label": "Task01 · scheduler experiment" }, "block": { "id": "a5-flow", "label": "A5 FLOW", "description": "Kontynuacja tych samych tasków i rekordów." }, "phases": [ { "id": "preempt-finish", "label": "PREEMPT / FINISH", "steps": [ { "id": "before-raise", "number": 8, "label": "peer A commits before_raise", "mode": "RUN", "event_id": "E08", "strategy_ref": "run.preempt", "svg_label": "08", "code_ref": "src/tasks/task01_scheduler.c:299", "snapshot_ref": "task01.before-raise", "description": "Pierwszy marker poprzedza vTaskPrioritySet.", "evidence": "order={before}, after flag=0.", "strategy": { "id": "task01/a5-flow/preempt-finish/before-raise", "kind": "run", "action": "replay", "prerequisites": [ "A→B→A wykryte", "high Ready przy priorytecie 0" ], "layout": [ "call site vTaskPrioritySet", "high task", "markery kolejności" ], "commands": [ "print g_preemption_order", "print g_high_probe", "info registers pc sp a0 a1" ], "expected_observations": [ "high uruchamia się przy priorytecie 3", "caller nie zapisuje after przed HIGH" ], "assertions": [ "projekcja markerów to before/HIGH/after", "verifier jeszcze nie działa" ], "evidence_fields": [ "marker projection", "priority", "PC", "SP", "timestamp" ], "template_id": "run.preempt" } }, { "id": "high-preempts", "number": 9, "label": "high runs before call returns", "mode": "RUN", "event_id": "E09", "strategy_ref": "run.preempt", "svg_label": "09", "code_ref": "src/tasks/task01_scheduler.c:346", "snapshot_ref": "task01.high-preempts", "description": "Zmiana 0→3 czyni high najwyższym Ready taskiem.", "evidence": "order={before,HIGH}, caller after flag=0.", "strategy": { "id": "task01/a5-flow/preempt-finish/high-preempts", "kind": "run", "action": "replay", "prerequisites": [ "A→B→A wykryte", "high Ready przy priorytecie 0" ], "layout": [ "call site vTaskPrioritySet", "high task", "markery kolejności" ], "commands": [ "print g_preemption_order", "print g_high_probe", "info registers pc sp a0 a1" ], "expected_observations": [ "high uruchamia się przy priorytecie 3", "caller nie zapisuje after przed HIGH" ], "assertions": [ "projekcja markerów to before/HIGH/after", "verifier jeszcze nie działa" ], "evidence_fields": [ "marker projection", "priority", "PC", "SP", "timestamp" ], "template_id": "run.preempt" } }, { "id": "after-raise", "number": 10, "label": "peer A commits after_raise and stop", "mode": "RUN", "event_id": "E10", "strategy_ref": "run.preempt", "svg_label": "10", "code_ref": "src/tasks/task01_scheduler.c:303", "snapshot_ref": "task01.after-raise", "description": "Caller wraca dopiero po self-delete high.", "evidence": "order={before,HIGH,after}, stop=1.", "strategy": { "id": "task01/a5-flow/preempt-finish/after-raise", "kind": "run", "action": "replay", "prerequisites": [ "A→B→A wykryte", "high Ready przy priorytecie 0" ], "layout": [ "call site vTaskPrioritySet", "high task", "markery kolejności" ], "commands": [ "print g_preemption_order", "print g_high_probe", "info registers pc sp a0 a1" ], "expected_observations": [ "high uruchamia się przy priorytecie 3", "caller nie zapisuje after przed HIGH" ], "assertions": [ "projekcja markerów to before/HIGH/after", "verifier jeszcze nie działa" ], "evidence_fields": [ "marker projection", "priority", "PC", "SP", "timestamp" ], "template_id": "run.preempt" } }, { "id": "peers-finished", "number": 11, "label": "both peers clear handles and self-delete", "mode": "RUN", "event_id": "E11", "strategy_ref": "run.state", "svg_label": "11", "code_ref": "src/tasks/task01_scheduler.c:325", "snapshot_ref": "task01.peers-finished", "description": "Każdy peer kończy własny lifetime taska.", "evidence": "g_peers_finished=2, oba handle=NULL.", "strategy": { "id": "task01/a5-flow/preempt-finish/peers-finished", "kind": "run", "action": "replay", "prerequisites": [ "kanoniczny checkpoint FC03" ], "layout": [ "kontekst aplikacyjny", "publiczny stan taska", "source" ], "commands": [ "print g_peer_a.phase", "print g_peer_b.phase", "print g_high_probe.phase", "print g_peers_finished" ], "expected_observations": [ "Ready nie oznacza Running", "każdy task czyści własny publiczny handle" ], "assertions": [ "high i peery kończą się przed verifierem", "brak suspend/resume w eksperymencie" ], "evidence_fields": [ "phase", "handle", "event_id", "PC" ], "template_id": "run.state" } }, { "id": "pass", "number": 12, "label": "low-priority verifier publishes PASS", "mode": "RUN", "event_id": "E12", "strategy_ref": "run.pass", "svg_label": "12", "code_ref": "src/tasks/task01_scheduler.c:386", "snapshot_ref": "task01.pass", "description": "Verifier sprawdza wszystkie niezależne dowody.", "evidence": "PASS=1 i poprawny exit code.", "strategy": { "id": "task01/a5-flow/preempt-finish/pass", "kind": "run", "action": "replay", "prerequisites": [ "high i oba peery zakończone", "verifier wybrany" ], "layout": [ "konteksty", "ślady", "końcowe asercje" ], "commands": [ "print g_scheduler_pass", "print g_aba_task", "print g_preemption_order", "print g_tick_hook_count" ], "expected_observations": [ "A/B/A i before/HIGH/after są obecne", "program kończy się PASS" ], "assertions": [ "PASS=1", "g_peers_finished=2", "tick hook count>=2" ], "evidence_fields": [ "PASS", "traces", "ticks", "source blob", "image hash", "timestamp" ], "template_id": "run.pass" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 903.0, "height": 328.0, "full_x": 0.0, "full_y": 0.0, "full_width": 903.0, "full_height": 328.0, "page_width": 940.0, "page_height": 560.0, "overview": true, "step_ids": [ "after-raise", "before-raise", "high-preempts", "pass", "peers-finished" ] }, "diagram_title": "część 2/2 · preemption i zakończenie", "diagram_block_label": "A5 FLOW", "diagram_description": "Kontynuacja tych samych tasków i rekordów.", "diagram_phase_labels": [ "PREEMPT / FINISH" ] } ], "steps": [], "spread_group": "fc03-scheduler-flow", "spread_label": "FC03 · scheduler experiment", "spread_columns": 2, "spread_index": 2, "spread_count": 2, "page_orientation": "landscape" }, { "id": "section-6-content", "index": 6, "title": "A6 — State", "show_heading": false, "toc_entry": true, "header_html": "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [], "assets": [ { "label": "fig:a6-state", "logical_label": "fig:a6-state", "figure_number": 6, "caption": "A6 STATE — przejścia high probe, peerów i verifiera. — część 1/1 (r1 c1)", "alt": "Stany Ready, Running i Deleted oraz zmiana priorytetu high probe.", "href": "figures/a6-state.svg", "source_href": "figures/a6-state.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc03-a6-state-tile-1", "title": "A6 · priorytet i stan", "task": { "id": "task01", "label": "Task01 · scheduler experiment" }, "block": { "id": "a6-state", "label": "A6 STATE", "description": "Ready nie oznacza Running." }, "phases": [ { "id": "high-probe", "label": "HIGH PROBE", "steps": [ { "id": "high-low", "number": 1, "label": "high Ready at priority 0", "mode": "RUN", "event_id": "E02", "strategy_ref": "run.state", "svg_label": "01", "svg_target": "HighLow", "code_ref": "src/tasks/task01_scheduler.c:497", "snapshot_ref": "task01.high-dormant", "description": "Task istnieje, ale nie jest wybrany.", "evidence": "phase=READY, priority=0.", "strategy": { "id": "task01/a6-state/high-probe/high-low", "kind": "run", "action": "replay", "prerequisites": [ "kanoniczny checkpoint FC03" ], "layout": [ "kontekst aplikacyjny", "publiczny stan taska", "source" ], "commands": [ "print g_peer_a.phase", "print g_peer_b.phase", "print g_high_probe.phase", "print g_peers_finished" ], "expected_observations": [ "Ready nie oznacza Running", "każdy task czyści własny publiczny handle" ], "assertions": [ "high i peery kończą się przed verifierem", "brak suspend/resume w eksperymencie" ], "evidence_fields": [ "phase", "handle", "event_id", "PC" ], "template_id": "run.state" } }, { "id": "high-ready", "number": 2, "label": "priority changes from 0 to 3", "mode": "RUN", "event_id": "E08", "strategy_ref": "run.preempt", "svg_label": "02", "svg_target": "HighReady", "code_ref": "src/tasks/task01_scheduler.c:300", "snapshot_ref": "task01.before-raise", "description": "API zmienia pozycję taska w polityce wyboru.", "evidence": "Caller zapisał before marker.", "strategy": { "id": "task01/a6-state/high-probe/high-ready", "kind": "run", "action": "replay", "prerequisites": [ "A→B→A wykryte", "high Ready przy priorytecie 0" ], "layout": [ "call site vTaskPrioritySet", "high task", "markery kolejności" ], "commands": [ "print g_preemption_order", "print g_high_probe", "info registers pc sp a0 a1" ], "expected_observations": [ "high uruchamia się przy priorytecie 3", "caller nie zapisuje after przed HIGH" ], "assertions": [ "projekcja markerów to before/HIGH/after", "verifier jeszcze nie działa" ], "evidence_fields": [ "marker projection", "priority", "PC", "SP", "timestamp" ], "template_id": "run.preempt" } }, { "id": "high-run", "number": 3, "label": "high selected and Running", "mode": "RUN", "event_id": "E09", "strategy_ref": "run.preempt", "svg_label": "03", "svg_target": "HighRun", "code_ref": "src/tasks/task01_scheduler.c:346", "snapshot_ref": "task01.high-preempts", "description": "Najwyższy Ready task wywłaszcza caller.", "evidence": "priority=3, PC/SP należą do high.", "strategy": { "id": "task01/a6-state/high-probe/high-run", "kind": "run", "action": "replay", "prerequisites": [ "A→B→A wykryte", "high Ready przy priorytecie 0" ], "layout": [ "call site vTaskPrioritySet", "high task", "markery kolejności" ], "commands": [ "print g_preemption_order", "print g_high_probe", "info registers pc sp a0 a1" ], "expected_observations": [ "high uruchamia się przy priorytecie 3", "caller nie zapisuje after przed HIGH" ], "assertions": [ "projekcja markerów to before/HIGH/after", "verifier jeszcze nie działa" ], "evidence_fields": [ "marker projection", "priority", "PC", "SP", "timestamp" ], "template_id": "run.preempt" } }, { "id": "high-deleted", "number": 4, "label": "high self-deletes", "mode": "RUN", "event_id": "E10", "strategy_ref": "run.state", "svg_label": "04", "code_ref": "src/tasks/task01_scheduler.c:366", "snapshot_ref": "task01.after-raise", "description": "High czyści handle przed vTaskDelete(NULL).", "evidence": "Caller może wrócić i zapisać after.", "strategy": { "id": "task01/a6-state/high-probe/high-deleted", "kind": "run", "action": "replay", "prerequisites": [ "kanoniczny checkpoint FC03" ], "layout": [ "kontekst aplikacyjny", "publiczny stan taska", "source" ], "commands": [ "print g_peer_a.phase", "print g_peer_b.phase", "print g_high_probe.phase", "print g_peers_finished" ], "expected_observations": [ "Ready nie oznacza Running", "każdy task czyści własny publiczny handle" ], "assertions": [ "high i peery kończą się przed verifierem", "brak suspend/resume w eksperymencie" ], "evidence_fields": [ "phase", "handle", "event_id", "PC" ], "template_id": "run.state" } } ] }, { "id": "peers-verifier", "label": "PEERS / VERIFIER", "steps": [ { "id": "peers", "number": 5, "label": "peers alternate Ready and Running", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.timeslice", "svg_label": "05", "svg_target": "Peers", "code_ref": "src/tasks/task01_scheduler.c:279", "snapshot_ref": "task01.timeslice", "description": "Tick rotuje równorzędne peery.", "evidence": "A/B/A.", "strategy": { "id": "task01/a6-state/peers-verifier/peers", "kind": "run", "action": "replay", "prerequisites": [ "dwa CPU-bound taski priority=2", "time slicing włączony" ], "layout": [ "pętle peerów", "task-change trace", "ticki" ], "commands": [ "print g_switch_task", "print g_switch_tick", "print g_aba_task", "print g_peer_changes" ], "expected_observations": [ "zatwierdzony ślad zawiera A→B→A", "ticki są niemalejące" ], "assertions": [ "zapisywana jest jedna pozycja na obserwowaną zmianę taska", "dowód nie zakłada równego udziału CPU" ], "evidence_fields": [ "triplet A/B/A", "ticks", "change count", "timestamp" ], "template_id": "run.timeslice" } }, { "id": "peers-done", "number": 6, "label": "both peers complete and delete", "mode": "RUN", "event_id": "E11", "strategy_ref": "run.state", "svg_label": "06", "code_ref": "src/tasks/task01_scheduler.c:325", "snapshot_ref": "task01.peers-finished", "description": "Stop request nie usuwa taska z zewnątrz.", "evidence": "Każdy peer self-delete.", "strategy": { "id": "task01/a6-state/peers-verifier/peers-done", "kind": "run", "action": "replay", "prerequisites": [ "kanoniczny checkpoint FC03" ], "layout": [ "kontekst aplikacyjny", "publiczny stan taska", "source" ], "commands": [ "print g_peer_a.phase", "print g_peer_b.phase", "print g_high_probe.phase", "print g_peers_finished" ], "expected_observations": [ "Ready nie oznacza Running", "każdy task czyści własny publiczny handle" ], "assertions": [ "high i peery kończą się przed verifierem", "brak suspend/resume w eksperymencie" ], "evidence_fields": [ "phase", "handle", "event_id", "PC" ], "template_id": "run.state" } }, { "id": "verify-ready", "number": 7, "label": "verifier waits as lower Ready task", "mode": "RUN", "event_id": "E03", "strategy_ref": "run.prepare", "svg_label": "07", "svg_target": "VerifyReady", "code_ref": "src/tasks/task01_scheduler.c:519", "snapshot_ref": "task01.priorities", "description": "Priorytet 1 przegrywa z peerami 2.", "evidence": "Verifier nie wykonuje się przed stop.", "strategy": { "id": "task01/a6-state/peers-verifier/verify-ready", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3 online", "czysta RAM", "aktualny ELF" ], "layout": [ "source", "konteksty", "uchwyty", "priorytety" ], "commands": [ "print g_high_probe", "print g_peer_a", "print g_peer_b", "print g_verifier" ], "expected_observations": [ "high jest Ready przy priorytecie 0", "peery mają priorytet 2, verifier 1" ], "assertions": [ "wszystkie uchwyty są ważne przed startem schedulera", "publiczne API zwraca oczekiwane priorytety" ], "evidence_fields": [ "event_id", "handle", "priority", "timestamp" ], "template_id": "run.prepare" } }, { "id": "verify-run", "number": 8, "label": "verifier runs and publishes PASS", "mode": "RUN", "event_id": "E12", "strategy_ref": "run.pass", "svg_label": "08", "code_ref": "src/tasks/task01_scheduler.c:386", "snapshot_ref": "task01.pass", "description": "Po usunięciu wyższych tasków verifier staje się najwyższy.", "evidence": "PASS=1.", "strategy": { "id": "task01/a6-state/peers-verifier/verify-run", "kind": "run", "action": "replay", "prerequisites": [ "high i oba peery zakończone", "verifier wybrany" ], "layout": [ "konteksty", "ślady", "końcowe asercje" ], "commands": [ "print g_scheduler_pass", "print g_aba_task", "print g_preemption_order", "print g_tick_hook_count" ], "expected_observations": [ "A/B/A i before/HIGH/after są obecne", "program kończy się PASS" ], "assertions": [ "PASS=1", "g_peers_finished=2", "tick hook count>=2" ], "evidence_fields": [ "PASS", "traces", "ticks", "source blob", "image hash", "timestamp" ], "template_id": "run.pass" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 896.0, "height": 244.0, "full_x": 0.0, "full_y": 0.0, "full_width": 896.0, "full_height": 244.0, "page_width": 940.0, "page_height": 560.0, "overview": true, "step_ids": [ "high-deleted", "high-low", "high-ready", "high-run", "peers", "peers-done", "verify-ready", "verify-run" ] }, "diagram_title": "A6 · priorytet i stan", "diagram_block_label": "A6 STATE", "diagram_description": "Ready nie oznacza Running.", "diagram_phase_labels": [ "HIGH PROBE", "PEERS / VERIFIER" ] } ], "steps": [], "spread_group": "", "spread_label": "A6 STATE — przejścia high probe, peerów i verifiera.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "landscape" }, { "id": "section-7-content", "index": 7, "title": "A7 — Runtime", "show_heading": false, "toc_entry": true, "header_html": "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n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n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [], "assets": [ { "label": "fig:a7-runtime", "logical_label": "fig:a7-runtime", "figure_number": 7, "caption": "A7 RUNTIME — timer, ISR, scheduler, taski i końcowy dowód. — część 1/1 (r1 c1)", "alt": "Runtime evidence od timer CSRs do śladu aplikacji.", "href": "figures/a7-runtime.svg", "source_href": "figures/a7-runtime.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc03-a7-runtime-tile-1", "title": "A7 · mapa dowodów runtime", "task": { "id": "task01", "label": "Task01 · scheduler experiment" }, "block": { "id": "a7-runtime", "label": "A7 RUNTIME", "description": "Kernel internals są tylko obserwacją debuggera." }, "phases": [ { "id": "timer-cpu", "label": "TIMER / CPU", "steps": [ { "id": "timer", "number": 1, "label": "timer CSRs define the interrupt", "mode": "RUN", "event_id": "E06", "strategy_ref": "run.tick", "svg_label": "01", "svg_target": "Timer", "code_ref": "include/FreeRTOSConfig.h:4", "snapshot_ref": "task01.first-tick", "description": "Mtime/mtimecmp prowadzą do machine-timer trap.", "evidence": "mcause=0x80000007.", "strategy": { "id": "task01/a7-runtime/timer-cpu/timer", "kind": "run", "action": "replay", "prerequisites": [ "scheduler uruchomiony", "tick hook włączony" ], "layout": [ "tick hook", "CSR", "ISR stack", "przerwany task" ], "commands": [ "print g_tick_hook_count", "print/x g_first_tick_mcause", "print/x g_first_tick_mepc", "print/x g_first_tick_sp" ], "expected_observations": [ "mcause oznacza machine-timer interrupt", "mepc wskazuje przerwany kod" ], "assertions": [ "checkpoint ticka jest jednorazowy", "sink ISR nie korzysta z task-context API" ], "evidence_fields": [ "tick", "mcause", "mepc", "ISR SP", "timestamp" ], "template_id": "run.tick" } }, { "id": "isr", "number": 2, "label": "ISR evidence captures tick PC and SP", "mode": "RUN", "event_id": "E06", "strategy_ref": "run.tick", "svg_label": "02", "svg_target": "ISR", "code_ref": "src/tasks/task01_scheduler.c:116", "snapshot_ref": "task01.first-tick", "description": "Mepc opisuje przerwany task, SP domenę ISR.", "evidence": "Niezerowe mepc/SP i one-shot checkpoint.", "strategy": { "id": "task01/a7-runtime/timer-cpu/isr", "kind": "run", "action": "replay", "prerequisites": [ "scheduler uruchomiony", "tick hook włączony" ], "layout": [ "tick hook", "CSR", "ISR stack", "przerwany task" ], "commands": [ "print g_tick_hook_count", "print/x g_first_tick_mcause", "print/x g_first_tick_mepc", "print/x g_first_tick_sp" ], "expected_observations": [ "mcause oznacza machine-timer interrupt", "mepc wskazuje przerwany kod" ], "assertions": [ "checkpoint ticka jest jednorazowy", "sink ISR nie korzysta z task-context API" ], "evidence_fields": [ "tick", "mcause", "mepc", "ISR SP", "timestamp" ], "template_id": "run.tick" } }, { "id": "kernel", "number": 3, "label": "Ready lists are debugger-only evidence", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.runtime", "svg_label": "03", "svg_target": "Kernel", "code_ref": "vendor/FreeRTOS-Kernel/tasks.c:1", "snapshot_ref": "task01.timeslice", "description": "Aplikacja nie odczytuje pxCurrentTCB.", "evidence": "Publiczne rekordy wystarczają do PASS.", "strategy": { "id": "task01/a7-runtime/timer-cpu/kernel", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3/GDB online", "symbole ELF" ], "layout": [ "timer/CSR", "handle/TCB", "task stack", "committed evidence" ], "commands": [ "print g_peer_a.created_handle", "print g_peer_a.tcb_address", "print g_peer_a.stack_low", "print g_peer_a.stack_high", "info registers sp pc" ], "expected_observations": [ "handle/TCB i stack są rozdzielone", "SP należy do stosu wybranego taska" ], "assertions": [ "created_handle == tcb_address", "źródło, ELF i obraz są identyfikowalne" ], "evidence_fields": [ "handle/TCB", "stack range", "SP", "PC", "hash" ], "template_id": "run.runtime" } } ] }, { "id": "tasks-evidence", "label": "TASKS / EVIDENCE", "steps": [ { "id": "peer", "number": 4, "label": "peer handle TCB stack PC and SP", "mode": "RUN", "event_id": "E05", "strategy_ref": "run.runtime", "svg_label": "04", "svg_target": "Peer", "code_ref": "src/tasks/task01_scheduler.c:248", "snapshot_ref": "task01.peer-entry", "description": "Context, TCB i stack są osobnymi obszarami.", "evidence": "created_handle==tcb_address i SP w stack range.", "strategy": { "id": "task01/a7-runtime/tasks-evidence/peer", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3/GDB online", "symbole ELF" ], "layout": [ "timer/CSR", "handle/TCB", "task stack", "committed evidence" ], "commands": [ "print g_peer_a.created_handle", "print g_peer_a.tcb_address", "print g_peer_a.stack_low", "print g_peer_a.stack_high", "info registers sp pc" ], "expected_observations": [ "handle/TCB i stack są rozdzielone", "SP należy do stosu wybranego taska" ], "assertions": [ "created_handle == tcb_address", "źródło, ELF i obraz są identyfikowalne" ], "evidence_fields": [ "handle/TCB", "stack range", "SP", "PC", "hash" ], "template_id": "run.runtime" } }, { "id": "high", "number": 5, "label": "high runs at changed priority", "mode": "RUN", "event_id": "E09", "strategy_ref": "run.preempt", "svg_label": "05", "svg_target": "High", "code_ref": "src/tasks/task01_scheduler.c:346", "snapshot_ref": "task01.high-preempts", "description": "PC/SP i run_tick identyfikują wybrany task.", "evidence": "priority=3 i marker HIGH.", "strategy": { "id": "task01/a7-runtime/tasks-evidence/high", "kind": "run", "action": "replay", "prerequisites": [ "A→B→A wykryte", "high Ready przy priorytecie 0" ], "layout": [ "call site vTaskPrioritySet", "high task", "markery kolejności" ], "commands": [ "print g_preemption_order", "print g_high_probe", "info registers pc sp a0 a1" ], "expected_observations": [ "high uruchamia się przy priorytecie 3", "caller nie zapisuje after przed HIGH" ], "assertions": [ "projekcja markerów to before/HIGH/after", "verifier jeszcze nie działa" ], "evidence_fields": [ "marker projection", "priority", "PC", "SP", "timestamp" ], "template_id": "run.preempt" } }, { "id": "evidence", "number": 6, "label": "committed evidence binds source and ELF", "mode": "RUN", "event_id": "E12", "strategy_ref": "run.pass", "svg_label": "06", "svg_target": "Evidence", "code_ref": "src/tasks/task01_scheduler.c:450", "snapshot_ref": "task01.pass", "description": "Końcowy snapshot wiąże wynik z artefaktami.", "evidence": "event_id, source blob, ELF/image hash, PASS i timestamp.", "strategy": { "id": "task01/a7-runtime/tasks-evidence/evidence", "kind": "run", "action": "replay", "prerequisites": [ "high i oba peery zakończone", "verifier wybrany" ], "layout": [ "konteksty", "ślady", "końcowe asercje" ], "commands": [ "print g_scheduler_pass", "print g_aba_task", "print g_preemption_order", "print g_tick_hook_count" ], "expected_observations": [ "A/B/A i before/HIGH/after są obecne", "program kończy się PASS" ], "assertions": [ "PASS=1", "g_peers_finished=2", "tick hook count>=2" ], "evidence_fields": [ "PASS", "traces", "ticks", "source blob", "image hash", "timestamp" ], "template_id": "run.pass" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 897.0, "height": 166.0, "full_x": 0.0, "full_y": 0.0, "full_width": 897.0, "full_height": 166.0, "page_width": 940.0, "page_height": 560.0, "overview": true, "step_ids": [ "evidence", "high", "isr", "kernel", "peer", "timer" ] }, "diagram_title": "A7 · mapa dowodów runtime", "diagram_block_label": "A7 RUNTIME", "diagram_description": "Kernel internals są tylko obserwacją debuggera.", "diagram_phase_labels": [ "TIMER / CPU", "TASKS / EVIDENCE" ] } ], "steps": [], "spread_group": "", "spread_label": "A7 RUNTIME — timer, ISR, scheduler, taski i końcowy dowód.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "landscape" }, { "id": "section-8-task01", "index": 8, "title": "Task01 — Scheduler experiment", "show_heading": true, "toc_entry": true, "header_html": "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [ { "ref": "task01", "title": "Kontrolowany eksperyment schedulera FreeRTOS", "uuid": "2214a13f-34c6-40a1-a561-70a00ec98285", "criterion": "Program wypisuje PASS; trace zawiera A-B-A; marker projection to before-HIGH-after; pierwszy tick ma machine-timer mcause; TCB i stack są spójne.", "conclusion_html": "

Priorytet wybiera najwyższy Ready task. Time slicing rotuje wyłącznie taski o tym samym priorytecie, a uczynienie wyższego taska Ready może wywłaszczyć caller przed powrotem API.

", "prompt_html": "

Przejdź po A1, A2, A4, A5, A6 i A7. Dla kroków RUN użyj Enter lub F2 i udowodnij oddzielnie time slicing A-B-A oraz natychmiastowe wywłaszczenie before-HIGH-after.

", "flow": [ { "id": "scheduler-model", "kind": "block", "title": "A — model ticka i wyboru taska", "content_html": "

Najpierw odczytaj A1, A2 i A4 oraz zapisz przewidywaną kolejność.

", "steps": [ { "id": "read-priorities", "title": "Odczytaj kontrakt priorytetów.", "content_html": "

Wyjaśnij, dlaczego high=0, peery=2, verifier=1 nie powodują przedwczesnego uruchomienia high ani verifiera.

" }, { "id": "predict-traces", "title": "Przewidź dwa ślady.", "content_html": "

Rozdziel task-change trace A-B-A od marker projection before-HIGH-after.

" } ] }, { "id": "hazard3-replay", "kind": "block", "title": "B — deterministyczny replay E01–E12", "content_html": "

Każdy RUN replay zaczyna się od czystej RAM i zweryfikowanego obrazu.

", "steps": [ { "id": "follow-tick", "title": "Zbadaj pierwszy tick.", "content_html": "

Na E06 zapisz mcause, mepc, ISR SP i tick.

" }, { "id": "follow-timeslice", "title": "Zbadaj A-B-A.", "content_html": "

Na E07 zapisz triplet tasków, ticki i liczbę obserwowanych zmian.

" }, { "id": "follow-preemption", "title": "Zbadaj natychmiastowe wywłaszczenie.", "content_html": "

Porównaj E08, E09 i E10; pokaż, że HIGH wykonał się przed after_raise.

" }, { "id": "finish-pass", "title": "Zamknij dowód.", "content_html": "

Na E11 sprawdź self-delete peerów, a na E12 końcowe inwarianty i PASS.

" } ] }, { "id": "no-timeslicing-bounded-observation", "kind": "exercise", "title": "Ćwiczenie — bounded observation bez time slicing", "content_html": "", "steps": [] } ] } ], "assets": [], "steps": [], "spread_group": "", "spread_label": "", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "portrait" } ], "viewpoints": [ { "id": "A1", "label": "CONTEXT", "subtitle": "Timer → tick ISR → scheduler → taski", "status": "enabled", "target_label": "fig:a1-context", "target_id": "fig-a1-context" }, { "id": "A2", "label": "STRUCTURE", "subtitle": "Konteksty i ograniczone rekordy dowodowe", "status": "enabled", "target_label": "fig:a2-structure", "target_id": "fig-a2-structure" }, { "id": "A3", "label": "DISPATCH", "subtitle": "Callback i context", "status": "unavailable", "reason": "Mechanizm TaskFunction_t i void* został udowodniony w FC02 i w FC03 nie ulega zmianie.", "target_id": "" }, { "id": "A4", "label": "APPLICATION", "subtitle": "Cztery taski i kontrakt priorytetów", "status": "enabled", "target_label": "fig:a4-application", "target_id": "fig-a4-application" }, { "id": "A5", "label": "FLOW", "subtitle": "Deterministyczny przebieg E01–E12", "status": "enabled", "target_label": "fig:a5-flow-a", "target_id": "fig-a5-flow-a" }, { "id": "A6", "label": "STATE", "subtitle": "Ready, Running, Deleted i zmiana priorytetu", "status": "enabled", "target_label": "fig:a6-state", "target_id": "fig-a6-state" }, { "id": "A7", "label": "RUNTIME", "subtitle": "Tick, CSRs, TCB, stosy i ślady", "status": "enabled", "target_label": "fig:a7-runtime", "target_id": "fig-a7-runtime" }, { "id": "A8", "label": "PATTERNS", "subtitle": "Wzorce aplikacyjne", "status": "unavailable", "reason": "Polityka schedulera jest konfiguracją kernela, a nie wzorcem projektowym aplikacji.", "target_id": "" } ], "has_spread": true, "has_allocator_model": false, "dictionary": null, "toc": [ { "id": "section-1-content", "label": "1. A1 — Context" }, { "id": "section-2-content", "label": "2. A2 — Structure" }, { "id": "section-3-content", "label": "3. A4 — Application" }, { "id": "section-4-content", "label": "4. A5 — Flow" }, { "id": "section-6-content", "label": "6. A6 — State" }, { "id": "section-7-content", "label": "7. A7 — Runtime" }, { "id": "section-8-task01", "label": "8. Task01 — Scheduler experiment" } ] }