4 ms·
"lockfree"? You mean "heavy lockfree" I guess since atomic depends on implicit hardware locking for proper operations. And those algos are so much critical and
by sylware 4y ago
"lockfree"? You mean "heavy lockfree" I guess since atomic depends on implicit hardware locking for proper operations.
And those algos are so much critical and dangerous, a mathematical proof must be provided and peer-reviewed.
For example, as far as I can remember, reader-writer ring buffer with atomic read/write pointers. You have such ring buffers in USB xHCI, and AHCI and NVMe.
- CyberDildonics 4y agoLockfree means one thread is always making progress. If two threads contend over an atomic operation, one succeeds and one fails. If you spend some time using atomics they might not seem so scary anymore.
- sylware 4y agoboth threads can make progress at the same time.
- CyberDildonics 4y agoLockfree means at least one thread is always making progress and atomics allow that trivially. If an atomic operation fails it means that a different thread's atomic operation succeeded. I didn't make up this definition. https://en.wikipedia.org/wiki/Non-blocking_algorithm#Lock-freedom https://en.wikipedia.org/wiki/Non-blocking_algorithm#Lock-fr...
- sylware 4y ago