{ "schema": "esc-card-react-view.v1", "card": { "id": "mpabi-freertos-c-02-first-task", "series": "freertos-c", "series_title": "FreeRTOS C", "number": "02", "count": "15", "slug": "first-task-tcb-stack", "title": "Pierwszy task, TCB i stos taska", "topic": "TaskFunction_t, void* context, TaskHandle_t i time slicing", "project": "Freestanding C nad FreeRTOS", "subject": "Informatyka", "level": "Rok 2 · L02 · RV32I/Hazard3", "revision_date": "2026-07-18T00:00:00+02:00", "status": "Gotowa", "version": "v00.01", "uuid": "9ad444ee-ff3c-42c3-a108-80ed9ddb914d", "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://4abec2d9-79e9-0dca-9040-c60669f51ff8/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_1–heap_5 and heap_4 mechanics", "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": true, "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": false, "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://33c1da5c-dd20-5ed1-a829-64a5306fc804/f4d7caf3-d665-5a2d-b9eb-39a120a64ff7", "available": true, "current": false, "number": "12", "version": "v00.01", "status": "planned", "tasks": [ { "id": "task01", "title": "Same behavior, two storage policies" } ] }, { "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": "First Task, Stack, Tick, Scheduler and Vector V0", "repo": "lab-rv32i-freertos-task-stack-vector", "href": "https://3400a752-f4d6-579c-a033-73677fef4b74/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": "", "status": "planned", "tasks": [] }, { "id": "K04", "title": "Scheduler States, Priorities and Typed Ticks", "repo": "lab-rv32i-freertos-scheduler-states", "href": "", "available": false, "current": false, "number": "04", "version": "", "status": "planned", "tasks": [] }, { "id": "K05", "title": "C++ Heap Bridge, Heap Models and HeapStats", "repo": "lab-rv32i-freertos-heap-models", "href": "", "available": false, "current": false, "number": "05", "version": "", "status": "planned", "tasks": [] }, { "id": "K06", "title": "MemoryResource and FreeRtosAllocator", "repo": "lab-rv32i-freertos-allocator-resource", "href": "", "available": false, "current": false, "number": "06", "version": "", "status": "planned", "tasks": [] }, { "id": "K07", "title": "TaskHandle_t, Explicit Start and Static Trampoline", "repo": "lab-rv32i-freertos-task-wrapper", "href": "", "available": false, "current": false, "number": "07", "version": "", "status": "planned", "tasks": [] }, { "id": "K08", "title": "DynamicTask, StaticTask, Deletion and Lifetime", "repo": "lab-rv32i-freertos-static-task", "href": "", "available": false, "current": false, "number": "08", "version": "", "status": "planned", "tasks": [] }, { "id": "K09", "title": "Scheduler Facade and Scoped Kernel Guards", "repo": "lab-rv32i-freertos-kernel-facade", "href": "", "available": false, "current": false, "number": "09", "version": "", "status": "planned", "tasks": [] }, { "id": "K10", "title": "Queue and StaticQueue", "repo": "lab-rv32i-freertos-queue", "href": "", "available": false, "current": false, "number": "10", "version": "", "status": "planned", "tasks": [] }, { "id": "K11", "title": "Mutex, LockGuard and Priority Inheritance", "repo": "lab-rv32i-freertos-mutex", "href": "", "available": false, "current": false, "number": "11", "version": "", "status": "planned", "tasks": [] }, { "id": "K12", "title": "Semaphores and Task Notifications", "repo": "lab-rv32i-freertos-semaphore-notify", "href": "", "available": false, "current": false, "number": "12", "version": "", "status": "planned", "tasks": [] }, { "id": "K13", "title": "EventGroup and Coordinated State", "repo": "lab-rv32i-freertos-event-group", "href": "", "available": false, "current": false, "number": "13", "version": "", "status": "planned", "tasks": [] }, { "id": "K14", "title": "Software Timer and the Timer Daemon Task", "repo": "lab-rv32i-freertos-sw-timer", "href": "", "available": false, "current": false, "number": "14", "version": "", "status": "planned", "tasks": [] }, { "id": "K15", "title": "Explicit FromISR, UART and GPIO Wrappers", "repo": "lab-rv32i-freertos-isr-drivers", "href": "", "available": false, "current": false, "number": "15", "version": "", "status": "planned", "tasks": [] }, { "id": "K16", "title": "Integrated Real-time Application and Evidence", "repo": "lab-rv32i-freertos-integration", "href": "", "available": false, "current": false, "number": "16", "version": "", "status": "planned", "tasks": [] } ] }, { "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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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
", "left_margin_html": "
TECH
", "right_margin_html": "
OG
", "goal_title": "Cel karty", "goal_html": "

Uczeń tworzy task przez surowe API C FreeRTOS, śledzi pvParameters od xTaskCreate do typowanego WorkerContext i odróżnia kontekst aplikacji od TCB oraz stosu taska. Każdy punkt wykonania odtwarza deterministycznie w Hazard3/GDB.

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

Dwa workery o równym priorytecie liczą sumę 1..20000; niżej priorytetowy supervisor sprawdza wyniki, ticki, podciąg A->B->A, TCB i zakresy stosów. Poza zakresem są C++, kolejki, mutexy, ISR, timery i peryferia.

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

Raw C task, typed context, TCB i stack

", "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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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
", "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 — od modułu aplikacji C do wykonania na Hazard3. — część 1/1 (r1 c1)", "alt": "Granice aplikacji C, FreeRTOS C API, kernela, portu i Hazard3.", "href": "figures/a1-context.svg", "source_href": "figures/a1-context.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc02-a1-context-tile-1", "title": "A1 · granice systemu", "task": { "id": "task01", "label": "Task01 · raw C task" }, "block": { "id": "a1-context", "label": "A1 CONTEXT", "description": "Kierunek odpowiedzialności bez udawania runtime." }, "phases": [ { "id": "system-boundary", "label": "BOUNDARIES", "steps": [ { "id": "application", "number": 1, "label": "application module requests tasks", "mode": "CODE", "strategy_ref": "code.context", "svg_label": "01", "svg_target": "Application", "code_ref": "src/tasks/task01_first_task.c:308", "description": "main przygotowuje konteksty i żąda utworzenia tasków.", "evidence": "Moduł zna wyłącznie publiczne nagłówki FreeRTOS.", "strategy": { "id": "task01/a1-context/system-boundary/application", "kind": "code", "action": "open", "prerequisites": [ "repozytorium FC02", "zweryfikowany source blob" ], "layout": [ "read-only source", "granica architektoniczna" ], "commands": [ "rg -n 'xTaskCreate|vTaskStartScheduler|TaskFunction_t' include src" ], "expected_observations": [ "aplikacja korzysta z publicznego C API", "kernel i port pozostają oddzielnymi warstwami" ], "assertions": [ "brak zależności aplikacji od pxCurrentTCB", "target to RV32I/Hazard3" ], "evidence_fields": [ "code_ref", "source_git_blob", "zaznaczona relacja UML" ], "template_id": "code.context" } }, { "id": "api", "number": 2, "label": "FreeRTOS C API owns scheduling", "mode": "CODE", "strategy_ref": "code.context", "svg_label": "02", "svg_target": "CAPI", "code_ref": "vendor/FreeRTOS-Kernel/include/task.h:1", "description": "TaskFunction_t i xTaskCreate definiują granicę C.", "evidence": "Aplikacja nie używa pxCurrentTCB.", "strategy": { "id": "task01/a1-context/system-boundary/api", "kind": "code", "action": "open", "prerequisites": [ "repozytorium FC02", "zweryfikowany source blob" ], "layout": [ "read-only source", "granica architektoniczna" ], "commands": [ "rg -n 'xTaskCreate|vTaskStartScheduler|TaskFunction_t' include src" ], "expected_observations": [ "aplikacja korzysta z publicznego C API", "kernel i port pozostają oddzielnymi warstwami" ], "assertions": [ "brak zależności aplikacji od pxCurrentTCB", "target to RV32I/Hazard3" ], "evidence_fields": [ "code_ref", "source_git_blob", "zaznaczona relacja UML" ], "template_id": "code.context" } }, { "id": "runtime", "number": 3, "label": "kernel/port execute on Hazard3", "mode": "CODE", "strategy_ref": "code.context", "svg_label": "03", "svg_target": "Runtime", "code_ref": "include/FreeRTOSConfig.h:1", "description": "Scheduler, tick, heap_4 i port RV32I wykonują taski.", "evidence": "Konfiguracja włącza preemption, time slicing i dynamic allocation.", "strategy": { "id": "task01/a1-context/system-boundary/runtime", "kind": "code", "action": "open", "prerequisites": [ "repozytorium FC02", "zweryfikowany source blob" ], "layout": [ "read-only source", "granica architektoniczna" ], "commands": [ "rg -n 'xTaskCreate|vTaskStartScheduler|TaskFunction_t' include src" ], "expected_observations": [ "aplikacja korzysta z publicznego C API", "kernel i port pozostają oddzielnymi warstwami" ], "assertions": [ "brak zależności aplikacji od pxCurrentTCB", "target to RV32I/Hazard3" ], "evidence_fields": [ "code_ref", "source_git_blob", "zaznaczona relacja UML" ], "template_id": "code.context" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 613.0, "height": 477.0, "full_x": 0.0, "full_y": 0.0, "full_width": 613.0, "full_height": 477.0, "page_width": 660.0, "page_height": 760.0, "overview": true, "step_ids": [ "api", "application", "runtime" ] }, "diagram_title": "A1 · granice systemu", "diagram_block_label": "A1 CONTEXT", "diagram_description": "Kierunek odpowiedzialności bez udawania runtime.", "diagram_phase_labels": [ "BOUNDARIES" ] } ], "steps": [], "spread_group": "", "spread_label": "A1 CONTEXT — od modułu aplikacji C do wykonania na Hazard3.", "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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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
", "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, funkcje wejściowe, inwarianty i domeny pamięci. — część 1/1 (r1 c1)", "alt": "Struktury WorkerContext i SupervisorContext oraz ich relacje z FreeRTOS.", "href": "figures/a2-structure.svg", "source_href": "figures/a2-structure.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc02-a2-structure-tile-1", "title": "A2 · dane i funkcje C", "task": { "id": "task01", "label": "Task01 · raw C task" }, "block": { "id": "a2-structure", "label": "A2 STRUCTURE", "description": "Statyczna struktura kompilacyjna i domeny pamięci." }, "phases": [ { "id": "c-data-functions", "label": "C DATA / FUNCTIONS", "steps": [ { "id": "worker-context", "number": 1, "label": "WorkerContext is application state", "mode": "CODE", "strategy_ref": "code.structure", "svg_label": "01", "svg_target": "Worker", "code_ref": "include/task01_first_task.h:18", "description": "Jawne pola tworzą obserwowalny kontekst aplikacji.", "evidence": "Brak ukrytego this, vptr i konstruktora.", "strategy": { "id": "task01/a2-structure/c-data-functions/worker-context", "kind": "code", "action": "open", "prerequisites": [ "freestanding C11", "include/task01_first_task.h" ], "layout": [ "source", "diagram danych", "mapa pamięci" ], "commands": [ "make check-contracts", "riscv64-unknown-elf-nm build/contracts/context_contract.o" ], "expected_observations": [ "WorkerContext nie ma ukrytego modelu obiektowego", "C akceptuje zły cast void* w fixture compile-only" ], "assertions": [ "&handle, wartość handle i TCB są odrębnymi pojęciami", "kontekst ma static lifetime" ], "evidence_fields": [ "source blob", "layout pól", "wynik check-contracts" ], "template_id": "code.structure" } }, { "id": "handle", "number": 2, "label": "TaskHandle_t is an opaque handle", "mode": "CODE", "strategy_ref": "code.structure", "svg_label": "02", "svg_target": "Worker", "code_ref": "include/task01_first_task.h:25", "description": "&handle, wartość handle i adres TCB nie są tym samym pojęciem.", "evidence": "created_handle przechowuje historyczną wartość przed self-delete.", "strategy": { "id": "task01/a2-structure/c-data-functions/handle", "kind": "code", "action": "open", "prerequisites": [ "freestanding C11", "include/task01_first_task.h" ], "layout": [ "source", "diagram danych", "mapa pamięci" ], "commands": [ "make check-contracts", "riscv64-unknown-elf-nm build/contracts/context_contract.o" ], "expected_observations": [ "WorkerContext nie ma ukrytego modelu obiektowego", "C akceptuje zły cast void* w fixture compile-only" ], "assertions": [ "&handle, wartość handle i TCB są odrębnymi pojęciami", "kontekst ma static lifetime" ], "evidence_fields": [ "source blob", "layout pól", "wynik check-contracts" ], "template_id": "code.structure" } }, { "id": "contexts", "number": 3, "label": "two static worker contexts", "mode": "CODE", "strategy_ref": "code.structure", "svg_label": "03", "svg_target": "Contexts", "code_ref": "src/tasks/task01_first_task.c:28", "description": "Konteksty istnieją przez cały program.", "evidence": "&g_worker_a i &g_worker_b nie leżą w ucHeap.", "strategy": { "id": "task01/a2-structure/c-data-functions/contexts", "kind": "code", "action": "open", "prerequisites": [ "freestanding C11", "include/task01_first_task.h" ], "layout": [ "source", "diagram danych", "mapa pamięci" ], "commands": [ "make check-contracts", "riscv64-unknown-elf-nm build/contracts/context_contract.o" ], "expected_observations": [ "WorkerContext nie ma ukrytego modelu obiektowego", "C akceptuje zły cast void* w fixture compile-only" ], "assertions": [ "&handle, wartość handle i TCB są odrębnymi pojęciami", "kontekst ma static lifetime" ], "evidence_fields": [ "source blob", "layout pól", "wynik check-contracts" ], "template_id": "code.structure" } }, { "id": "entries", "number": 4, "label": "entry functions have TaskFunction_t shape", "mode": "CODE", "strategy_ref": "code.abi", "svg_label": "04", "svg_target": "Entries", "code_ref": "include/task01_first_task.h:44", "description": "Obie funkcje wejściowe przyjmują dokładnie void*.", "evidence": "check-abi znajduje niemanglowane symbole C.", "strategy": { "id": "task01/a2-structure/c-data-functions/entries", "kind": "code", "action": "open", "prerequisites": [ "zbudowany prog.elf" ], "layout": [ "sygnatura C", "nm/readelf", "listing RV32I" ], "commands": [ "make check-abi", "riscv64-unknown-elf-objdump -d build/task01_first_task/prog.elf" ], "expected_observations": [ "TaskFunction_t ma sygnaturę void (*)(void*)", "brak manglingu i runtime C++" ], "assertions": [ "sum_task_entry jest symbolem C", "jawny cast nie wykonuje kontroli typu" ], "evidence_fields": [ "ELF hash", "symbol", "instrukcja wejścia" ], "template_id": "code.abi" } }, { "id": "supervisor", "number": 5, "label": "SupervisorContext observes both workers", "mode": "CODE", "strategy_ref": "code.structure", "svg_label": "05", "svg_target": "Supervisor", "code_ref": "include/task01_first_task.h:36", "description": "Supervisor posiada wskaźniki do obu statycznych kontekstów.", "evidence": "Nie przejmuje ich lifetime ani storage.", "strategy": { "id": "task01/a2-structure/c-data-functions/supervisor", "kind": "code", "action": "open", "prerequisites": [ "freestanding C11", "include/task01_first_task.h" ], "layout": [ "source", "diagram danych", "mapa pamięci" ], "commands": [ "make check-contracts", "riscv64-unknown-elf-nm build/contracts/context_contract.o" ], "expected_observations": [ "WorkerContext nie ma ukrytego modelu obiektowego", "C akceptuje zły cast void* w fixture compile-only" ], "assertions": [ "&handle, wartość handle i TCB są odrębnymi pojęciami", "kontekst ma static lifetime" ], "evidence_fields": [ "source blob", "layout pól", "wynik check-contracts" ], "template_id": "code.structure" } }, { "id": "invariants", "number": 6, "label": "common sum/scheduling invariants", "mode": "CODE", "strategy_ref": "code.structure", "svg_label": "06", "svg_target": "Invariants", "code_ref": "config/paired-experiment.json:1", "description": "Maszynowy kontrakt pary zamraża wspólne parametry C/C++.", "evidence": "make check-pair sprawdza kernel, config, stosy i workload.", "strategy": { "id": "task01/a2-structure/c-data-functions/invariants", "kind": "code", "action": "open", "prerequisites": [ "freestanding C11", "include/task01_first_task.h" ], "layout": [ "source", "diagram danych", "mapa pamięci" ], "commands": [ "make check-contracts", "riscv64-unknown-elf-nm build/contracts/context_contract.o" ], "expected_observations": [ "WorkerContext nie ma ukrytego modelu obiektowego", "C akceptuje zły cast void* w fixture compile-only" ], "assertions": [ "&handle, wartość handle i TCB są odrębnymi pojęciami", "kontekst ma static lifetime" ], "evidence_fields": [ "source blob", "layout pól", "wynik check-contracts" ], "template_id": "code.structure" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 896.0, "height": 338.0, "full_x": 0.0, "full_y": 0.0, "full_width": 896.0, "full_height": 338.0, "page_width": 940.0, "page_height": 560.0, "overview": true, "step_ids": [ "contexts", "entries", "handle", "invariants", "supervisor", "worker-context" ] }, "diagram_title": "A2 · dane i funkcje C", "diagram_block_label": "A2 STRUCTURE", "diagram_description": "Statyczna struktura kompilacyjna i domeny pamięci.", "diagram_phase_labels": [ "C DATA / FUNCTIONS" ] } ], "steps": [], "spread_group": "", "spread_label": "A2 STRUCTURE — konteksty, funkcje wejściowe, inwarianty i domeny pamięci.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "landscape" }, { "id": "section-3-content", "index": 3, "title": "A3 — Dispatch", "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\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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
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [], "assets": [ { "label": "fig:a3-dispatch", "logical_label": "fig:a3-dispatch", "figure_number": 3, "caption": "A3 DISPATCH — od TaskFunction_t i xTaskCreate do WorkerContext*. — część 1/1 (r1 c1)", "alt": "Przepływ callbacku C i odzyskanie typowanego kontekstu.", "href": "figures/a3-dispatch.svg", "source_href": "figures/a3-dispatch.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc02-a3-dispatch-tile-1", "title": "A3 · callback i context", "task": { "id": "task01", "label": "Task01 · raw C task" }, "block": { "id": "a3-dispatch", "label": "A3 DISPATCH", "description": "C function pointer, ABI RV32 i jawne odzyskanie typu." }, "phases": [ { "id": "callback-context", "label": "CALLBACK / CONTEXT", "steps": [ { "id": "signature", "number": 1, "label": "TaskFunction_t erases context type", "mode": "CODE", "strategy_ref": "code.abi", "svg_label": "01", "svg_target": "Callback", "code_ref": "vendor/FreeRTOS-Kernel/include/projdefs.h:1", "description": "Kernel widzi tylko void (*)(void*).", "evidence": "Sygnatura nie koduje WorkerContext.", "strategy": { "id": "task01/a3-dispatch/callback-context/signature", "kind": "code", "action": "open", "prerequisites": [ "zbudowany prog.elf" ], "layout": [ "sygnatura C", "nm/readelf", "listing RV32I" ], "commands": [ "make check-abi", "riscv64-unknown-elf-objdump -d build/task01_first_task/prog.elf" ], "expected_observations": [ "TaskFunction_t ma sygnaturę void (*)(void*)", "brak manglingu i runtime C++" ], "assertions": [ "sum_task_entry jest symbolem C", "jawny cast nie wykonuje kontroli typu" ], "evidence_fields": [ "ELF hash", "symbol", "instrukcja wejścia" ], "template_id": "code.abi" } }, { "id": "create", "number": 2, "label": "xTaskCreate receives entry and context", "mode": "RUN", "event_id": "E03", "strategy_ref": "run.create", "svg_label": "02", "svg_target": "Create", "code_ref": "src/tasks/task01_first_task.c:285", "snapshot_ref": "task01.create-call", "description": "Na xTaskCreate+0 rejestry niosą entry, &workerA i &workerA.handle.", "evidence": "a0=sum_task_entry, a3=&g_worker_a, a5=&g_worker_a.handle.", "strategy": { "id": "task01/a3-dispatch/callback-context/create", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3 online", "czysta RAM", "aktualny ELF" ], "layout": [ "source", "argumenty ABI", "context", "heap_4" ], "commands": [ "info registers a0 a1 a2 a3 a4 a5 sp", "print g_worker_a", "print &g_worker_a.handle" ], "expected_observations": [ "xTaskCreate otrzymuje entry i &workerA", "handle otrzymuje opaque TCB pointer" ], "assertions": [ "E03 zatrzymuje się na xTaskCreate+0", "E04 ma handle != NULL" ], "evidence_fields": [ "event_id", "context address", "field address", "handle value", "timestamp" ], "template_id": "run.create" } }, { "id": "entry-abi", "number": 3, "label": "pvParameters arrives in RV32 a0", "mode": "RUN", "event_id": "E06", "strategy_ref": "run.dispatch", "svg_label": "03", "svg_target": "Entry", "code_ref": "src/tasks/task01_first_task.c:143", "snapshot_ref": "task01.entry", "description": "Stop jest na sum_task_entry+0, zanim wywołanie checkpointu nadpisze a0.", "evidence": "a0 == &g_worker_a.", "strategy": { "id": "task01/a3-dispatch/callback-context/entry-abi", "kind": "run", "action": "replay", "prerequisites": [ "scheduler uruchomiony", "workerA READY" ], "layout": [ "sum_task_entry source", "assembly", "a0", "task stack" ], "commands": [ "info registers a0 sp pc", "x/i $pc", "print &g_worker_a", "bt" ], "expected_observations": [ "na sum_task_entry+0 a0 == &g_worker_a", "SP należy do osobnego stosu taska" ], "assertions": [ "typed pointer zachowuje ten sam adres", "cast nie tworzy drugiego dispatchu" ], "evidence_fields": [ "pvParameters", "WorkerContext*", "SP", "PC", "instruction" ], "template_id": "run.dispatch" } }, { "id": "typed-context", "number": 4, "label": "typed pointer recovers WorkerContext", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.dispatch", "svg_label": "04", "svg_target": "Cast", "code_ref": "src/tasks/task01_first_task.c:145", "snapshot_ref": "task01.work", "description": "Jawny cast dokumentuje zamiar, lecz nie sprawdza typu.", "evidence": "worker i pvParameters mają ten sam adres.", "strategy": { "id": "task01/a3-dispatch/callback-context/typed-context", "kind": "run", "action": "replay", "prerequisites": [ "scheduler uruchomiony", "workerA READY" ], "layout": [ "sum_task_entry source", "assembly", "a0", "task stack" ], "commands": [ "info registers a0 sp pc", "x/i $pc", "print &g_worker_a", "bt" ], "expected_observations": [ "na sum_task_entry+0 a0 == &g_worker_a", "SP należy do osobnego stosu taska" ], "assertions": [ "typed pointer zachowuje ten sam adres", "cast nie tworzy drugiego dispatchu" ], "evidence_fields": [ "pvParameters", "WorkerContext*", "SP", "PC", "instruction" ], "template_id": "run.dispatch" } }, { "id": "work", "number": 5, "label": "entry executes typed calculation", "mode": "RUN", "event_id": "E09", "strategy_ref": "run.dispatch", "svg_label": "05", "svg_target": "Work", "code_ref": "src/tasks/task01_first_task.c:179", "snapshot_ref": "task01.result", "description": "Obliczenie zapisuje wynik w polu kontekstu.", "evidence": "result=200010000, iterations=20000.", "strategy": { "id": "task01/a3-dispatch/callback-context/work", "kind": "run", "action": "replay", "prerequisites": [ "scheduler uruchomiony", "workerA READY" ], "layout": [ "sum_task_entry source", "assembly", "a0", "task stack" ], "commands": [ "info registers a0 sp pc", "x/i $pc", "print &g_worker_a", "bt" ], "expected_observations": [ "na sum_task_entry+0 a0 == &g_worker_a", "SP należy do osobnego stosu taska" ], "assertions": [ "typed pointer zachowuje ten sam adres", "cast nie tworzy drugiego dispatchu" ], "evidence_fields": [ "pvParameters", "WorkerContext*", "SP", "PC", "instruction" ], "template_id": "run.dispatch" } }, { "id": "wrong-cast", "number": 6, "label": "wrong context cast is accepted by C", "mode": "CODE", "strategy_ref": "code.structure", "svg_label": "06", "svg_target": "Hazard", "code_ref": "tests/context_contract.c:10", "description": "Fixture kompiluje się, ale nigdy nie jest linkowany ani wykonywany.", "evidence": "C nie zapewnia runtime type check dla void*.", "strategy": { "id": "task01/a3-dispatch/callback-context/wrong-cast", "kind": "code", "action": "open", "prerequisites": [ "freestanding C11", "include/task01_first_task.h" ], "layout": [ "source", "diagram danych", "mapa pamięci" ], "commands": [ "make check-contracts", "riscv64-unknown-elf-nm build/contracts/context_contract.o" ], "expected_observations": [ "WorkerContext nie ma ukrytego modelu obiektowego", "C akceptuje zły cast void* w fixture compile-only" ], "assertions": [ "&handle, wartość handle i TCB są odrębnymi pojęciami", "kontekst ma static lifetime" ], "evidence_fields": [ "source blob", "layout pól", "wynik check-contracts" ], "template_id": "code.structure" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 896.0, "height": 144.0, "full_x": 0.0, "full_y": 0.0, "full_width": 896.0, "full_height": 144.0, "page_width": 940.0, "page_height": 560.0, "overview": true, "step_ids": [ "create", "entry-abi", "signature", "typed-context", "work", "wrong-cast" ] }, "diagram_title": "A3 · callback i context", "diagram_block_label": "A3 DISPATCH", "diagram_description": "C function pointer, ABI RV32 i jawne odzyskanie typu.", "diagram_phase_labels": [ "CALLBACK / CONTEXT" ] } ], "steps": [], "spread_group": "", "spread_label": "A3 DISPATCH — od TaskFunction_t i xTaskCreate do WorkerContext*.", "spread_columns": 1, "spread_index": 1, "spread_count": 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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
", "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 — context, create, handle i scheduler. — część 1/1 (r1 c1)", "alt": "Pierwszy segment sekwencji raw C task.", "href": "figures/a5-flow-a.svg", "source_href": "figures/a5-flow-a.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-sequence", "storage_key": "fc02-a5-flow-a-tile-1", "title": "część 1/2 · context do READY", "task": { "id": "task01", "label": "Task01 · raw C task" }, "block": { "id": "a5-flow", "label": "A5 FLOW", "description": "Jeden blok i wspólni uczestnicy obejmują E01–E12." }, "phases": [ { "id": "create-start", "label": "CREATE / START", "steps": [ { "id": "contexts", "number": 1, "label": "static contexts prepared", "mode": "RUN", "event_id": "E01", "strategy_ref": "run.create", "svg_label": "01", "code_ref": "src/tasks/task01_first_task.c:313", "snapshot_ref": "task01.contexts", "description": "workerA istnieje przed TCB.", "evidence": "PREPARED, handle=NULL, result=0.", "strategy": { "id": "task01/a5-flow/create-start/contexts", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3 online", "czysta RAM", "aktualny ELF" ], "layout": [ "source", "argumenty ABI", "context", "heap_4" ], "commands": [ "info registers a0 a1 a2 a3 a4 a5 sp", "print g_worker_a", "print &g_worker_a.handle" ], "expected_observations": [ "xTaskCreate otrzymuje entry i &workerA", "handle otrzymuje opaque TCB pointer" ], "assertions": [ "E03 zatrzymuje się na xTaskCreate+0", "E04 ma handle != NULL" ], "evidence_fields": [ "event_id", "context address", "field address", "handle value", "timestamp" ], "template_id": "run.create" } }, { "id": "create-request", "number": 2, "label": "first worker create request", "mode": "RUN", "event_id": "E02", "strategy_ref": "run.create", "svg_label": "02", "code_ref": "src/tasks/task01_first_task.c:277", "snapshot_ref": "task01.create-request", "description": "create_worker otrzymuje &workerA.", "evidence": "Jest to pierwsze żądanie uruchomienia.", "strategy": { "id": "task01/a5-flow/create-start/create-request", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3 online", "czysta RAM", "aktualny ELF" ], "layout": [ "source", "argumenty ABI", "context", "heap_4" ], "commands": [ "info registers a0 a1 a2 a3 a4 a5 sp", "print g_worker_a", "print &g_worker_a.handle" ], "expected_observations": [ "xTaskCreate otrzymuje entry i &workerA", "handle otrzymuje opaque TCB pointer" ], "assertions": [ "E03 zatrzymuje się na xTaskCreate+0", "E04 ma handle != NULL" ], "evidence_fields": [ "event_id", "context address", "field address", "handle value", "timestamp" ], "template_id": "run.create" } }, { "id": "create-call", "number": 3, "label": "xTaskCreate(entry, &workerA)", "mode": "RUN", "event_id": "E03", "strategy_ref": "run.create", "svg_label": "03", "code_ref": "src/tasks/task01_first_task.c:285", "snapshot_ref": "task01.create-call", "description": "ABI C przekazuje funkcję i kontekst osobno.", "evidence": "a0/a3/a5 wskazują entry/context/handle field.", "strategy": { "id": "task01/a5-flow/create-start/create-call", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3 online", "czysta RAM", "aktualny ELF" ], "layout": [ "source", "argumenty ABI", "context", "heap_4" ], "commands": [ "info registers a0 a1 a2 a3 a4 a5 sp", "print g_worker_a", "print &g_worker_a.handle" ], "expected_observations": [ "xTaskCreate otrzymuje entry i &workerA", "handle otrzymuje opaque TCB pointer" ], "assertions": [ "E03 zatrzymuje się na xTaskCreate+0", "E04 ma handle != NULL" ], "evidence_fields": [ "event_id", "context address", "field address", "handle value", "timestamp" ], "template_id": "run.create" } }, { "id": "ready", "number": 4, "label": "handle non-null; diagnostic READY", "mode": "RUN", "event_id": "E04", "strategy_ref": "run.create", "svg_label": "04", "code_ref": "src/tasks/task01_first_task.c:303", "snapshot_ref": "task01.ready", "description": "Historyczna wartość handle zostaje zachowana.", "evidence": "created_handle == handle != NULL.", "strategy": { "id": "task01/a5-flow/create-start/ready", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3 online", "czysta RAM", "aktualny ELF" ], "layout": [ "source", "argumenty ABI", "context", "heap_4" ], "commands": [ "info registers a0 a1 a2 a3 a4 a5 sp", "print g_worker_a", "print &g_worker_a.handle" ], "expected_observations": [ "xTaskCreate otrzymuje entry i &workerA", "handle otrzymuje opaque TCB pointer" ], "assertions": [ "E03 zatrzymuje się na xTaskCreate+0", "E04 ma handle != NULL" ], "evidence_fields": [ "event_id", "context address", "field address", "handle value", "timestamp" ], "template_id": "run.create" } }, { "id": "scheduler", "number": 5, "label": "vTaskStartScheduler", "mode": "RUN", "event_id": "E05", "strategy_ref": "run.create", "svg_label": "05", "code_ref": "src/tasks/task01_first_task.c:333", "snapshot_ref": "task01.scheduler", "description": "Ostatni stop na startup stack.", "evidence": "A, B i supervisor mają utworzone handle.", "strategy": { "id": "task01/a5-flow/create-start/scheduler", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3 online", "czysta RAM", "aktualny ELF" ], "layout": [ "source", "argumenty ABI", "context", "heap_4" ], "commands": [ "info registers a0 a1 a2 a3 a4 a5 sp", "print g_worker_a", "print &g_worker_a.handle" ], "expected_observations": [ "xTaskCreate otrzymuje entry i &workerA", "handle otrzymuje opaque TCB pointer" ], "assertions": [ "E03 zatrzymuje się na xTaskCreate+0", "E04 ma handle != NULL" ], "evidence_fields": [ "event_id", "context address", "field address", "handle value", "timestamp" ], "template_id": "run.create" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 904.0, "height": 282.0, "full_x": 0.0, "full_y": 0.0, "full_width": 904.0, "full_height": 282.0, "page_width": 940.0, "page_height": 560.0, "overview": true, "step_ids": [ "contexts", "create-call", "create-request", "ready", "scheduler" ] }, "diagram_title": "część 1/2 · context do READY", "diagram_block_label": "A5 FLOW", "diagram_description": "Jeden blok i wspólni uczestnicy obejmują E01–E12.", "diagram_phase_labels": [ "CREATE / START" ] } ], "steps": [], "spread_group": "fc02-first-task-lifecycle", "spread_label": "FC02 · raw C task lifecycle", "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\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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
", "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 — callback, time slicing, wynik, delete i PASS. — część 1/1 (r1 c1)", "alt": "Drugi segment sekwencji raw C task.", "href": "figures/a5-flow-b.svg", "source_href": "figures/a5-flow-b.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-sequence", "storage_key": "fc02-a5-flow-b-tile-1", "title": "część 2/2 · RUNNING do PASS", "task": { "id": "task01", "label": "Task01 · raw C task" }, "block": { "id": "a5-flow", "label": "A5 FLOW", "description": "Kontynuacja tego samego diagramu i kontekstów." }, "phases": [ { "id": "dispatch-finish", "label": "DISPATCH / FINISH", "steps": [ { "id": "entry", "number": 6, "label": "sum_task_entry(&workerA)", "mode": "RUN", "event_id": "E06", "strategy_ref": "run.dispatch", "svg_label": "06", "code_ref": "src/tasks/task01_first_task.c:143", "snapshot_ref": "task01.entry", "description": "Callback entry zachowuje pierwszy argument w a0.", "evidence": "a0 == &g_worker_a na wejściu symbolu.", "strategy": { "id": "task01/a5-flow/dispatch-finish/entry", "kind": "run", "action": "replay", "prerequisites": [ "scheduler uruchomiony", "workerA READY" ], "layout": [ "sum_task_entry source", "assembly", "a0", "task stack" ], "commands": [ "info registers a0 sp pc", "x/i $pc", "print &g_worker_a", "bt" ], "expected_observations": [ "na sum_task_entry+0 a0 == &g_worker_a", "SP należy do osobnego stosu taska" ], "assertions": [ "typed pointer zachowuje ten sam adres", "cast nie tworzy drugiego dispatchu" ], "evidence_fields": [ "pvParameters", "WorkerContext*", "SP", "PC", "instruction" ], "template_id": "run.dispatch" } }, { "id": "work", "number": 7, "label": "typed context; RUNNING", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.dispatch", "svg_label": "07", "code_ref": "src/tasks/task01_first_task.c:157", "snapshot_ref": "task01.work", "description": "Kontekst jest typowany, a SP należy do stosu taska.", "evidence": "created_handle==tcb_address i stack_low<=sp<=stack_high.", "strategy": { "id": "task01/a5-flow/dispatch-finish/work", "kind": "run", "action": "replay", "prerequisites": [ "scheduler uruchomiony", "workerA READY" ], "layout": [ "sum_task_entry source", "assembly", "a0", "task stack" ], "commands": [ "info registers a0 sp pc", "x/i $pc", "print &g_worker_a", "bt" ], "expected_observations": [ "na sum_task_entry+0 a0 == &g_worker_a", "SP należy do osobnego stosu taska" ], "assertions": [ "typed pointer zachowuje ten sam adres", "cast nie tworzy drugiego dispatchu" ], "evidence_fields": [ "pvParameters", "WorkerContext*", "SP", "PC", "instruction" ], "template_id": "run.dispatch" } }, { "id": "timeslice", "number": 8, "label": "tick: A -> B -> A", "mode": "RUN", "event_id": "E08", "strategy_ref": "run.scheduler", "svg_label": "08", "code_ref": "src/tasks/task01_first_task.c:172", "snapshot_ref": "task01.timeslice", "description": "Checkpoint powstaje dopiero po wykryciu podciągu, niezależnie od pierwszego taska.", "evidence": "g_aba_task={0,1,0}; observed changes>=2.", "strategy": { "id": "task01/a5-flow/dispatch-finish/timeslice", "kind": "run", "action": "replay", "prerequisites": [ "dwa workery priority=2", "time slicing włączony" ], "layout": [ "source loop", "tick", "A/B/A evidence", "PC" ], "commands": [ "print g_aba_task", "print g_aba_tick", "print g_observed_worker_changes" ], "expected_observations": [ "bufor zawiera podciąg A → B → A", "ticki są niemalejące" ], "assertions": [ "worker changes >= 2", "E08 emituje worker A dopiero po wykryciu podciągu" ], "evidence_fields": [ "triplet", "ticks", "change count", "timestamp" ], "template_id": "run.scheduler" } }, { "id": "result", "number": 9, "label": "result published", "mode": "RUN", "event_id": "E09", "strategy_ref": "run.dispatch", "svg_label": "09", "code_ref": "src/tasks/task01_first_task.c:179", "snapshot_ref": "task01.result", "description": "Wynik i liczba iteracji są zapisane w context.", "evidence": "200010000 i 20000.", "strategy": { "id": "task01/a5-flow/dispatch-finish/result", "kind": "run", "action": "replay", "prerequisites": [ "scheduler uruchomiony", "workerA READY" ], "layout": [ "sum_task_entry source", "assembly", "a0", "task stack" ], "commands": [ "info registers a0 sp pc", "x/i $pc", "print &g_worker_a", "bt" ], "expected_observations": [ "na sum_task_entry+0 a0 == &g_worker_a", "SP należy do osobnego stosu taska" ], "assertions": [ "typed pointer zachowuje ten sam adres", "cast nie tworzy drugiego dispatchu" ], "evidence_fields": [ "pvParameters", "WorkerContext*", "SP", "PC", "instruction" ], "template_id": "run.dispatch" } }, { "id": "completed", "number": 10, "label": "COMPLETED; public handle NULL", "mode": "RUN", "event_id": "E10", "strategy_ref": "run.state", "svg_label": "10", "code_ref": "src/tasks/task01_first_task.c:185", "snapshot_ref": "task01.completed", "description": "created_handle zachowuje forensic address, public handle zostaje wyczyszczony.", "evidence": "Static context nadal istnieje.", "strategy": { "id": "task01/a5-flow/dispatch-finish/completed", "kind": "run", "action": "replay", "prerequisites": [ "kanoniczny checkpoint" ], "layout": [ "WorkerContext", "public kernel state", "source" ], "commands": [ "print g_worker_a.trace_state", "print g_worker_a.handle", "info registers sp pc" ], "expected_observations": [ "trace_state nie jest eTaskState", "COMPLETED poprzedza self-delete" ], "assertions": [ "static context przeżywa usunięcie taska", "E11 jest stopem przed vTaskDelete" ], "evidence_fields": [ "trace state", "kernel state", "event_id", "PC" ], "template_id": "run.state" } }, { "id": "delete", "number": 11, "label": "vTaskDelete(NULL)", "mode": "RUN", "event_id": "E11", "strategy_ref": "run.state", "svg_label": "11", "code_ref": "src/tasks/task01_first_task.c:189", "snapshot_ref": "task01.delete", "description": "Stop jest przed niepowracającym self-delete.", "evidence": "Adresy TCB/stack po delete są tylko forensic.", "strategy": { "id": "task01/a5-flow/dispatch-finish/delete", "kind": "run", "action": "replay", "prerequisites": [ "kanoniczny checkpoint" ], "layout": [ "WorkerContext", "public kernel state", "source" ], "commands": [ "print g_worker_a.trace_state", "print g_worker_a.handle", "info registers sp pc" ], "expected_observations": [ "trace_state nie jest eTaskState", "COMPLETED poprzedza self-delete" ], "assertions": [ "static context przeżywa usunięcie taska", "E11 jest stopem przed vTaskDelete" ], "evidence_fields": [ "trace state", "kernel state", "event_id", "PC" ], "template_id": "run.state" } }, { "id": "pass", "number": 12, "label": "supervisor verifies PASS", "mode": "RUN", "event_id": "E12", "strategy_ref": "run.pass", "svg_label": "12", "code_ref": "src/tasks/task01_first_task.c:231", "snapshot_ref": "task01.pass", "description": "Supervisor sprawdza oba workery i wspólne inwarianty pary.", "evidence": "PASS=1, dwa wyniki, A/B/A, ticks i stack bounds.", "strategy": { "id": "task01/a5-flow/dispatch-finish/pass", "kind": "run", "action": "replay", "prerequisites": [ "oba workery zakończone", "supervisor uruchomiony" ], "layout": [ "contexts", "trace", "assertions" ], "commands": [ "print g_worker_a", "print g_worker_b", "print g_aba_task", "print g_task01_pass" ], "expected_observations": [ "oba wyniki = 200010000", "oba workery wykonały 20000 iteracji" ], "assertions": [ "PASS = 1", "elapsed ticks >= 2", "A/B/A zapisane" ], "evidence_fields": [ "results", "iterations", "PASS", "ticks", "trace", "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": 904.0, "height": 350.0, "full_x": 0.0, "full_y": 0.0, "full_width": 904.0, "full_height": 350.0, "page_width": 940.0, "page_height": 560.0, "overview": true, "step_ids": [ "completed", "delete", "entry", "pass", "result", "timeslice", "work" ] }, "diagram_title": "część 2/2 · RUNNING do PASS", "diagram_block_label": "A5 FLOW", "diagram_description": "Kontynuacja tego samego diagramu i kontekstów.", "diagram_phase_labels": [ "DISPATCH / FINISH" ] } ], "steps": [], "spread_group": "fc02-first-task-lifecycle", "spread_label": "FC02 · raw C task lifecycle", "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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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:a6-state", "logical_label": "fig:a6-state", "figure_number": 6, "caption": "A6 STATE — korelacja stanu kontekstu z Ready, Running, time slice i Deleted. — część 1/1 (r1 c1)", "alt": "Oddzielne tory stanu diagnostycznego i stanu FreeRTOS.", "href": "figures/a6-state.svg", "source_href": "figures/a6-state.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-state", "storage_key": "fc02-a6-state-tile-1", "title": "A6 · dwa modele stanu", "task": { "id": "task01", "label": "Task01 · raw C task" }, "block": { "id": "a6-state", "label": "A6 STATE", "description": "Nie utożsamiaj trace_state z eTaskState." }, "phases": [ { "id": "context-diagnostic", "label": "CONTEXT / DIAGNOSTIC", "steps": [ { "id": "lifetime", "number": 1, "label": "static WorkerContext lifetime", "mode": "CODE", "strategy_ref": "code.structure", "svg_label": "01", "svg_target": "ObjectLifetime", "code_ref": "src/tasks/task01_first_task.c:28", "description": "Context istnieje przed taskiem i po jego self-delete.", "evidence": "Adres static storage jest stały.", "strategy": { "id": "task01/a6-state/context-diagnostic/lifetime", "kind": "code", "action": "open", "prerequisites": [ "freestanding C11", "include/task01_first_task.h" ], "layout": [ "source", "diagram danych", "mapa pamięci" ], "commands": [ "make check-contracts", "riscv64-unknown-elf-nm build/contracts/context_contract.o" ], "expected_observations": [ "WorkerContext nie ma ukrytego modelu obiektowego", "C akceptuje zły cast void* w fixture compile-only" ], "assertions": [ "&handle, wartość handle i TCB są odrębnymi pojęciami", "kontekst ma static lifetime" ], "evidence_fields": [ "source blob", "layout pól", "wynik check-contracts" ], "template_id": "code.structure" } }, { "id": "prepared", "number": 2, "label": "PREPARED -> STARTING -> READY", "mode": "RUN", "event_id": "E04", "strategy_ref": "run.state", "svg_label": "02", "svg_target": "Starting", "code_ref": "src/tasks/task01_first_task.c:279", "snapshot_ref": "task01.ready", "description": "Stan diagnostyczny opisuje aplikację.", "evidence": "READY współistnieje z handle != NULL.", "strategy": { "id": "task01/a6-state/context-diagnostic/prepared", "kind": "run", "action": "replay", "prerequisites": [ "kanoniczny checkpoint" ], "layout": [ "WorkerContext", "public kernel state", "source" ], "commands": [ "print g_worker_a.trace_state", "print g_worker_a.handle", "info registers sp pc" ], "expected_observations": [ "trace_state nie jest eTaskState", "COMPLETED poprzedza self-delete" ], "assertions": [ "static context przeżywa usunięcie taska", "E11 jest stopem przed vTaskDelete" ], "evidence_fields": [ "trace state", "kernel state", "event_id", "PC" ], "template_id": "run.state" } }, { "id": "running", "number": 3, "label": "RUNNING -> COMPLETED", "mode": "RUN", "event_id": "E10", "strategy_ref": "run.state", "svg_label": "03", "svg_target": "RunningWrapper", "code_ref": "src/tasks/task01_first_task.c:185", "snapshot_ref": "task01.completed", "description": "COMPLETED jest zapisane przed delete.", "evidence": "Static context nie znika.", "strategy": { "id": "task01/a6-state/context-diagnostic/running", "kind": "run", "action": "replay", "prerequisites": [ "kanoniczny checkpoint" ], "layout": [ "WorkerContext", "public kernel state", "source" ], "commands": [ "print g_worker_a.trace_state", "print g_worker_a.handle", "info registers sp pc" ], "expected_observations": [ "trace_state nie jest eTaskState", "COMPLETED poprzedza self-delete" ], "assertions": [ "static context przeżywa usunięcie taska", "E11 jest stopem przed vTaskDelete" ], "evidence_fields": [ "trace state", "kernel state", "event_id", "PC" ], "template_id": "run.state" } } ] }, { "id": "kernel", "label": "KERNEL", "steps": [ { "id": "kernel-running", "number": 4, "label": "Ready <-> Running", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.state", "svg_label": "04", "svg_target": "RunningKernel", "code_ref": "src/tasks/task01_first_task.c:157", "snapshot_ref": "task01.work", "description": "CPU-bound worker nie przechodzi przez Blocked.", "evidence": "Scheduler wybiera równorzędne Ready taski.", "strategy": { "id": "task01/a6-state/kernel/kernel-running", "kind": "run", "action": "replay", "prerequisites": [ "kanoniczny checkpoint" ], "layout": [ "WorkerContext", "public kernel state", "source" ], "commands": [ "print g_worker_a.trace_state", "print g_worker_a.handle", "info registers sp pc" ], "expected_observations": [ "trace_state nie jest eTaskState", "COMPLETED poprzedza self-delete" ], "assertions": [ "static context przeżywa usunięcie taska", "E11 jest stopem przed vTaskDelete" ], "evidence_fields": [ "trace state", "kernel state", "event_id", "PC" ], "template_id": "run.state" } }, { "id": "timeslice", "number": 5, "label": "equal-priority time slicing", "mode": "RUN", "event_id": "E08", "strategy_ref": "run.scheduler", "svg_label": "05", "svg_target": "TimeSlice", "code_ref": "src/tasks/task01_first_task.c:172", "snapshot_ref": "task01.timeslice", "description": "Podciąg A/B/A dowodzi wznowienia kontekstu.", "evidence": "Ticki są niemalejące.", "strategy": { "id": "task01/a6-state/kernel/timeslice", "kind": "run", "action": "replay", "prerequisites": [ "dwa workery priority=2", "time slicing włączony" ], "layout": [ "source loop", "tick", "A/B/A evidence", "PC" ], "commands": [ "print g_aba_task", "print g_aba_tick", "print g_observed_worker_changes" ], "expected_observations": [ "bufor zawiera podciąg A → B → A", "ticki są niemalejące" ], "assertions": [ "worker changes >= 2", "E08 emituje worker A dopiero po wykryciu podciągu" ], "evidence_fields": [ "triplet", "ticks", "change count", "timestamp" ], "template_id": "run.scheduler" } }, { "id": "deleted", "number": 6, "label": "Deleted does not destroy static context", "mode": "RUN", "event_id": "E11", "strategy_ref": "run.state", "svg_label": "06", "svg_target": "DeletedKernel", "code_ref": "src/tasks/task01_first_task.c:189", "snapshot_ref": "task01.delete", "description": "E11 jest przed delete; karta nie dereferencjonuje forensic TCB później.", "evidence": "Context/result pozostają obserwowalne dla supervisora.", "strategy": { "id": "task01/a6-state/kernel/deleted", "kind": "run", "action": "replay", "prerequisites": [ "kanoniczny checkpoint" ], "layout": [ "WorkerContext", "public kernel state", "source" ], "commands": [ "print g_worker_a.trace_state", "print g_worker_a.handle", "info registers sp pc" ], "expected_observations": [ "trace_state nie jest eTaskState", "COMPLETED poprzedza self-delete" ], "assertions": [ "static context przeżywa usunięcie taska", "E11 jest stopem przed vTaskDelete" ], "evidence_fields": [ "trace state", "kernel state", "event_id", "PC" ], "template_id": "run.state" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 616.0, "height": 478.0, "full_x": 0.0, "full_y": 0.0, "full_width": 616.0, "full_height": 478.0, "page_width": 660.0, "page_height": 760.0, "overview": true, "step_ids": [ "deleted", "kernel-running", "lifetime", "prepared", "running", "timeslice" ] }, "diagram_title": "A6 · dwa modele stanu", "diagram_block_label": "A6 STATE", "diagram_description": "Nie utożsamiaj trace_state z eTaskState.", "diagram_phase_labels": [ "CONTEXT / DIAGNOSTIC", "KERNEL" ] } ], "steps": [], "spread_group": "", "spread_label": "A6 STATE — korelacja stanu kontekstu z Ready, Running, time slice i Deleted.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "portrait" }, { "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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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
", "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 — context, handle/TCB, osobny stack, ABI i dowód końcowy. — część 1/1 (r1 c1)", "alt": "Mapa pamięci i dowodów runtime pierwszego taska C.", "href": "figures/a7-runtime.svg", "source_href": "figures/a7-runtime.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-object", "storage_key": "fc02-a7-runtime-tile-1", "title": "A7 · mapa wykonania", "task": { "id": "task01", "label": "Task01 · raw C task" }, "block": { "id": "a7-runtime", "label": "A7 RUNTIME", "description": "Minimalny zestaw pomiarów dobrany do pytania." }, "phases": [ { "id": "memory", "label": "MEMORY", "steps": [ { "id": "context", "number": 1, "label": "context address is not TCB", "mode": "RUN", "event_id": "E04", "strategy_ref": "run.runtime", "svg_label": "01", "svg_target": "Context", "code_ref": "src/tasks/task01_first_task.c:28", "snapshot_ref": "task01.ready", "description": "&g_worker_a ma static storage.", "evidence": "Adres nie leży w ucHeap.", "strategy": { "id": "task01/a7-runtime/memory/context", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3/GDB online", "symbole ELF" ], "layout": [ "context", "handle/TCB", "stack", "registers", "listing" ], "commands": [ "print &g_worker_a", "print &g_worker_a.handle", "print g_worker_a.created_handle", "print g_worker_a.tcb_address", "print g_worker_a.stack_low", "print g_worker_a.stack_high", "info registers a0 sp pc" ], "expected_observations": [ "context, TCB i stack są trzema obszarami", "SP mieści się w stack range" ], "assertions": [ "created_handle == tcb_address", "zapisane adresy po delete są forensic i nie są dereferencjonowane" ], "evidence_fields": [ "context", "field address", "handle/TCB", "stack range", "SP", "PC" ], "template_id": "run.runtime" } }, { "id": "handle", "number": 2, "label": "field address, handle value and TCB", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.runtime", "svg_label": "02", "svg_target": "Handle", "code_ref": "include/task01_first_task.h:25", "snapshot_ref": "task01.work", "description": "&handle jest adresem pola, handle wartością opaque.", "evidence": "created_handle == tcb_address, ale &handle różni się od obu.", "strategy": { "id": "task01/a7-runtime/memory/handle", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3/GDB online", "symbole ELF" ], "layout": [ "context", "handle/TCB", "stack", "registers", "listing" ], "commands": [ "print &g_worker_a", "print &g_worker_a.handle", "print g_worker_a.created_handle", "print g_worker_a.tcb_address", "print g_worker_a.stack_low", "print g_worker_a.stack_high", "info registers a0 sp pc" ], "expected_observations": [ "context, TCB i stack są trzema obszarami", "SP mieści się w stack range" ], "assertions": [ "created_handle == tcb_address", "zapisane adresy po delete są forensic i nie są dereferencjonowane" ], "evidence_fields": [ "context", "field address", "handle/TCB", "stack range", "SP", "PC" ], "template_id": "run.runtime" } }, { "id": "tcb-stack", "number": 3, "label": "TCB and stack are separate heap_4 blocks", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.runtime", "svg_label": "03", "svg_target": "TCB", "code_ref": "src/tasks/task01_first_task.c:126", "snapshot_ref": "task01.work", "description": "TaskStatus_t dostarcza publiczną obserwację handle i stack bounds.", "evidence": "SP należy do zakresu stack, nie do context/TCB.", "strategy": { "id": "task01/a7-runtime/memory/tcb-stack", "kind": "run", "action": "replay", "prerequisites": [ "Hazard3/GDB online", "symbole ELF" ], "layout": [ "context", "handle/TCB", "stack", "registers", "listing" ], "commands": [ "print &g_worker_a", "print &g_worker_a.handle", "print g_worker_a.created_handle", "print g_worker_a.tcb_address", "print g_worker_a.stack_low", "print g_worker_a.stack_high", "info registers a0 sp pc" ], "expected_observations": [ "context, TCB i stack są trzema obszarami", "SP mieści się w stack range" ], "assertions": [ "created_handle == tcb_address", "zapisane adresy po delete są forensic i nie są dereferencjonowane" ], "evidence_fields": [ "context", "field address", "handle/TCB", "stack range", "SP", "PC" ], "template_id": "run.runtime" } } ] }, { "id": "cpu-scheduler", "label": "CPU / SCHEDULER", "steps": [ { "id": "abi", "number": 4, "label": "pvParameters in a0 at callback entry", "mode": "RUN", "event_id": "E06", "strategy_ref": "run.dispatch", "svg_label": "04", "svg_target": "ABI", "code_ref": "src/tasks/task01_first_task.c:143", "snapshot_ref": "task01.entry", "description": "Stop bezpośrednio na symbolu zachowuje ABI evidence.", "evidence": "a0 == &g_worker_a.", "strategy": { "id": "task01/a7-runtime/cpu-scheduler/abi", "kind": "run", "action": "replay", "prerequisites": [ "scheduler uruchomiony", "workerA READY" ], "layout": [ "sum_task_entry source", "assembly", "a0", "task stack" ], "commands": [ "info registers a0 sp pc", "x/i $pc", "print &g_worker_a", "bt" ], "expected_observations": [ "na sum_task_entry+0 a0 == &g_worker_a", "SP należy do osobnego stosu taska" ], "assertions": [ "typed pointer zachowuje ten sam adres", "cast nie tworzy drugiego dispatchu" ], "evidence_fields": [ "pvParameters", "WorkerContext*", "SP", "PC", "instruction" ], "template_id": "run.dispatch" } }, { "id": "schedule", "number": 5, "label": "PC, tick and A/B/A trace", "mode": "RUN", "event_id": "E08", "strategy_ref": "run.scheduler", "svg_label": "05", "svg_target": "Schedule", "code_ref": "src/tasks/task01_first_task.c:172", "snapshot_ref": "task01.timeslice", "description": "Trace liczy obserwowane zmiany workera, nie wszystkie przełączenia kernela.", "evidence": "A/B/A, ticks i PC są powiązane z E08.", "strategy": { "id": "task01/a7-runtime/cpu-scheduler/schedule", "kind": "run", "action": "replay", "prerequisites": [ "dwa workery priority=2", "time slicing włączony" ], "layout": [ "source loop", "tick", "A/B/A evidence", "PC" ], "commands": [ "print g_aba_task", "print g_aba_tick", "print g_observed_worker_changes" ], "expected_observations": [ "bufor zawiera podciąg A → B → A", "ticki są niemalejące" ], "assertions": [ "worker changes >= 2", "E08 emituje worker A dopiero po wykryciu podciągu" ], "evidence_fields": [ "triplet", "ticks", "change count", "timestamp" ], "template_id": "run.scheduler" } }, { "id": "evidence", "number": 6, "label": "result, source and checkpoint identity", "mode": "RUN", "event_id": "E12", "strategy_ref": "run.pass", "svg_label": "06", "svg_target": "Evidence", "code_ref": "src/tasks/task01_first_task.c:231", "snapshot_ref": "task01.pass", "description": "Końcowy dowód wiąże wynik ze źródłem, ELF i timestampem.", "evidence": "snapshot_ref, event_id, source blob, image hash i PASS.", "strategy": { "id": "task01/a7-runtime/cpu-scheduler/evidence", "kind": "run", "action": "replay", "prerequisites": [ "oba workery zakończone", "supervisor uruchomiony" ], "layout": [ "contexts", "trace", "assertions" ], "commands": [ "print g_worker_a", "print g_worker_b", "print g_aba_task", "print g_task01_pass" ], "expected_observations": [ "oba wyniki = 200010000", "oba workery wykonały 20000 iteracji" ], "assertions": [ "PASS = 1", "elapsed ticks >= 2", "A/B/A zapisane" ], "evidence_fields": [ "results", "iterations", "PASS", "ticks", "trace", "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": 894.0, "height": 491.0, "full_x": 0.0, "full_y": 0.0, "full_width": 894.0, "full_height": 491.0, "page_width": 940.0, "page_height": 560.0, "overview": true, "step_ids": [ "abi", "context", "evidence", "handle", "schedule", "tcb-stack" ] }, "diagram_title": "A7 · mapa wykonania", "diagram_block_label": "A7 RUNTIME", "diagram_description": "Minimalny zestaw pomiarów dobrany do pytania.", "diagram_phase_labels": [ "MEMORY", "CPU / SCHEDULER" ] } ], "steps": [], "spread_group": "", "spread_label": "A7 RUNTIME — context, handle/TCB, osobny stack, ABI i dowód końcowy.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "landscape" }, { "id": "section-8-task01", "index": 8, "title": "Task01 — Raw C task", "show_heading": true, "toc_entry": true, "header_html": "
\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
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [ { "ref": "task01", "title": "Pierwszy task FreeRTOS — callback, context, TCB i stos", "uuid": "a2538a1a-3c37-4c14-a6ea-db5aba8fd038", "criterion": "Program wypisuje PASS; oba wyniki wynoszą 200010000; E06 pokazuje a0=&workerA; trace zawiera A-B-A; context, TCB i stack są rozdzielone.", "conclusion_html": "

Surowe API C przekazuje zachowanie i dane oddzielnie: TaskFunction_t wybiera kod, a void* niesie adres jawnego kontekstu. Scheduler, TCB i stos pozostają własnością FreeRTOS.

", "prompt_html": "

Przejdź po aktywnych perspektywach A1, A2, A3, A5, A6 i A7. Dla kroków RUN użyj Enter lub F2 i udowodnij w Hazard3/GDB przepływ xTaskCreate -> sum_task_entry -> WorkerContext -> vTaskDelete.

", "flow": [ { "id": "c-model", "kind": "block", "title": "A — model C i granica ABI", "content_html": "

Najpierw czytaj A1-A3 bez uruchamiania programu.

", "steps": [ { "id": "read-context", "title": "Odczytaj WorkerContext.", "content_html": "

Rozróżnij static context, adres pola handle, wartość handle, TCB i stack.

" }, { "id": "prove-c-abi", "title": "Udowodnij callback ABI.", "content_html": "

Na E03 zbadaj argumenty xTaskCreate, a na E06 rejestr a0 przed prologiem sum_task_entry.

" } ] }, { "id": "runtime-trace", "kind": "block", "title": "B — sekwencja i scheduler", "content_html": "

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

", "steps": [ { "id": "follow-context", "title": "Śledź jeden adres context.", "content_html": "

Porównaj &g_worker_a w main, xTaskCreate i sum_task_entry.

" }, { "id": "follow-stack", "title": "Śledź osobny stos.", "content_html": "

Potwierdź stack_low <= sp <= stack_high i created_handle == tcb_address.

" }, { "id": "follow-scheduler", "title": "Śledź A-B-A.", "content_html": "

Zapisz triplet workerów, ticki i liczbę obserwowanych zmian.

" } ] }, { "id": "raw-c-debug-report", "kind": "exercise", "title": "Ćwiczenie — timestampowany ślad taska C", "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": "Aplikacja C → FreeRTOS → Hazard3", "status": "enabled", "target_label": "fig:a1-context", "target_id": "fig-a1-context" }, { "id": "A2", "label": "STRUCTURE", "subtitle": "Konteksty, uchwyty, funkcje i domeny pamięci", "status": "enabled", "target_label": "fig:a2-structure", "target_id": "fig-a2-structure" }, { "id": "A3", "label": "DISPATCH", "subtitle": "TaskFunction_t + void* → WorkerContext*", "status": "enabled", "target_label": "fig:a3-dispatch", "target_id": "fig-a3-dispatch" }, { "id": "A4", "label": "APPLICATION", "subtitle": "Topologia aplikacji", "status": "unavailable", "reason": "Topologia i inwarianty surowego modułu C są już kompletne w A2 i A5; osobny A4 dublowałby treść.", "target_id": "" }, { "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": "Stan diagnostyczny kontekstu a stan kernela", "status": "enabled", "target_label": "fig:a6-state", "target_id": "fig-a6-state" }, { "id": "A7", "label": "RUNTIME", "subtitle": "Context, handle, TCB, stos, rejestry i tick", "status": "enabled", "target_label": "fig:a7-runtime", "target_id": "fig-a7-runtime" }, { "id": "A8", "label": "PATTERNS", "subtitle": "Wzorce projektowe", "status": "unavailable", "reason": "Context object, opaque handle i callback ABI są opisane dokładnie w A2/A3; osobny diagram wzorców byłby dekoracyjny.", "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. A3 — Dispatch" }, { "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 — Raw C task" } ] }