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

Uczeń odróżnia mutex od semafora binarnego i dowodzi, że FreeRTOS tymczasowo podnosi efektywny priorytet właściciela blokującego task o wyższym priorytecie.

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

Low p1 przejmuje mutex i tworzy High p3. High blokuje się bez timeoutu, Low dziedziczy p3, a nowy Medium p2 pozostaje Ready bez wykonania. Po give High przejmuje zasób przed Medium, a Low wraca do p1. Verifier sprawdza publiczne API, własność, trzy stosy, porządek E01–E10 i stabilny digest.

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

ownership, bounded inversion i priority inheritance

", "priority": "główny", "status": "ready", "status_label": "opracowane", "version": "v00.01", "key": true } ] }, "sections": [ { "id": "section-1-content", "index": 1, "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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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
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [], "assets": [ { "label": "fig:a2-structure", "logical_label": "fig:a2-structure", "figure_number": 1, "caption": "A2 STRUCTURE — ownership i wait list. — część 1/1 (r1 c1)", "alt": "Struktura mutexu i trzech tasków.", "href": "figures/a2-structure.svg", "source_href": "figures/a2-structure.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc08-a2-structure-tile-1", "title": "A2 · struktura mutexu", "task": { "id": "task01", "label": "Task01 · mutex i PIP" }, "block": { "id": "a2", "label": "A2 STRUCTURE", "description": "Genuine mutex, owner, waiter, Ready task and guarded resource." }, "phases": [ { "id": "structure", "label": "MUTEX / OWNER / WAITERS", "steps": [ { "id": "mutex", "number": 1, "label": "genuine FreeRTOS mutex", "mode": "CODE", "strategy_ref": "code.contract", "svg_label": "01", "code_ref": "src/tasks/task01_mutex.c:237", "description": "xSemaphoreCreateMutex wybiera mechanizm ownership/PIP.", "evidence": "xQueueCreateMutex symbol.", "strategy": { "id": "task01/a2/structure/mutex", "kind": "code", "action": "open", "expected_observations": [ "genuine mutex API", "brak vTaskPrioritySet" ], "assertions": [ "one mutex", "fixed p1/p2/p3" ], "evidence_fields": [ "code_ref", "API", "priority" ], "prerequisites": [ "źródło FC08" ], "layout": [ "FreeRTOSConfig", "MutexExperiment", "task priorities" ], "commands": [ "rg -n 'configUSE_MUTEXES|xSemaphore|uxTaskPriorityGet' include src" ], "template_id": "code.contract" } }, { "id": "low", "number": 2, "label": "Low owns protected value", "mode": "RUN", "event_id": "E02", "strategy_ref": "run.inheritance", "svg_label": "02", "code_ref": "src/tasks/task01_mutex.c:142", "snapshot_ref": "task01.low-owns", "description": "Take z zerowym wait jest legalny dla wolnego mutexu.", "evidence": "holder Low; value 1.", "strategy": { "id": "task01/a2/structure/low", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "high", "number": 3, "label": "High waits indefinitely", "mode": "RUN", "event_id": "E03", "strategy_ref": "run.inheritance", "svg_label": "03", "code_ref": "src/tasks/task01_mutex.c:97", "snapshot_ref": "task01.high-blocks", "description": "High trafia na mutex wait list.", "evidence": "High stack and Blocked path.", "strategy": { "id": "task01/a2/structure/high", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "medium", "number": 4, "label": "Medium is Ready, not executed", "mode": "RUN", "event_id": "E05", "strategy_ref": "run.inheritance", "svg_label": "04", "code_ref": "src/tasks/task01_mutex.c:160", "snapshot_ref": "task01.medium-ready", "description": "P2 nie wyprzedza odziedziczonego p3.", "evidence": "eReady; started=0.", "strategy": { "id": "task01/a2/structure/medium", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "resource", "number": 5, "label": "all writes occur under ownership", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.handoff", "svg_label": "05", "code_ref": "src/tasks/task01_mutex.c:101", "snapshot_ref": "task01.high-acquires", "description": "High zapisuje 2 po przejęciu mutexu.", "evidence": "protected_value=2.", "strategy": { "id": "task01/a2/structure/resource", "kind": "run", "action": "replay", "expected_observations": [ "High E07 before Medium E08", "value 2 under High ownership" ], "assertions": [ "Low restored to 1", "resource invariant" ], "evidence_fields": [ "order", "priority", "value" ], "prerequisites": [ "Low owns contended mutex" ], "layout": [ "give path", "High", "Medium", "protected value" ], "commands": [ "print g_fc08.protected_value", "print g_fc08_events[6]", "print g_fc08_events[7]" ], "template_id": "run.handoff" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 475.0, "height": 529.0, "full_x": 0.0, "full_y": 0.0, "full_width": 475.0, "full_height": 529.0, "page_width": 660.0, "page_height": 760.0, "overview": true, "step_ids": [ "high", "low", "medium", "mutex", "resource" ] }, "diagram_title": "A2 · struktura mutexu", "diagram_block_label": "A2 STRUCTURE", "diagram_description": "Genuine mutex, owner, waiter, Ready task and guarded resource.", "diagram_phase_labels": [ "MUTEX / OWNER / WAITERS" ] } ], "steps": [], "spread_group": "", "spread_label": "A2 STRUCTURE — ownership i wait list.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "portrait" }, { "id": "section-2-content", "index": 2, "title": "A4 — Application", "show_heading": false, "toc_entry": true, "header_html": "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [], "assets": [ { "label": "fig:a4-application", "logical_label": "fig:a4-application", "figure_number": 2, "caption": "A4 APPLICATION — deterministic creation topology. — część 1/1 (r1 c1)", "alt": "Topologia Low, High, Medium i verifier.", "href": "figures/a4-application.svg", "source_href": "figures/a4-application.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc08-a4-application-tile-1", "title": "A4 · topologia eksperymentu", "task": { "id": "task01", "label": "Task01 · mutex i PIP" }, "block": { "id": "a4", "label": "A4 APPLICATION", "description": "Construction order makes inheritance observable without timing guesses." }, "phases": [ { "id": "topology", "label": "CREATE / BLOCK / VERIFY", "steps": [ { "id": "main", "number": 1, "label": "main creates only Low and verifier", "mode": "CODE", "strategy_ref": "code.contract", "svg_label": "01", "code_ref": "src/tasks/task01_mutex.c:233", "description": "High nie może przejąć wolnego mutexu przed Low.", "evidence": "fixed topology.", "strategy": { "id": "task01/a4/topology/main", "kind": "code", "action": "open", "expected_observations": [ "genuine mutex API", "brak vTaskPrioritySet" ], "assertions": [ "one mutex", "fixed p1/p2/p3" ], "evidence_fields": [ "code_ref", "API", "priority" ], "prerequisites": [ "źródło FC08" ], "layout": [ "FreeRTOSConfig", "MutexExperiment", "task priorities" ], "commands": [ "rg -n 'configUSE_MUTEXES|xSemaphore|uxTaskPriorityGet' include src" ], "template_id": "code.contract" } }, { "id": "low", "number": 2, "label": "Low creates High while owning", "mode": "RUN", "event_id": "E02", "strategy_ref": "run.inheritance", "svg_label": "02", "code_ref": "src/tasks/task01_mutex.c:149", "snapshot_ref": "task01.low-owns", "description": "High natychmiast preemptuje i blokuje się.", "evidence": "next event E03.", "strategy": { "id": "task01/a4/topology/low", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "high", "number": 3, "label": "High creates contention", "mode": "RUN", "event_id": "E03", "strategy_ref": "run.inheritance", "svg_label": "03", "code_ref": "src/tasks/task01_mutex.c:96", "snapshot_ref": "task01.high-blocks", "description": "Nie ma sztucznej zmiany priorytetu.", "evidence": "real mutex wait.", "strategy": { "id": "task01/a4/topology/high", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "inherited", "number": 4, "label": "Low continues at effective p3", "mode": "RUN", "event_id": "E04", "strategy_ref": "run.inheritance", "svg_label": "04", "code_ref": "src/tasks/task01_mutex.c:152", "snapshot_ref": "task01.inherited", "description": "Public API zwraca 3.", "evidence": "holder remains Low.", "strategy": { "id": "task01/a4/topology/inherited", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "medium", "number": 5, "label": "Medium is the inversion probe", "mode": "RUN", "event_id": "E05", "strategy_ref": "run.inheritance", "svg_label": "05", "code_ref": "src/tasks/task01_mutex.c:162", "snapshot_ref": "task01.medium-ready", "description": "Ready p2 nie wykonuje nawet pierwszej instrukcji.", "evidence": "started=0.", "strategy": { "id": "task01/a4/topology/medium", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "verifier", "number": 6, "label": "lowest verifier asserts relations", "mode": "RUN", "event_id": "E10", "strategy_ref": "run.pass", "svg_label": "06", "code_ref": "src/tasks/task01_mutex.c:207", "snapshot_ref": "task01.pass", "description": "Sprawdzenie nie zakłóca workerów.", "evidence": "PASS and digest.", "strategy": { "id": "task01/a4/topology/verifier", "kind": "run", "action": "replay", "expected_observations": [ "PASS=1", "10 committed records" ], "assertions": [ "stable three-run digest", "verifier priority 0" ], "evidence_fields": [ "PASS", "digest", "source blob", "ELF hash", "timestamp" ], "prerequisites": [ "three workers finished" ], "layout": [ "bounded log", "PASS", "digest" ], "commands": [ "print g_fc08_pass", "print g_fc08.evidence_digest" ], "template_id": "run.pass" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 311.0, "height": 706.0, "full_x": 0.0, "full_y": 0.0, "full_width": 311.0, "full_height": 706.0, "page_width": 660.0, "page_height": 760.0, "overview": true, "step_ids": [ "high", "inherited", "low", "main", "medium", "verifier" ] }, "diagram_title": "A4 · topologia eksperymentu", "diagram_block_label": "A4 APPLICATION", "diagram_description": "Construction order makes inheritance observable without timing guesses.", "diagram_phase_labels": [ "CREATE / BLOCK / VERIFY" ] } ], "steps": [], "spread_group": "", "spread_label": "A4 APPLICATION — deterministic creation topology.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "portrait" }, { "id": "section-3-content", "index": 3, "title": "A5 — Flow", "show_heading": false, "toc_entry": true, "header_html": "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [], "assets": [ { "label": "fig:a5-flow", "logical_label": "fig:a5-flow", "figure_number": 3, "caption": "A5 FLOW — bounded priority inversion. — część 1/1 (r1 c1)", "alt": "Sekwencja dziedziczenia priorytetu.", "href": "figures/a5-flow.svg", "source_href": "figures/a5-flow.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-sequence", "storage_key": "fc08-a5-flow-tile-1", "title": "A5 · priority inheritance flow", "task": { "id": "task01", "label": "Task01 · mutex i PIP" }, "block": { "id": "a5", "label": "A5 FLOW", "description": "One complete E01–E10 run." }, "phases": [ { "id": "flow", "label": "OWN / INHERIT / HANDOFF / RESTORE", "steps": [ { "id": "config", "number": 1, "label": "configuration committed", "mode": "RUN", "event_id": "E01", "strategy_ref": "run.inheritance", "svg_label": "01", "code_ref": "src/tasks/task01_mutex.c:236", "snapshot_ref": "task01.config", "description": "Clean RAM and fixed priorities.", "evidence": "one record.", "strategy": { "id": "task01/a5/flow/config", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "own", "number": 2, "label": "Low takes mutex", "mode": "RUN", "event_id": "E02", "strategy_ref": "run.inheritance", "svg_label": "02", "code_ref": "src/tasks/task01_mutex.c:142", "snapshot_ref": "task01.low-owns", "description": "Low becomes owner.", "evidence": "value=1.", "strategy": { "id": "task01/a5/flow/own", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "block", "number": 3, "label": "High blocks", "mode": "RUN", "event_id": "E03", "strategy_ref": "run.inheritance", "svg_label": "03", "code_ref": "src/tasks/task01_mutex.c:97", "snapshot_ref": "task01.high-blocks", "description": "Non-zero wait creates contention.", "evidence": "High stack.", "strategy": { "id": "task01/a5/flow/block", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "inherit", "number": 4, "label": "Low inherits p3", "mode": "RUN", "event_id": "E04", "strategy_ref": "run.inheritance", "svg_label": "04", "code_ref": "src/tasks/task01_mutex.c:152", "snapshot_ref": "task01.inherited", "description": "Kernel PIP, not application code.", "evidence": "priority=3.", "strategy": { "id": "task01/a5/flow/inherit", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "ready", "number": 5, "label": "Medium Ready but not run", "mode": "RUN", "event_id": "E05", "strategy_ref": "run.inheritance", "svg_label": "05", "code_ref": "src/tasks/task01_mutex.c:162", "snapshot_ref": "task01.medium-ready", "description": "Bounded inversion proof.", "evidence": "eReady and zero flag.", "strategy": { "id": "task01/a5/flow/ready", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "give", "number": 6, "label": "Low begins give", "mode": "RUN", "event_id": "E06", "strategy_ref": "run.handoff", "svg_label": "06", "code_ref": "src/tasks/task01_mutex.c:169", "snapshot_ref": "task01.release", "description": "High may preempt inside API.", "evidence": "value still 1.", "strategy": { "id": "task01/a5/flow/give", "kind": "run", "action": "replay", "expected_observations": [ "High E07 before Medium E08", "value 2 under High ownership" ], "assertions": [ "Low restored to 1", "resource invariant" ], "evidence_fields": [ "order", "priority", "value" ], "prerequisites": [ "Low owns contended mutex" ], "layout": [ "give path", "High", "Medium", "protected value" ], "commands": [ "print g_fc08.protected_value", "print g_fc08_events[6]", "print g_fc08_events[7]" ], "template_id": "run.handoff" } }, { "id": "high", "number": 7, "label": "High acquires first", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.handoff", "svg_label": "07", "code_ref": "src/tasks/task01_mutex.c:101", "snapshot_ref": "task01.high-acquires", "description": "Ownership transfers to top waiter.", "evidence": "value=2.", "strategy": { "id": "task01/a5/flow/high", "kind": "run", "action": "replay", "expected_observations": [ "High E07 before Medium E08", "value 2 under High ownership" ], "assertions": [ "Low restored to 1", "resource invariant" ], "evidence_fields": [ "order", "priority", "value" ], "prerequisites": [ "Low owns contended mutex" ], "layout": [ "give path", "High", "Medium", "protected value" ], "commands": [ "print g_fc08.protected_value", "print g_fc08_events[6]", "print g_fc08_events[7]" ], "template_id": "run.handoff" } }, { "id": "medium", "number": 8, "label": "Medium runs after High", "mode": "RUN", "event_id": "E08", "strategy_ref": "run.handoff", "svg_label": "08", "code_ref": "src/tasks/task01_mutex.c:123", "snapshot_ref": "task01.medium-runs", "description": "No priority inversion remains.", "evidence": "E07 before E08.", "strategy": { "id": "task01/a5/flow/medium", "kind": "run", "action": "replay", "expected_observations": [ "High E07 before Medium E08", "value 2 under High ownership" ], "assertions": [ "Low restored to 1", "resource invariant" ], "evidence_fields": [ "order", "priority", "value" ], "prerequisites": [ "Low owns contended mutex" ], "layout": [ "give path", "High", "Medium", "protected value" ], "commands": [ "print g_fc08.protected_value", "print g_fc08_events[6]", "print g_fc08_events[7]" ], "template_id": "run.handoff" } }, { "id": "restore", "number": 9, "label": "Low returns to base p1", "mode": "RUN", "event_id": "E09", "strategy_ref": "run.handoff", "svg_label": "09", "code_ref": "src/tasks/task01_mutex.c:175", "snapshot_ref": "task01.restored", "description": "Disinherit after give.", "evidence": "priority=1.", "strategy": { "id": "task01/a5/flow/restore", "kind": "run", "action": "replay", "expected_observations": [ "High E07 before Medium E08", "value 2 under High ownership" ], "assertions": [ "Low restored to 1", "resource invariant" ], "evidence_fields": [ "order", "priority", "value" ], "prerequisites": [ "Low owns contended mutex" ], "layout": [ "give path", "High", "Medium", "protected value" ], "commands": [ "print g_fc08.protected_value", "print g_fc08_events[6]", "print g_fc08_events[7]" ], "template_id": "run.handoff" } }, { "id": "pass", "number": 10, "label": "verifier commits PASS", "mode": "RUN", "event_id": "E10", "strategy_ref": "run.pass", "svg_label": "10", "code_ref": "src/tasks/task01_mutex.c:207", "snapshot_ref": "task01.pass", "description": "All relational assertions hold.", "evidence": "digest 5433b784.", "strategy": { "id": "task01/a5/flow/pass", "kind": "run", "action": "replay", "expected_observations": [ "PASS=1", "10 committed records" ], "assertions": [ "stable three-run digest", "verifier priority 0" ], "evidence_fields": [ "PASS", "digest", "source blob", "ELF hash", "timestamp" ], "prerequisites": [ "three workers finished" ], "layout": [ "bounded log", "PASS", "digest" ], "commands": [ "print g_fc08_pass", "print g_fc08.evidence_digest" ], "template_id": "run.pass" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 606.0, "height": 541.0, "full_x": 0.0, "full_y": 0.0, "full_width": 606.0, "full_height": 541.0, "page_width": 660.0, "page_height": 760.0, "overview": true, "step_ids": [ "block", "config", "give", "high", "inherit", "medium", "own", "pass", "ready", "restore" ] }, "diagram_title": "A5 · priority inheritance flow", "diagram_block_label": "A5 FLOW", "diagram_description": "One complete E01–E10 run.", "diagram_phase_labels": [ "OWN / INHERIT / HANDOFF / RESTORE" ] } ], "steps": [], "spread_group": "", "spread_label": "A5 FLOW — bounded priority inversion.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "portrait" }, { "id": "section-4-content", "index": 4, "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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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
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [], "assets": [ { "label": "fig:a6-state", "logical_label": "fig:a6-state", "figure_number": 4, "caption": "A6 STATE — free, owned, contended, transferred. — część 1/1 (r1 c1)", "alt": "Maszyna stanu mutexu.", "href": "figures/a6-state.svg", "source_href": "figures/a6-state.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc08-a6-state-tile-1", "title": "A6 · owner and priority state", "task": { "id": "task01", "label": "Task01 · mutex i PIP" }, "block": { "id": "a6", "label": "A6 STATE", "description": "Mutex ownership and effective-priority states." }, "phases": [ { "id": "state", "label": "FREE / OWNED / CONTENDED / TRANSFERRED", "steps": [ { "id": "free", "number": 1, "label": "mutex starts free", "mode": "RUN", "event_id": "E01", "strategy_ref": "run.inheritance", "svg_label": "01", "code_ref": "src/tasks/task01_mutex.c:237", "snapshot_ref": "task01.config", "description": "No owner.", "evidence": "handle created after E01.", "strategy": { "id": "task01/a6/state/free", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "owned", "number": 2, "label": "Low owns at p1", "mode": "RUN", "event_id": "E02", "strategy_ref": "run.inheritance", "svg_label": "02", "code_ref": "src/tasks/task01_mutex.c:142", "snapshot_ref": "task01.low-owns", "description": "Uncontended state.", "evidence": "protected value 1.", "strategy": { "id": "task01/a6/state/owned", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "contended", "number": 3, "label": "High waits; Low effective p3", "mode": "RUN", "event_id": "E04", "strategy_ref": "run.inheritance", "svg_label": "03", "code_ref": "src/tasks/task01_mutex.c:152", "snapshot_ref": "task01.inherited", "description": "Owner stays Low.", "evidence": "priority 3, holder Low.", "strategy": { "id": "task01/a6/state/contended", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "transfer", "number": 6, "label": "give transfers to High", "mode": "RUN", "event_id": "E07", "strategy_ref": "run.handoff", "svg_label": "06", "code_ref": "src/tasks/task01_mutex.c:103", "snapshot_ref": "task01.high-acquires", "description": "High returns from take.", "evidence": "value 2.", "strategy": { "id": "task01/a6/state/transfer", "kind": "run", "action": "replay", "expected_observations": [ "High E07 before Medium E08", "value 2 under High ownership" ], "assertions": [ "Low restored to 1", "resource invariant" ], "evidence_fields": [ "order", "priority", "value" ], "prerequisites": [ "Low owns contended mutex" ], "layout": [ "give path", "High", "Medium", "protected value" ], "commands": [ "print g_fc08.protected_value", "print g_fc08_events[6]", "print g_fc08_events[7]" ], "template_id": "run.handoff" } }, { "id": "verified", "number": 9, "label": "Low is restored", "mode": "RUN", "event_id": "E09", "strategy_ref": "run.handoff", "svg_label": "09", "code_ref": "src/tasks/task01_mutex.c:175", "snapshot_ref": "task01.restored", "description": "Effective equals base again.", "evidence": "priority 1.", "strategy": { "id": "task01/a6/state/verified", "kind": "run", "action": "replay", "expected_observations": [ "High E07 before Medium E08", "value 2 under High ownership" ], "assertions": [ "Low restored to 1", "resource invariant" ], "evidence_fields": [ "order", "priority", "value" ], "prerequisites": [ "Low owns contended mutex" ], "layout": [ "give path", "High", "Medium", "protected value" ], "commands": [ "print g_fc08.protected_value", "print g_fc08_events[6]", "print g_fc08_events[7]" ], "template_id": "run.handoff" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 403.0, "height": 605.0, "full_x": 0.0, "full_y": 0.0, "full_width": 403.0, "full_height": 605.0, "page_width": 660.0, "page_height": 760.0, "overview": true, "step_ids": [ "contended", "free", "owned", "transfer", "verified" ] }, "diagram_title": "A6 · owner and priority state", "diagram_block_label": "A6 STATE", "diagram_description": "Mutex ownership and effective-priority states.", "diagram_phase_labels": [ "FREE / OWNED / CONTENDED / TRANSFERRED" ] } ], "steps": [], "spread_group": "", "spread_label": "A6 STATE — free, owned, contended, transferred.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "portrait" }, { "id": "section-5-content", "index": 5, "title": "A7 — Runtime", "show_heading": false, "toc_entry": true, "header_html": "
\n\n\n\n\n\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time", "figure_number": 5, "caption": "A7 RUNTIME — handles, stacks, public states and TCB detail. — część 1/1 (r1 c1)", "alt": "Runtime mutexu i trzech tasków.", "href": "figures/a7-runtime.svg", "source_href": "figures/a7-runtime.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc08-a7-runtime-tile-1", "title": "A7 · runtime evidence", "task": { "id": "task01", "label": "Task01 · mutex i PIP" }, "block": { "id": "a7", "label": "A7 RUNTIME", "description": "Public acceptance evidence plus optional TCB inspection." }, "phases": [ { "id": "runtime", "label": "HANDLES / STACKS / TCB / LOG", "steps": [ { "id": "experiment", "number": 1, "label": "experiment owns bounded evidence", "mode": "CODE", "strategy_ref": "code.contract", "svg_label": "01", "code_ref": "include/task01_mutex.h:26", "description": "Persistent static context.", "evidence": "handles and observations.", "strategy": { "id": "task01/a7/runtime/experiment", "kind": "code", "action": "open", "expected_observations": [ "genuine mutex API", "brak vTaskPrioritySet" ], "assertions": [ "one mutex", "fixed p1/p2/p3" ], "evidence_fields": [ "code_ref", "API", "priority" ], "prerequisites": [ "źródło FC08" ], "layout": [ "FreeRTOSConfig", "MutexExperiment", "task priorities" ], "commands": [ "rg -n 'configUSE_MUTEXES|xSemaphore|uxTaskPriorityGet' include src" ], "template_id": "code.contract" } }, { "id": "low", "number": 2, "label": "Low handle remains forensic identity", "mode": "RUN", "event_id": "E04", "strategy_ref": "run.inheritance", "svg_label": "02", "code_ref": "src/tasks/task01_mutex.c:153", "snapshot_ref": "task01.inherited", "description": "Holder compares to saved handle.", "evidence": "SP and priority.", "strategy": { "id": "task01/a7/runtime/low", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "high", "number": 3, "label": "High owns distinct stack", "mode": "RUN", "event_id": "E03", "strategy_ref": "run.inheritance", "svg_label": "03", "code_ref": "src/tasks/task01_mutex.c:95", "snapshot_ref": "task01.high-blocks", "description": "Blocked task preserves context.", "evidence": "high_sp.", "strategy": { "id": "task01/a7/runtime/high", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "medium", "number": 4, "label": "Medium state is public eReady", "mode": "RUN", "event_id": "E05", "strategy_ref": "run.inheritance", "svg_label": "04", "code_ref": "src/tasks/task01_mutex.c:162", "snapshot_ref": "task01.medium-ready", "description": "No private TCB dependency.", "evidence": "eTaskGetState.", "strategy": { "id": "task01/a7/runtime/medium", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "tcb", "number": 5, "label": "TCB base/effective is debugger evidence", "mode": "RUN", "event_id": "E04", "strategy_ref": "run.inheritance", "svg_label": "05", "code_ref": "vendor/FreeRTOS-Kernel/tasks.c:1000", "snapshot_ref": "task01.inherited", "description": "Inspect uxBasePriority and uxPriority only in GDB.", "evidence": "1 and 3.", "strategy": { "id": "task01/a7/runtime/tcb", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "log", "number": 6, "label": "record commits marker last", "mode": "CODE", "strategy_ref": "code.contract", "svg_label": "06", "code_ref": "src/tasks/task01_mutex.c:55", "description": "Partial record cannot masquerade as evidence.", "evidence": "committed after payload.", "strategy": { "id": "task01/a7/runtime/log", "kind": "code", "action": "open", "expected_observations": [ "genuine mutex API", "brak vTaskPrioritySet" ], "assertions": [ "one mutex", "fixed p1/p2/p3" ], "evidence_fields": [ "code_ref", "API", "priority" ], "prerequisites": [ "źródło FC08" ], "layout": [ "FreeRTOSConfig", "MutexExperiment", "task priorities" ], "commands": [ "rg -n 'configUSE_MUTEXES|xSemaphore|uxTaskPriorityGet' include src" ], "template_id": "code.contract" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 539.0, "height": 378.0, "full_x": 0.0, "full_y": 0.0, "full_width": 539.0, "full_height": 378.0, "page_width": 660.0, "page_height": 760.0, "overview": true, "step_ids": [ "experiment", "high", "log", "low", "medium", "tcb" ] }, "diagram_title": "A7 · runtime evidence", "diagram_block_label": "A7 RUNTIME", "diagram_description": "Public acceptance evidence plus optional TCB inspection.", "diagram_phase_labels": [ "HANDLES / STACKS / TCB / LOG" ] } ], "steps": [], "spread_group": "", "spread_label": "A7 RUNTIME — handles, stacks, public states and TCB detail.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "portrait" }, { "id": "section-6-content", "index": 6, "title": "A8 — Patterns", "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\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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:a8-patterns", "logical_label": "fig:a8-patterns", "figure_number": 6, "caption": "A8 PATTERNS — four distinct synchronization contracts. — część 1/1 (r1 c1)", "alt": "Porównanie czterech wzorców ochrony zasobu.", "href": "figures/a8-patterns.svg", "source_href": "figures/a8-patterns.puml", "width": 1.0, "kind": "diagram", "interactive": { "kind": "uml-class", "storage_key": "fc08-a8-patterns-tile-1", "title": "A8 · resource-management choices", "task": { "id": "task01", "label": "Task01 · mutex i PIP" }, "block": { "id": "a8", "label": "A8 PATTERNS", "description": "Select synchronization by contract, not by similar syntax." }, "phases": [ { "id": "patterns", "label": "CRITICAL / SUSPEND / MUTEX / GATEKEEPER", "steps": [ { "id": "critical", "number": 1, "label": "critical section is bounded and nonblocking", "mode": "CODE", "strategy_ref": "code.contract", "svg_label": "01", "code_ref": "src/tasks/task01_mutex.c:48", "description": "Protects evidence commit only.", "evidence": "short interrupt mask.", "strategy": { "id": "task01/a8/patterns/critical", "kind": "code", "action": "open", "expected_observations": [ "genuine mutex API", "brak vTaskPrioritySet" ], "assertions": [ "one mutex", "fixed p1/p2/p3" ], "evidence_fields": [ "code_ref", "API", "priority" ], "prerequisites": [ "źródło FC08" ], "layout": [ "FreeRTOSConfig", "MutexExperiment", "task priorities" ], "commands": [ "rg -n 'configUSE_MUTEXES|xSemaphore|uxTaskPriorityGet' include src" ], "template_id": "code.contract" } }, { "id": "suspend", "number": 2, "label": "scheduler suspension is not a lock", "mode": "CODE", "strategy_ref": "code.contract", "svg_label": "02", "code_ref": "doc/card-plan.md:1", "description": "Interrupts continue and ownership is absent.", "evidence": "not selected.", "strategy": { "id": "task01/a8/patterns/suspend", "kind": "code", "action": "open", "expected_observations": [ "genuine mutex API", "brak vTaskPrioritySet" ], "assertions": [ "one mutex", "fixed p1/p2/p3" ], "evidence_fields": [ "code_ref", "API", "priority" ], "prerequisites": [ "źródło FC08" ], "layout": [ "FreeRTOSConfig", "MutexExperiment", "task priorities" ], "commands": [ "rg -n 'configUSE_MUTEXES|xSemaphore|uxTaskPriorityGet' include src" ], "template_id": "code.contract" } }, { "id": "mutex", "number": 3, "label": "mutex owns and inherits", "mode": "RUN", "event_id": "E04", "strategy_ref": "run.inheritance", "svg_label": "03", "code_ref": "src/tasks/task01_mutex.c:152", "snapshot_ref": "task01.inherited", "description": "Selected FC08 contract.", "evidence": "holder Low, effective 3.", "strategy": { "id": "task01/a8/patterns/mutex", "kind": "run", "action": "replay", "expected_observations": [ "Low effective=3", "Medium Ready and not started" ], "assertions": [ "holder=Low", "High uses portMAX_DELAY" ], "evidence_fields": [ "event", "holder", "priority", "state", "PC", "SP", "timestamp" ], "prerequisites": [ "Hazard3 online", "czysta RAM" ], "layout": [ "Low/High/Medium", "mutex holder", "task states", "event log" ], "commands": [ "print g_fc08", "print g_fc08_events" ], "template_id": "run.inheritance" } }, { "id": "gatekeeper", "number": 4, "label": "gatekeeper serializes by message", "mode": "CODE", "strategy_ref": "code.contract", "svg_label": "04", "code_ref": "doc/card-plan.md:1", "description": "Useful when only one task may touch device API.", "evidence": "extension decision.", "strategy": { "id": "task01/a8/patterns/gatekeeper", "kind": "code", "action": "open", "expected_observations": [ "genuine mutex API", "brak vTaskPrioritySet" ], "assertions": [ "one mutex", "fixed p1/p2/p3" ], "evidence_fields": [ "code_ref", "API", "priority" ], "prerequisites": [ "źródło FC08" ], "layout": [ "FreeRTOSConfig", "MutexExperiment", "task priorities" ], "commands": [ "rg -n 'configUSE_MUTEXES|xSemaphore|uxTaskPriorityGet' include src" ], "template_id": "code.contract" } } ] } ] }, "tile": { "index": 1, "count": 1, "row": 1, "column": 1, "rows": 1, "columns": 1, "x": 0.0, "y": 0.0, "width": 812.0, "height": 208.0, "full_x": 0.0, "full_y": 0.0, "full_width": 812.0, "full_height": 208.0, "page_width": 940.0, "page_height": 560.0, "overview": true, "step_ids": [ "critical", "gatekeeper", "mutex", "suspend" ] }, "diagram_title": "A8 · resource-management choices", "diagram_block_label": "A8 PATTERNS", "diagram_description": "Select synchronization by contract, not by similar syntax.", "diagram_phase_labels": [ "CRITICAL / SUSPEND / MUTEX / GATEKEEPER" ] } ], "steps": [], "spread_group": "", "spread_label": "A8 PATTERNS — four distinct synchronization contracts.", "spread_columns": 1, "spread_index": 1, "spread_count": 1, "page_orientation": "landscape" }, { "id": "section-7-task01", "index": 7, "title": "Task01 — mutex i PIP", "show_heading": true, "toc_entry": true, "header_html": "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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
", "left_margin_html": "
TECH
-
", "right_margin_html": "
OG
-
", "content_html": "", "tasks": [ { "ref": "task01", "title": "Low/Medium/High: ownership i dziedziczenie priorytetu", "uuid": "2392f81a-ed6c-510b-86b5-06c5e2f1c6aa", "criterion": "PASS; Low 1→3→1; Medium eReady i started=0 podczas dziedziczenia; High E07 przed Medium E08; digest jest deterministyczny.", "conclusion_html": "

Mutex rozwiązuje bounded priority inversion przez tymczasowe podniesienie efektywnego priorytetu właściciela. Give może uruchomić High wewnątrz API, zanim kod Low wykona następną instrukcję.

", "prompt_html": "

Przejdź po A2, A4, A5, A6, A7 i A8. Odtwórz E01–E10 i udowodnij, że task średni nie wyprzedza właściciela z odziedziczonym p3.

", "flow": [ { "id": "predict", "kind": "block", "title": "A — kontrakt i przewidywanie", "content_html": "

Rozpisz owner, wait list i priorytety p1/p2/p3.

", "steps": [ { "id": "order", "title": "Przewidź E03–E08.", "content_html": "

Wskaż, kiedy Medium może wykonać pierwszą instrukcję.

" }, { "id": "api", "title": "Odrzuć fałszywe zamienniki.", "content_html": "

Wyjaśnij, dlaczego semafor binarny i vTaskPrioritySet nie dowodzą PIP.

" } ] }, { "id": "replay", "kind": "block", "title": "B — replay Hazard3", "content_html": "

Każdy RUN zaczyna się od czystej RAM.

", "steps": [ { "id": "inherit", "title": "Zbadaj E02–E05.", "content_html": "

Porównaj holder, priority, eReady i started.

" }, { "id": "handoff", "title": "Zbadaj E06–E09.", "content_html": "

Sprawdź High-before-Medium i przywrócenie p1.

" }, { "id": "pass", "title": "Zbadaj E10.", "content_html": "

Zapisz PASS, trzy SP i digest.

" } ] }, { "id": "lock-order", "kind": "exercise", "title": "Ćwiczenie — dwie blokady", "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": "Granice systemu", "status": "unavailable", "reason": "Granica aplikacja–kernel–Hazard3 jest utrwalona w FC07.", "target_id": "" }, { "id": "A2", "label": "STRUCTURE", "subtitle": "Mutex, owner, wait list i zasób", "status": "enabled", "target_label": "fig:a2-structure", "target_id": "fig-a2-structure" }, { "id": "A3", "label": "DISPATCH", "subtitle": "Binding", "status": "unavailable", "reason": "FC08 nie wprowadza callbacku ani granicy ISR.", "target_id": "" }, { "id": "A4", "label": "APPLICATION", "subtitle": "Low, Medium, High i verifier", "status": "enabled", "target_label": "fig:a4-application", "target_id": "fig-a4-application" }, { "id": "A5", "label": "FLOW", "subtitle": "E01–E10 i handoff mutexu", "status": "enabled", "target_label": "fig:a5-flow", "target_id": "fig-a5-flow" }, { "id": "A6", "label": "STATE", "subtitle": "Owner, waiter i effective priority", "status": "enabled", "target_label": "fig:a6-state", "target_id": "fig-a6-state" }, { "id": "A7", "label": "RUNTIME", "subtitle": "Handle, TCB, stos i event log", "status": "enabled", "target_label": "fig:a7-runtime", "target_id": "fig-a7-runtime" }, { "id": "A8", "label": "PATTERNS", "subtitle": "Critical, suspend, mutex, gatekeeper", "status": "enabled", "target_label": "fig:a8-patterns", "target_id": "fig-a8-patterns" } ], "has_spread": false, "has_allocator_model": false, "dictionary": null, "toc": [ { "id": "section-1-content", "label": "1. A2 — Structure" }, { "id": "section-2-content", "label": "2. A4 — Application" }, { "id": "section-3-content", "label": "3. A5 — Flow" }, { "id": "section-4-content", "label": "4. A6 — State" }, { "id": "section-5-content", "label": "5. A7 — Runtime" }, { "id": "section-6-content", "label": "6. A8 — Patterns" }, { "id": "section-7-task01", "label": "7. Task01 — mutex i PIP" } ] }