This talk on lock internals and performance characteristics is going to be incredible.
The Go runtime uses locks extensively (as does your memory allocator) sometimes to the detriment of performance.
![](https://pbs.twimg.com/media/D91YGJVWwAAoiHx.jpg)
![](https://pbs.twimg.com/media/D91YGJVXsAAEegu.jpg)
![](https://pbs.twimg.com/media/D91YGJTWkAU3RNi.jpg)
The LOCK instruction precisely in x86 is what powers the lock implementation in most programming languages.
OMG - this talk is indescribably good! 😍
![](https://pbs.twimg.com/media/D91acgpX4AUUfeb.jpg)
![](https://pbs.twimg.com/media/D91acgnWsAA6_Ph.jpg)
And what’s the cost of an atomic operation. @kavya719 at @qconnewyork
![](https://pbs.twimg.com/media/D91a4oQXYAI3RMe.jpg)
![](https://pbs.twimg.com/media/D91a4oTX4AAErdd.jpg)
My tweets do complete injustice to this talk. It’s absolutely incredible! @kavya719 at @qconnewyork
![](https://pbs.twimg.com/media/D91b4EWWkAAULgf.jpg)
![](https://pbs.twimg.com/media/D91b4EWW4AAZNKo.jpg)
![](https://pbs.twimg.com/media/D91b4EVXoAAZl4n.jpg)
Hybrid futexes are an improvement on futexes. @kavya719 at @qconnewyork
Next up - how does a language with userspace threads like Go implement this? 😍
![](https://pbs.twimg.com/media/D91cwpYWsAAo7ON.jpg)
![](https://pbs.twimg.com/media/D91cwpbXoAAftxE.jpg)
sync.Mutex is a hybrid lock. Comparison with pthreads. @kavya719 at @qconnewyork
![](https://pbs.twimg.com/media/D91eZafWsAAION8.jpg)
![](https://pbs.twimg.com/media/D91eZapW4AM9Yi2.jpg)
![](https://pbs.twimg.com/media/D91eZafXoAAwz1S.jpg)
![](https://pbs.twimg.com/media/D91eZagWkAEz-cj.jpg)
It’s locks all the way down! @kavya719 at @qconnewyork
![](https://pbs.twimg.com/media/D91fIp8XYAE1sA8.jpg)
![](https://pbs.twimg.com/media/D91fIp8XsAEzW7o.jpg)
![](https://pbs.twimg.com/media/D91fqlFW4AAMBR1.jpg)
![](https://pbs.twimg.com/media/D91fqlJXkAMrWC2.jpg)
![](https://pbs.twimg.com/media/D91fqlJXkAIXBc8.jpg)
![](https://pbs.twimg.com/media/D91fqlGXoAE9uU-.jpg)
And some strategies to deploy if contention is indeed the problem.
@kavya719 at @qconnewyork
![](https://pbs.twimg.com/media/D91gniQX4AACK75.jpg)
![](https://pbs.twimg.com/media/D91gniXXUAEf6bi.jpg)
![](https://pbs.twimg.com/media/D91gniOXsAI2s86.jpg)
![](https://pbs.twimg.com/media/D91gniQW4AIc2Uc.jpg)