3 ms·
Preemption is GC for memory reordering (2019)
- 7e22v837278gb1p 3mo ago"GC"?
- mwkaufma 3mo agoGarbage collection. It's in the leading paragraph of the article so I can see why it's easy to miss.
- Jweb_Guru 3mo agoOh boy this is a cool blog post. Encourage everyone to read it.
- senderista 3mo agoThere are many more cool posts on that blog.
- gblargg 3mo agoIf I understand this correctly, it basically has the second thread wait until the first one experiences a hardware interrupt, which implicitly synchronizes memory. This avoids the first thread from needing any synchronization primitives that would slow it down.
- j_seigh 3mo agoSort of. Basically you have a situation where one thread needs to see another thread's memory accesses in sequential consistent order. If you can determine the other thread has synchronized its memory accesses at some point, then all its memory accesses before that are in observably sequentially consistent. The thing is you don't know exactly when that synchronization took place so your code logic has to take that into account. In the case of hazard pointers, false positives are ok and false negatives, i.e. thread is using reference that was not detected, cannot occur. There's 2 or 3 other tricks you can make hazard pointers wait-free. Getting rid of the conditional branching in the instruction pipeline gives you a considerable speed up.
- preetham_rangu 3mo agosame trick QSBR uses for lock-free reclamation, just framed at the OS scheduler level instead of userspace
- winterissnowing 3mo ago[flagged]