4 ms·
What are those locks I see in realtime functions? Sources of unbounded runtime and hanged machines? Can you prove they are always safe? (at least on the level
by AstralStorm 11y ago
What are those locks I see in realtime functions? Sources of unbounded runtime and hanged machines?
Can you prove they are always safe? (at least on the level of linux kernel LOCKDEP)
I bet you cannot, because 1.1.0 changelog mentions "fixing" a deadlock by tossing functionality.
Likewise, I see a lot of places that do reference counting (those _ref/_unref calls). Those are probable deallocations on heap from RT side, which have unbounded runtime unless you have a realtime memory allocator. I haven't noticed anything like that in the code.
This coming from a guy who supposedly "has carefully read the documentation for every audio backend and understands the purpose of every line of code."
For people who want to get a primer on such issues, I recommend this book: http://www.amazon.com/Real-Time-Systems-Programming-Languages-International/dp/0321417453 http://www.amazon.com/Real-Time-Systems-Programming-Language...
It's a bit old despite updates (e.g. no C++11, no C99), but still highly relevant. The techniques themselves and the analysis parts are well written.
- anon4 11y agoIt's a reasonably small, sane implementation under a liberal license. I posit that you wouldn't be able to do better on your first try and your time would be better spent improving the corner cases on it, rather than reinventing the wheel.
- AndyKelley 11y agoYou are mistaken about the presence of locks and memory deallocation in real-time functions. I invite you to point out specific lines of code and I'll help you fix your understanding.