Comment on Most UI Applications are Broken Real-time Applications
Jummit@lemmy.one 1 year ago
Interesting viewpoint, but I think the applications aren’t at fault: The operating system should ensure that the user has control of the computer at all times. I think you need to do three things to achieve that:
- Limit process RAM usage, so the system never has to swap
- Limit process CPU usage, so the system never stalls
- When drivers / the operating itself crash, revert into a usable state (this one is probably the most complex one)
lysdexic@programming.dev 1 year ago
The whole point us that the OS does ensure that the user has control of the computer, at least as far as a time-sharing system goes. The problem is that the user (or the software they run) often runs code on the main thread that blocks it.
The real-time mentality towards constraints on how much can be executed by a handler is critical to avoid these issues, and it should drive the decision on whether to keep running a handler on the main thread or get it to trigger an async call.