Friends don't let friends make certain types of data visualization
github.com/cxli233/FriendsDontLetFriendsThis is an opinionated essay about good and bad practices in data visualization. Examples and explanations are below.
Linus Torvalds about spinlocks and locking in general
www.realworldtech.com/forum?threadid=189711&curpostid=189723Efficient Userspace Optimistic Spinning Locks
lpc.events/event/4/contributions/286/attachments/225/398/LPC-2019-OptSpin-Locks.pdfHow to spin before sleeping so that it actually helps and not harms?
Mutexes Are Faster Than Spinlocks
matklad.github.io/2020/01/04/mutexes-are-faster-than-spinlocks.htmlMicrobenchmark for futexes + spinlocks and some useful links at the bottom.
Spinlocks Considered Harmful
matklad.github.io/2020/01/02/spinlocks-considered-harmful.htmlBecause spin locks are so simple and fast, it seems to be a good idea to use them for short-lived critical sections. For example, if you only need to increment a couple of integers, should you really bother with complicated syscalls? In the worst case, the other thread will spin just for a couple of iterations…
Unfortunately, this logic is flawed! A thread can be preempted at any time, including during a short critical section. If it is preempted, that means that all other threads will need to spin until the original thread gets its share of CPU again. And, because a spinning thread looks like a good, busy thread to the OS, the other threads will spin until they exhaust their quants, preventing the unlucky thread from getting back on the processor!