Fix approach used for making PDs passive at run-time
Assessment
This issue has not been assessed yet.
Description
The approach of using seL4_NBSendRecv in the event handler loop of libmicrokit when PDs essentially 'make' themselves passive by sending a message to the monitor is not ideal for multiple reasons.
- It will not scale/work in multi-core setups. Given that it is a non-blocking send, a scenario may occur where the monitor is already dealing with a message from one PD (meaning that it is not waiting on an endpoint) and another PD that wants to make itself passive on another core which means the message will be lost.
- It affects verification as it leads to assumptions needing to be made about the scheduling of the system.
This issue was found in the process of verifying the passive PD changes in Microkit.
The current proposed solution is to have synchronisation using notifications so that all PDs block until they receive a notification from the monitor that all PDs that needed to be converted to passive have completed. This means that no PDs start their init procedure until everything else in the system is also ready to start their init procedure. This should remove any concurrency issues such as what happens when a PD is in the middle of being converted to passive and another PD on a separate core tries to communicate with it, I believe this may lead to lost notifications.
This solution is not final as we have not implemented and evaluated it, however, from our internal discussions it I think it is the cleanest solution and should require minimal changes to Microkit.
- Dominant language
- Rust
- Stars
- 224
- Forks
- 90
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from seL4/microkit
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Manual contradicts the tool on three x86 `irq` attributes (confirmed on Microkit 2.3.0)May be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 Half a day Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 43/100
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
-
Update roadmap on seL4 wbsiteMay be free again @midnightveil claimed this 74 days ago, and no pull request is open. Open
Similar issues
-
claim
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Nixitov/Riptide-Native#946 ·
Maintainers usually reply within 1 day
-
area: ai-assistants documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BetaBots-LLC/latticegate#17 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
storytold/craft-libs#5594 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
听歌识曲历史跳转后对应音源界面无法返回Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
LingyunStudio/RustMusic#16 ·