3 ms·
Thank you. Blocking IPC is a very interesting approach but you have to carefully plan ahead, even before writing the first lines of code. I think the above art
by scoutt 5y ago
Thank you. Blocking IPC is a very interesting approach but you have to carefully plan ahead, even before writing the first lines of code.
I think the above article missed the "notifications" part. Without notifications, a blocking IPC wouldn't have sense in an RTOS: a task would not be able to process an interrupt because it's blocked while "sending".
I guess the existence of notifications is there to provide methods for an UART driver/task that blocks waiting for interrupts. When the interrupt arrives, the driver deals with it and instead of sending the data directly to a listener, it just "notifies" incoming data to another task (pretty much the "usual" way of doing things).
This makes "UART" to sit on its own task, setting the right priority for it, implement a circular buffer, etc. Complexity quickly escalates for a (for example) "sensor fusion" driver, which has to manage 3 other drivers (accelerometer, gyro and magnetometer drivers), each one on top of another drivers (SPI, I2C, etc.).
But I guess that's a price to pay.
> Users can't disable interrupts, they can only mask or unmask receiving notifications for said interrupts.
Sorry. I interpreted that drivers were also tasks (or they live in tasks?), so being able to interface the hardware I guess setting PRIMASK=1 could be an option too.
Perhaps battery-powered systems is not your application target, but I would be interested to see how __wfi() works within the Hubris context.
- bcantrill 5y agoAs others have mentioned, QNX is very much a model here, with Hubris notifications looking a lot like QNX proxies. In my experience (with the disclosure that I worked at QNX back in the day), that model was -- contrary to your implication -- remarkably clean for modeling real-time systems. Indeed, it was so clean that I was genuinely confused why so many other systems had adopted a much more monolithic model, which so clearly yielded a much more complicated system. (In hindsight, QNX being proprietary very much limited its impact.) I would strongly encourage you to check out the docs that Steve pointed you to, and of course, the source itself! And nothing beats actually throwing it on some hardware and messing around with it, which should help clarify the model -- and why we believe it to be a good fit for real-time applications.
- scoutt 5y agoI’m not implying it’s not clean. It seems very clean to me. I said that it may grow in complexity. Thank you both for the answers.