Re:24-core CPU and I can’t type an email
by speedplane on Saturday August 18, 2018 @02:13AM
(#17787147)
Don’t see the fundamental difference between locks and queues. In a system that uses locks, the kernel can still internally use queues to grant some lock requests before others.
Re:24-core CPU and I can’t type an email
by CodeWriter23 on Saturday August 18, 2018 @03:56AM
(#17787386)
The fundamental difference is this. With locking, when a thread’s time slice expires while holding a lock, the dispatcher switches to a different thread and no other thread can gain that particular lock until the dispatcher resumes the thread holding the lock.
No locks means this can never happen.
My point is, by design, an operating system that has a fully async interface can dispense with locks altogether. Resource contention is then properly resolved through queuing. The OS can then strictly enforce a priority scheme on its various queues, preventing an opportunistic thread from dominating the system. Or enabling higher priority requests to be serviced first. But that decision is made intelligently, not as a result of optimizing to minimize context switching.