I teach operating systems and today's the first time I heard of a latch being a thing used in concurrency controlhttps://stackoverflow.com/questions/3111403/what-is-the-difference-between-a-lock-and-a-latch-in-the-context-of-concurrent-a …
-
Show this thread
-
if you had showed me this table w/o the labels I'd have said the stuff on the right is a lock and the stuff on the left is a database-level lock, or something like thatpic.twitter.com/7HQVMadJjX
11 replies 0 retweets 44 likesShow this thread -
Replying to @johnregehr
Apparently they call "spin locks" "latches", so that makes sense. Just a weird term for a spin lock.
2 replies 0 retweets 0 likes -
Replying to @KardOnIce @johnregehr
Not sure how uniformly, but in several databases (e.g. in postgres) there's both spinlocks *and* latches (albeit called lwlocks - leight weight locks in case of postgres). The difference being that the latches are queued using OS primitives when blocked, whereas spinlocks spin.
1 reply 0 retweets 2 likes -
The spinlocks are used for very short locks where contention wouldn't be worth entering the kernel (but IMO adaptive locks would be a better idea).
1 reply 0 retweets 2 likes
To complete the idiocy: In postgres there also is a latch concept, but mostly unrelated to the latch concept of database literature. It's used to wait both for IO and events like signals, processes dying and such.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.