Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 3 months ago.
MINAR and RTOS
Hi
Wow - that was a huge announcement.... you really have been busy!
As an educator I'm really excited by this announcement.
Very general question if I may. Mbed 3 with MINAR was a different way of approaching concurrent tasks, but was never considered real time (but equally, is inherently much safer as it's not preemptive).
Now we have a choice of mbed rtos *or* MINAR? - how do these co exist? Is it a question of one or the other, or can both be used / synchronised?
Many thanks,
Nick Outram
Question relating to:
1 Answer
8 years, 3 months ago.
Hi Nicholas,
Thanks! Yes, it has been a lot of dedication from a great team to achieve this!
With the RTOS introduced, real-time and muti-threaded applications are certainly back on the table. But it is not a case of "either/or". We are reintroducing a MINAR-like scheduler library compatible with the RTOS and that can be instantiated and run in any thread - so they can definitely both co-exist.
What we expect to be a common design pattern is that worker threads are used to serve some platform OS functions, low-level real-time response or other background heavy lifting (for example, we're already using them for running the network stacks and responding to the radios), but the default main/application thread to often be just a single-threaded event or super loop, composing and orchestrating the application functionality and logic. That model is very familiar to anyone doing GUI OS development (the UI event loop) or node-like web programming (the node application orchestrates the program in a very event-oriented way, but the underlying threaded OS deals with all the threads/processes that are needed to drive I/O and Networking etc).
Importantly, your application itself doesn't need to use threads to benefit from OS services using them in the background. But for applications needing threads themselves, that is now obviously an option too!
Thanks, Simon