<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Concurrency on CS Theorems</title><link>https://cs.lozic.me/areas/concurrency/</link><description>Recent content in Concurrency on CS Theorems</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 24 Dec 2027 12:00:00 +0100</lastBuildDate><atom:link href="https://cs.lozic.me/areas/concurrency/index.xml" rel="self" type="application/rss+xml"/><item><title>Mutual Exclusion Without Hardware Support</title><link>https://cs.lozic.me/posts/t052-mutual-exclusion-without-hardware-support/</link><pubDate>Fri, 24 Dec 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t052-mutual-exclusion-without-hardware-support/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;Two threads increment a shared counter a million times each. The final value is
1,374,522.&lt;/p&gt;
&lt;p&gt;You know why: the increment is a read, an add, and a write, and the interleavings
lose updates. The fix is a lock. But a lock is provided by your runtime, which
gets it from the OS, which gets it from a hardware instruction — &lt;code&gt;lock xchg&lt;/code&gt;,
&lt;code&gt;cmpxchg&lt;/code&gt;, &lt;code&gt;ldrex&lt;/code&gt;/&lt;code&gt;strex&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Work Stealing and Fair Scheduling</title><link>https://cs.lozic.me/posts/t109-work-stealing-and-fair-scheduling/</link><pubDate>Fri, 17 Dec 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t109-work-stealing-and-fair-scheduling/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;You parallelize a recursive algorithm. Quicksort, or a tree traversal, or a
divide-and-conquer numeric kernel. You have 16 cores and a central task queue,
and you measure a speedup of 3.&lt;/p&gt;</description></item><item><title>Model Checking, LTL, and Buchi Automata</title><link>https://cs.lozic.me/posts/t049-model-checking-ltl-and-buchi-automata/</link><pubDate>Fri, 26 Nov 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t049-model-checking-ltl-and-buchi-automata/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;Your distributed lock service deadlocks once a month. You cannot reproduce it.&lt;/p&gt;
&lt;p&gt;The logs show three nodes in states that, as far as you can reconstruct, should
not co-occur. You add tracing. It does not happen again for six weeks, then
happens twice in a day during a deploy. You write a stress test that runs a
million random interleavings overnight and finds nothing.&lt;/p&gt;</description></item><item><title>The Coffman Conditions</title><link>https://cs.lozic.me/posts/t051-the-coffman-conditions/</link><pubDate>Fri, 29 Jan 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t051-the-coffman-conditions/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;Production is wedged. Not slow — wedged. CPU is at zero, no errors are being
logged, and two threads are sitting in a lock wait with no timeout. The stack
traces show thread A holding the account lock and waiting for the ledger lock,
thread B holding the ledger lock and waiting for the account lock. Somebody
restarts the service and it goes away.&lt;/p&gt;</description></item><item><title>Amdahl's Law</title><link>https://cs.lozic.me/posts/t081-amdahls-law/</link><pubDate>Fri, 18 Sep 2026 12:00:00 +0200</pubDate><guid>https://cs.lozic.me/posts/t081-amdahls-law/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;The profile was unambiguous: 94% of wall-clock time in one loop, and the loop&amp;rsquo;s
iterations are independent. You parallelise it across sixteen cores, the flame
graph flattens exactly as predicted, and the end-to-end time goes from 40
seconds to 17.&lt;/p&gt;</description></item></channel></rss>