meta: add interactive draft URL
This commit is contained in:
+261
-40
@@ -1,63 +1,284 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../../../tools/card-layouts/schemas/card-source.schema.json", "schema": "esc-card-source.v1",
|
"$schema": "../../../tools/card-layouts/schemas/card-source.schema.json",
|
||||||
|
"schema": "esc-card-source.v1",
|
||||||
"card": {
|
"card": {
|
||||||
"id": "mpabi-freertos-cpp-11-mutex", "series": "freertos-cpp", "series_title": "FreeRTOS C++", "number": "11", "count": "16", "slug": "mutex",
|
"id": "mpabi-freertos-cpp-11-mutex",
|
||||||
"title": "Mutex, LockGuard and Priority Inheritance", "topic": "Ownership, scoped unlock and measured priority inheritance", "project": "Freestanding C++ nad FreeRTOS", "subject": "Informatyka",
|
"series": "freertos-cpp",
|
||||||
"level": "Rok 2 · L10 · RV32I/Hazard3", "revision_date": "2026-07-19T00:00:00+02:00", "status": "Gotowa", "version": "v00.01",
|
"series_title": "FreeRTOS C++",
|
||||||
"uuid": "34d7ad61-6b03-4922-8e58-b8b98316e5f7", "author": "M. Pabiszczak", "year": "2026"
|
"number": "11",
|
||||||
|
"count": "16",
|
||||||
|
"slug": "mutex",
|
||||||
|
"title": "Mutex, LockGuard and Priority Inheritance",
|
||||||
|
"topic": "Ownership, scoped unlock and measured priority inheritance",
|
||||||
|
"project": "Freestanding C++ nad FreeRTOS",
|
||||||
|
"subject": "Informatyka",
|
||||||
|
"level": "Rok 2 · L10 · RV32I/Hazard3",
|
||||||
|
"revision_date": "2026-07-19T00:00:00+02:00",
|
||||||
|
"status": "Gotowa",
|
||||||
|
"version": "v00.01",
|
||||||
|
"uuid": "34d7ad61-6b03-4922-8e58-b8b98316e5f7",
|
||||||
|
"author": "M. Pabiszczak",
|
||||||
|
"year": "2026"
|
||||||
|
},
|
||||||
|
"generated": {
|
||||||
|
"tex": "doc/generated/main.tex",
|
||||||
|
"html": "web/index.html",
|
||||||
|
"html_css": "web/style.css",
|
||||||
|
"html_tree_inspector": false,
|
||||||
|
"react_app": true
|
||||||
},
|
},
|
||||||
"generated": {"tex": "doc/generated/main.tex", "html": "web/index.html", "html_css": "web/style.css", "html_tree_inspector": false, "react_app": true},
|
|
||||||
"template": "templates/karta-klasyczna.json",
|
"template": "templates/karta-klasyczna.json",
|
||||||
"title_block": {
|
"title_block": {
|
||||||
"category": "KARTA PRACY · INFORMATYKA", "prepared_by": "M. Pabiszczak", "prepared_on": "2026-07-19T00:00:00+02:00",
|
"category": "KARTA PRACY · INFORMATYKA",
|
||||||
"title": "Mutex, LockGuard and Priority Inheritance", "repository_url": "https://zsl-gitea.mpabi.pl/edu-freertos-cpp/lab-rv32i-freertos-mutex",
|
"prepared_by": "M. Pabiszczak",
|
||||||
"revision": "v00.01", "issued_on": "2026-07-19T00:00:00+02:00", "series": "FREERTOS-CPP-11", "document_type": "karta pracy", "tool": "card-layouts",
|
"prepared_on": "2026-07-19T00:00:00+02:00",
|
||||||
"show_qr": false, "show_repository_qr": false, "height_cm": 2.6, "repeat_on_every_page": true, "replace_front_matter": true
|
"title": "Mutex, LockGuard and Priority Inheritance",
|
||||||
|
"repository_url": "https://zsl-gitea.mpabi.pl/edu-freertos-cpp/lab-rv32i-freertos-mutex",
|
||||||
|
"revision": "v00.01",
|
||||||
|
"issued_on": "2026-07-19T00:00:00+02:00",
|
||||||
|
"series": "FREERTOS-CPP-11",
|
||||||
|
"document_type": "karta pracy",
|
||||||
|
"tool": "card-layouts",
|
||||||
|
"show_qr": false,
|
||||||
|
"show_repository_qr": false,
|
||||||
|
"height_cm": 2.6,
|
||||||
|
"repeat_on_every_page": true,
|
||||||
|
"replace_front_matter": true,
|
||||||
|
"url": "https://dce7fb9d-7b2f-5d49-96a2-3a30d3070b84.mpabi.pl/34d7ad61-6b03-4922-8e58-b8b98316e5f7"
|
||||||
},
|
},
|
||||||
"front_page_scope": {
|
"front_page_scope": {
|
||||||
"title": "Cel karty", "content_tex": "Uczeń odróżnia mutex od semaphore, balansuje owner-only unlock przez LockGuard i wyjaśnia zmierzoną sekwencję priority inheritance LOW 1-3-1.",
|
"title": "Cel karty",
|
||||||
"scope_title": "Zakres karty", "scope_content_tex": "Ordinary mutex jest task-context, non-recursive i zwalniany przez ownera. Guard nie naprawia deadlocku, ISR use ani zbyt długiej sekcji."
|
"content_tex": "Uczeń odróżnia mutex od semaphore, balansuje owner-only unlock przez LockGuard i wyjaśnia zmierzoną sekwencję priority inheritance LOW 1-3-1.",
|
||||||
|
"scope_title": "Zakres karty",
|
||||||
|
"scope_content_tex": "Ordinary mutex jest task-context, non-recursive i zwalniany przez ownera. Guard nie naprawia deadlocku, ISR use ani zbyt długiej sekcji."
|
||||||
|
},
|
||||||
|
"side_margin_tree_layout": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"id": "zawodowe",
|
||||||
|
"label": "TECH",
|
||||||
|
"side": "left",
|
||||||
|
"tree": "WE -> EK -> KW",
|
||||||
|
"description": "Owner, task state, priorities i event order."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ogolne",
|
||||||
|
"label": "OG",
|
||||||
|
"side": "right",
|
||||||
|
"tree": "WE -> EN -> KW",
|
||||||
|
"description": "RAII, ownership i deadlock boundaries."
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"side_margin_tree_layout": {"columns": [
|
|
||||||
{"id": "zawodowe", "label": "TECH", "side": "left", "tree": "WE -> EK -> KW", "description": "Owner, task state, priorities i event order."},
|
|
||||||
{"id": "ogolne", "label": "OG", "side": "right", "tree": "WE -> EN -> KW", "description": "RAII, ownership i deadlock boundaries."}
|
|
||||||
]},
|
|
||||||
"learning_effects": {
|
"learning_effects": {
|
||||||
"K11.EN01": {"bloom_level": "Analiza", "label": "Mutex ownership", "text": "Uczeń uzasadnia owner-only give, non-recursive ordinary mutex i zakres LockGuard na early returns.", "assessment_criteria": ["K11.KW01"]},
|
"K11.EN01": {
|
||||||
"K11.EK01": {"bloom_level": "Zastosowanie", "label": "Priority inheritance", "text": "Uczeń śledzi LOW, MEDIUM i HIGH przez blokadę, dziedziczenie, handoff i restore.", "assessment_criteria": ["K11.KW01"]}
|
"bloom_level": "Analiza",
|
||||||
|
"label": "Mutex ownership",
|
||||||
|
"text": "Uczeń uzasadnia owner-only give, non-recursive ordinary mutex i zakres LockGuard na early returns.",
|
||||||
|
"assessment_criteria": [
|
||||||
|
"K11.KW01"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"K11.EK01": {
|
||||||
|
"bloom_level": "Zastosowanie",
|
||||||
|
"label": "Priority inheritance",
|
||||||
|
"text": "Uczeń śledzi LOW, MEDIUM i HIGH przez blokadę, dziedziczenie, handoff i restore.",
|
||||||
|
"assessment_criteria": [
|
||||||
|
"K11.KW01"
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"assessment_criteria": {
|
"assessment_criteria": {
|
||||||
"K11.KW01": {"text": "Program kończy się PASS; HIGH jest Blocked, LOW ma 1-3-1, MEDIUM nie biegnie przed release, holder odpowiada LOW/HIGH, event order jest poprawny, a counter wynosi 11.", "learning_effects": ["K11.EN01", "K11.EK01"]}
|
"K11.KW01": {
|
||||||
|
"text": "Program kończy się PASS; HIGH jest Blocked, LOW ma 1-3-1, MEDIUM nie biegnie przed release, holder odpowiada LOW/HIGH, event order jest poprawny, a counter wynosi 11.",
|
||||||
|
"learning_effects": [
|
||||||
|
"K11.EN01",
|
||||||
|
"K11.EK01"
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"educational_requirements": {
|
"educational_requirements": {
|
||||||
"K11.WE01": {
|
"K11.WE01": {
|
||||||
"text": "Bezpieczny scoped mutex z obserwowalnym priority inheritance.", "label": "Mutex i LockGuard", "learning_effects": ["K11.EN01", "K11.EK01"],
|
"text": "Bezpieczny scoped mutex z obserwowalnym priority inheritance.",
|
||||||
|
"label": "Mutex i LockGuard",
|
||||||
|
"learning_effects": [
|
||||||
|
"K11.EN01",
|
||||||
|
"K11.EK01"
|
||||||
|
],
|
||||||
"learning_tree": {
|
"learning_tree": {
|
||||||
"schema": "we-learning-tree.v1", "policy": "Każdy unlock ma ownera i scope, a każda teza o inheritance ma stan taska, priority i event order.",
|
"schema": "we-learning-tree.v1",
|
||||||
"ogolne": [{"effect_ref": "K11.EN01", "display": "EN LOCAL OOP.RAII.04", "source": "LOCAL", "official": "OOP.RAII", "local": "04", "kind": "EN", "tree_id": "K11.WE01.OG.LOCAL.OOP.RAII.04", "text": "Analizuje ownership, scoped release i invalid recursive use.", "kw": [{"criterion_ref": "K11.KW01", "display": "KW LOCAL OOP.RAII.04", "source": "LOCAL", "kind": "KW", "official": "OOP.RAII", "local": "04", "text": "Dowodzi jednego give na każdej ścieżce i właściwych granic API."}]}],
|
"policy": "Każdy unlock ma ownera i scope, a każda teza o inheritance ma stan taska, priority i event order.",
|
||||||
"zawodowe": [{"effect_ref": "K11.EK01", "display": "EK LOCAL RTOS.MUTEX.01", "source": "LOCAL", "official": "RTOS.MUTEX", "local": "01", "kind": "EK", "tree_id": "K11.WE01.TECH.LOCAL.RTOS.MUTEX.01", "text": "Mierzy priority inheritance, owner i harmonogram trzech tasków.", "kw": [{"criterion_ref": "K11.KW01", "display": "KW LOCAL RTOS.MUTEX.01", "source": "LOCAL", "kind": "KW", "official": "RTOS.MUTEX", "local": "01", "text": "Pokazuje HIGH Blocked, LOW 1-3-1, MEDIUM after release i counter 11."}]}]
|
"ogolne": [
|
||||||
|
{
|
||||||
|
"effect_ref": "K11.EN01",
|
||||||
|
"display": "EN LOCAL OOP.RAII.04",
|
||||||
|
"source": "LOCAL",
|
||||||
|
"official": "OOP.RAII",
|
||||||
|
"local": "04",
|
||||||
|
"kind": "EN",
|
||||||
|
"tree_id": "K11.WE01.OG.LOCAL.OOP.RAII.04",
|
||||||
|
"text": "Analizuje ownership, scoped release i invalid recursive use.",
|
||||||
|
"kw": [
|
||||||
|
{
|
||||||
|
"criterion_ref": "K11.KW01",
|
||||||
|
"display": "KW LOCAL OOP.RAII.04",
|
||||||
|
"source": "LOCAL",
|
||||||
|
"kind": "KW",
|
||||||
|
"official": "OOP.RAII",
|
||||||
|
"local": "04",
|
||||||
|
"text": "Dowodzi jednego give na każdej ścieżce i właściwych granic API."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"zawodowe": [
|
||||||
|
{
|
||||||
|
"effect_ref": "K11.EK01",
|
||||||
|
"display": "EK LOCAL RTOS.MUTEX.01",
|
||||||
|
"source": "LOCAL",
|
||||||
|
"official": "RTOS.MUTEX",
|
||||||
|
"local": "01",
|
||||||
|
"kind": "EK",
|
||||||
|
"tree_id": "K11.WE01.TECH.LOCAL.RTOS.MUTEX.01",
|
||||||
|
"text": "Mierzy priority inheritance, owner i harmonogram trzech tasków.",
|
||||||
|
"kw": [
|
||||||
|
{
|
||||||
|
"criterion_ref": "K11.KW01",
|
||||||
|
"display": "KW LOCAL RTOS.MUTEX.01",
|
||||||
|
"source": "LOCAL",
|
||||||
|
"kind": "KW",
|
||||||
|
"official": "RTOS.MUTEX",
|
||||||
|
"local": "01",
|
||||||
|
"text": "Pokazuje HIGH Blocked, LOW 1-3-1, MEDIUM after release i counter 11."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sections": [
|
"sections": [
|
||||||
{"title": "Ownership i LockGuard", "content_kind": "prose", "content_tex": "Porównaj mutex z binary semaphore, sprawdź owner-only give, non-recursive take i trzy early returns guarda.", "educational_requirement_refs": ["K11.WE01"], "learning_effect_refs": ["K11.EN01"], "assessment_criterion_refs": ["K11.KW01"], "area_tree_refs": ["K11.WE01.OG.LOCAL.OOP.RAII.04"], "steps": [
|
{
|
||||||
{"id": "S01", "title": "Udowodnij exactly one unlock na każdej ścieżce.", "tree_refs": ["K11.WE01.OG.LOCAL.OOP.RAII.04"]},
|
"title": "Ownership i LockGuard",
|
||||||
{"id": "S02", "title": "Odrzuć recursive take ordinary mutexa.", "tree_refs": ["K11.WE01.OG.LOCAL.OOP.RAII.04"]}
|
"content_kind": "prose",
|
||||||
]},
|
"content_tex": "Porównaj mutex z binary semaphore, sprawdź owner-only give, non-recursive take i trzy early returns guarda.",
|
||||||
{"title": "LOW, MEDIUM, HIGH", "content_kind": "prose", "content_tex": "LOW bierze mutex, HIGH blokuje się, MEDIUM jest ready, a kernel podnosi LOW z 1 do 3.", "educational_requirement_refs": ["K11.WE01"], "learning_effect_refs": ["K11.EK01"], "assessment_criterion_refs": ["K11.KW01"], "area_tree_refs": ["K11.WE01.TECH.LOCAL.RTOS.MUTEX.01"], "steps": [
|
"educational_requirement_refs": [
|
||||||
{"id": "S03", "title": "Zapisz HIGH=Blocked i holder=LOW.", "tree_refs": ["K11.WE01.TECH.LOCAL.RTOS.MUTEX.01"]},
|
"K11.WE01"
|
||||||
{"id": "S04", "title": "Pokaż LOW current=3 przed MEDIUM.", "tree_refs": ["K11.WE01.TECH.LOCAL.RTOS.MUTEX.01"]}
|
|
||||||
]},
|
|
||||||
{"title": "Handoff i restore", "content_kind": "prose", "content_tex": "Guard LOW zwalnia, HIGH staje się ownerem, potem MEDIUM biegnie, a LOW wraca do priority 1.", "educational_requirement_refs": ["K11.WE01"], "learning_effect_refs": ["K11.EK01"], "assessment_criterion_refs": ["K11.KW01"], "area_tree_refs": ["K11.WE01.TECH.LOCAL.RTOS.MUTEX.01"], "steps": [
|
|
||||||
{"id": "S05", "title": "Potwierdź event order i holder=HIGH.", "tree_refs": ["K11.WE01.TECH.LOCAL.RTOS.MUTEX.01"]},
|
|
||||||
{"id": "S06", "title": "Potwierdź LOW=1 oraz protected counter=11.", "tree_refs": ["K11.WE01.TECH.LOCAL.RTOS.MUTEX.01"]}
|
|
||||||
]}
|
|
||||||
],
|
],
|
||||||
"tasks": {"task01": {
|
"learning_effect_refs": [
|
||||||
"title": "LockGuard i zmierzone priority inheritance", "uuid": "34d7ad61-6b03-4922-8e58-b8b98316e5f7",
|
"K11.EN01"
|
||||||
|
],
|
||||||
|
"assessment_criterion_refs": [
|
||||||
|
"K11.KW01"
|
||||||
|
],
|
||||||
|
"area_tree_refs": [
|
||||||
|
"K11.WE01.OG.LOCAL.OOP.RAII.04"
|
||||||
|
],
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"id": "S01",
|
||||||
|
"title": "Udowodnij exactly one unlock na każdej ścieżce.",
|
||||||
|
"tree_refs": [
|
||||||
|
"K11.WE01.OG.LOCAL.OOP.RAII.04"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "S02",
|
||||||
|
"title": "Odrzuć recursive take ordinary mutexa.",
|
||||||
|
"tree_refs": [
|
||||||
|
"K11.WE01.OG.LOCAL.OOP.RAII.04"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "LOW, MEDIUM, HIGH",
|
||||||
|
"content_kind": "prose",
|
||||||
|
"content_tex": "LOW bierze mutex, HIGH blokuje się, MEDIUM jest ready, a kernel podnosi LOW z 1 do 3.",
|
||||||
|
"educational_requirement_refs": [
|
||||||
|
"K11.WE01"
|
||||||
|
],
|
||||||
|
"learning_effect_refs": [
|
||||||
|
"K11.EK01"
|
||||||
|
],
|
||||||
|
"assessment_criterion_refs": [
|
||||||
|
"K11.KW01"
|
||||||
|
],
|
||||||
|
"area_tree_refs": [
|
||||||
|
"K11.WE01.TECH.LOCAL.RTOS.MUTEX.01"
|
||||||
|
],
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"id": "S03",
|
||||||
|
"title": "Zapisz HIGH=Blocked i holder=LOW.",
|
||||||
|
"tree_refs": [
|
||||||
|
"K11.WE01.TECH.LOCAL.RTOS.MUTEX.01"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "S04",
|
||||||
|
"title": "Pokaż LOW current=3 przed MEDIUM.",
|
||||||
|
"tree_refs": [
|
||||||
|
"K11.WE01.TECH.LOCAL.RTOS.MUTEX.01"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Handoff i restore",
|
||||||
|
"content_kind": "prose",
|
||||||
|
"content_tex": "Guard LOW zwalnia, HIGH staje się ownerem, potem MEDIUM biegnie, a LOW wraca do priority 1.",
|
||||||
|
"educational_requirement_refs": [
|
||||||
|
"K11.WE01"
|
||||||
|
],
|
||||||
|
"learning_effect_refs": [
|
||||||
|
"K11.EK01"
|
||||||
|
],
|
||||||
|
"assessment_criterion_refs": [
|
||||||
|
"K11.KW01"
|
||||||
|
],
|
||||||
|
"area_tree_refs": [
|
||||||
|
"K11.WE01.TECH.LOCAL.RTOS.MUTEX.01"
|
||||||
|
],
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"id": "S05",
|
||||||
|
"title": "Potwierdź event order i holder=HIGH.",
|
||||||
|
"tree_refs": [
|
||||||
|
"K11.WE01.TECH.LOCAL.RTOS.MUTEX.01"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "S06",
|
||||||
|
"title": "Potwierdź LOW=1 oraz protected counter=11.",
|
||||||
|
"tree_refs": [
|
||||||
|
"K11.WE01.TECH.LOCAL.RTOS.MUTEX.01"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tasks": {
|
||||||
|
"task01": {
|
||||||
|
"title": "LockGuard i zmierzone priority inheritance",
|
||||||
|
"uuid": "34d7ad61-6b03-4922-8e58-b8b98316e5f7",
|
||||||
"prompt_tex": "Uruchom LOW/MEDIUM/HIGH, udowodnij owner, HIGH Blocked, LOW 1-3-1, handoff i restore oraz sprawdź LockGuard na early returns.",
|
"prompt_tex": "Uruchom LOW/MEDIUM/HIGH, udowodnij owner, HIGH Blocked, LOW 1-3-1, handoff i restore oraz sprawdź LockGuard na early returns.",
|
||||||
"criterion": "Owner correct; HIGH Blocked; LOW 1-3-1; MEDIUM after release; event order; counter 11; recursive take fails; pass=1.",
|
"criterion": "Owner correct; HIGH Blocked; LOW 1-3-1; MEDIUM after release; event order; counter 11; recursive take fails; pass=1.",
|
||||||
"educational_requirement_refs": ["K11.WE01"], "learning_effect_refs": ["K11.EN01", "K11.EK01"], "assessment_criterion_ref": "K11.KW01", "links": {"equations": [], "figures": []}
|
"educational_requirement_refs": [
|
||||||
}},
|
"K11.WE01"
|
||||||
"tasks_order": ["task01"]
|
],
|
||||||
|
"learning_effect_refs": [
|
||||||
|
"K11.EN01",
|
||||||
|
"K11.EK01"
|
||||||
|
],
|
||||||
|
"assessment_criterion_ref": "K11.KW01",
|
||||||
|
"links": {
|
||||||
|
"equations": [],
|
||||||
|
"figures": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tasks_order": [
|
||||||
|
"task01"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user