Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    C

    Concurrency Freaks

    concurrencyfreaks.blogspot.com · Personal blog · on HN since 2014

    Concurrency Freaks covers concurrent algorithms, including wait-free and lock-free data structures, memory reclamation, transactional memory and database isolation.

    Visit blogRSSHN submissions
    Systems & PerformanceDistributed SystemsProgramming
    What HN says

    HN links it for algorithms like Left-Right and Double Instance Locking, and one commenter notes the topic is unfashionable among most HN readers.

    Stats for nerds
    26HN people shared it
    38linked in comments
    882story points
    Feb 2026last shared
    2014people per year2026

    Top posts on HN

    1. 1
      Why is memory reclamation so important for lock-free algorithms?
      1 person · 165 points · first shared 2017 · 42 comments on HN
    2. 2
      Throughput vs. Latency and Lock-Free vs. Wait-Free
      1 person · 146 points · first shared 2016 · 31 comments on HN
    3. 3
      Why is Snapshot Isolation not enough?
      2 people · 135 points · first shared 2023 · 34 comments on HN
    4. 4
      What is Eventual Consistency?
      1 person · 105 points · first shared 2017 · 14 comments on HN
    5. 5
      CX: Wait-Free Universal Construction
      1 person · 91 points · first shared 2019 · 24 comments on HN
    6. 6
      The Laws of Durability
      1 person · 59 points · first shared 2021 · Discussion on HN
    7. 7
      Leaks in Persistent Memory
      1 person · 56 points · first shared 2019 · 6 comments on HN
    8. 8
      Linked lists with wait-free reads in C++
      1 person · 49 points · first shared 2014 · 1 comments on HN
    9. 9
      The importance of Sequential Consistency
      1 person · 10 points · first shared 2015 · Discussion on HN
    10. 10
      The importance of Correctness in concurrent algorithms
      1 person · 10 points · first shared 2021 · Discussion on HN

    What HN people wrote when they linked it

    • goodrootSep 2023

      And it does so with three links across three paragraphs.

      From the QuestDB article:

      > First, I found the Double Instance Locking[1] pattern at the amazing Concurrency Freaks blog[2]. This pattern is very similar to the one I described here. It also uses 2 internals structures and readers are alternating between them. It uses a read-write lock to protect the map being mutated. Given there is only a single writer then at any given time there is at least one internal map which is available for reading. This gives readers lock freedom.

      > It's fair to say that the Double Instance Locking pattern is simpler to reason about. It decomposes the problem better. But I'd still argue my contribution is the trick with delayed replay of the last operation - if writers are sufficiently rare, then writers won't be blocked at all.

      > The same blog also links to the paper Left-Right: A Concurrency Control Technique with Wait-Free Population Oblivious Reads[3] which on the surface also looks similar. It claims not only Lock-Freedom, but also Wait-Freedom. I have yet to deep dive into it.

      [1] http://concurrencyfreaks.blogspot.com/2013/11/double-instance-locking.html

      [2] http://concurrencyfreaks.blogspot.com/

      [3] https://master.dl.sourceforge.net/project/ccfreaks/papers/LeftRight/leftright-extended.pdf?viasf=1

    • GwypaasAug 2022

      Don't really have an axe to grind regarding strict-serializability, serializability, snapshot isolation or whatever. Start at the highest level of consistency and consciously step away if you encounter issues.

      The Postgres default of "Read committed" gives me shivers on the other hand...

      > If I were to make a concurrent map data structure whose operations are not linearizable and then put it on a library and give it to my users, any user of that library would come back to me and say that my library has a bug. They may not be able to tell me exactly what it is, but they'll understand that there is a bug in it.

      > However, if I take the same concurrent map data structure, and put in an application and call that application a "Key-Value store" or a "Database" (DBMS) and give it to the typical database users, it seems they may certainly use it for a several decades without ever complaining that this "Database" is not linearizable (or serializable as the DB folks call it).

      https://concurrencyfreaks.blogspot.com/2020/06/you-say-read-committed-i-say-buggy-code.html

    • RyanZAGJan 2014

      Very much unfashionable for the HN crowd. Most of the new research in concurrency is happening in Java and funded by the high performance trading industry - an industry which is very far from the HN crowd. The new Java8 stampedlock is a good example. It's possible to implement it in C++ as well, but because of the guarantees required by the lock it is a very difficult lock to integrate into C++ code. On the other hand, the JRE guarantees the correct constraints for Java code making a stampedlock very easy to use [1]. The performance of a stampedlock also seems to be the best case for any multi-reader environment. [2]

      [1] http://concurrencyfreaks.blogspot.com/2013/11/stampedlocktryoptimisticread-and.html

      [2] http://mechanical-sympathy.blogspot.ca/2013/08/lock-based-vs-lock-free-concurrent.html

    • pmontraFeb 2017

      That's what languages with immutable data structures do. Internally they implement simple data structures (lists, arrays) with more complex ones not to get a performance hit. For example, they don't want to copy every byte every time they add or remove from a list.

      In ascending order of complexity

      http://theerlangelist.blogspot.com/2013/05/working-with-immutable-data.html

      http://concurrencyfreaks.blogspot.com/2013/10/immutable-data-structures-are-not-as.html

      http://debasishg.blogspot.com/2010/05/grokking-functional-data-structures.html

      In the case of Ruby, it's a language build on mutability so let's use mutable data. There are already plenty of languages with immutable data to use if we want to.

    • MaxBarracloughMay 2020

      > You may have lock-free code with locks

      That doesn't sound right. I suppose you could have locks in the trivial sense, where it never actually blocks, but I don't imagine that's what you meant.

      https://concurrencyfreaks.blogspot.com/2013/05/lock-free-and-wait-free-definition-and.html

      https://www.cs.yale.edu/homes/aspnes/pinewiki/ObstructionFreedom.html

    • RcouF1uZ4gsCMay 2022

      A very nice approach for read heavy structures is the Left-Right algorithm.

      http://concurrencyfreaks.blogspot.com/2013/12/left-right-classical-algorithm.html?m=1

      It does cost an extra instance, but it generalizes to any data structure and gives you wait-free reads.

    Related

    Herb Suttergotw.ca84 people

    Ritchie, Stroustrup, and Gosling interview

    Herb Sutter
    Personal · last shared 2026
    Mechanical Sympathymechanical-sympathy.blogspot.com79 people

    Memory Access Patterns Are Important (2012)

    Mechanical Sympathy
    Personal · last shared 2026
    Existential Typeexistentialtype.wordpress.com157 people

    Haskell Is Exceptionally Unsafe (2012)

    Existential Type
    Personal · last shared 2026
    The Erlangelisttheerlangelist.com36 people

    Why Elixir (2014)

    The Erlangelist
    Personal · last shared 2026
    Stephen Clearyblog.stephencleary.com29 people

    There is no thread (2013)

    Stephen Cleary
    Personal · last shared 2025
    Simon Marlowsimonmar.github.io30 people

    Haskell in the Datacentre

    Simon Marlow
    Personal · last shared 2026
    Dedoimedodedoimedo.com124 people

    Linux – The beginning of the end?

    Dedoimedo
    Personal · last shared 2026
    1024cores1024cores.net36 people

    Lockfree Algorithms (2010)

    1024cores
    Personal · last shared 2025