4 ms·
mutexes are a primitive that guarantee access to a resource is synchronized, and only one actor is accessing it at a time this necessarily requires actors in c
by preseinger 4y ago
mutexes are a primitive that guarantee access to a resource is synchronized, and only one actor is accessing it at a time
this necessarily requires actors in contention to wait, possibly forever
it is a fundamental paradigm that is used extensively throughout every kind of programming, even in real-time systems
- mgaunard 4y agoIt isn't used in real-time systems no, it's fundamentally incompatible. Check out wait-free algorithms.
- preseinger 4y agosynchronization requires serialized access, regardless of the nature of the consumer system (real-time or not) wait-free algorithms might use spin-locks instead of typical mutexes, but spin-locks aren't like better or faster than mutexes, they just replace syscall/io waits with hot waits