Conversation

Sharing my notes in lieu of a blog post, I think I've figured out how to make MnemOS' executor work. I have the rough shape of what the kernel ringbuffers need to look like, a hacked up version of bbqueue that is IPC safe, and an idea of what "mnemos-std" could look like.
1
11
The fancy bits are made up of an intrusive linked-list MPSC library from (cordyceps, also used in her Mycelium OS), as well as a little static oneshot channel to make sure dropped futures don't lead to wasted resources. Notes here:
2
8
One downside though (so far) is that leaning REALLY HARD into Rust's async/await is that I think it might be harder to provide a C/FFI interface for using other languages in MnemOS. I'd probably have to go one of two ways:
1
3
1. Provide NOTHING, and expect the C library to "bring it's own concurrency", basically it gets access to the syscall api for sending/receiving messages, but it is responsible for "re-inventing the wheel" when it comes to scheduling, etc.
1
5
2. Provide EVERYTHING, basically have a "managed runtime" that does all the scheduling and stuff, and has some API or callbacks or something when things have completed successfully. I'm not sure which is preferable, honestly.
3
4