6 ms·
Actually I never found cooperative multitasking a real issue. You don't want faulty tasks in your embedded application anyway. With cooperative multitasking it
by blackbeans 3y ago
Actually I never found cooperative multitasking a real issue. You don't want faulty tasks in your embedded application anyway. With cooperative multitasking it at least is easy to spot which task is the culprit.
If I understand the article correctly, it seems that in this case the multitasking also isn't controlled by calling yield in custom user code, but rather always from the implementation that makes async/await work.
- jacquesm 3y ago> You don't want faulty tasks in your embedded application anyway. Faults are a way of life in software, they are unavoidable because each and every piece of software rests on a bunch of assumptions and if any one of those or a combination of them do not hold then you have a fault. Failure to envision that fault and a way to deal with it in embedded systems can cause damage to property, injury and loss of life. None of this is simple, not in theory and definitely not in practice.
- rcxdude 3y agoSure, but an RTOS doesn't help you much with safety critical guarantees. When you're worrying about that you're also worrying about redundancy of the hardware your software is running on, for example. The only thing that an RTOS is really helpful for is making it a bit easier to argue that some realtime guarantees can be met even if other code running on the device may have worst-case runtimes longer than your deadline (this doesn't really become a mitigation for a truly defective task, though, since at that point all bets are off unless you have some good task isolation). But this is not all embedded systems, not even all safety-critical ones, and there are other solutions available if you are not using an RTOS which can give you the same or better options in that case(like placing the critical code in a high-priority interrupt handler, for example).
- jacquesm 3y agoIf at all possible for such stuff I would use an FPGA and not software.
- imtringued 3y agoThe WLCSP Lattice FPGAs are waiting for you! Only 2€ a pop for 1k LUTs!
- 0xfedbee 3y ago> With cooperative multitasking it at least is easy to spot which task is the culprit. Yeah I would love to spot that my car’s LED task is faulty while trying to brake on a 100mph highway.
- junon 3y agoJudging by your pushy comments throughout this thread I'm not really convinced you know what Rust async actually does.