SlideShare a Scribd company logo
1 of 13
Multithreading Magic Why Everything You Thought You Knew about Concurrency is Bogus, if not actually Totally Insane by Pieter Hintjens, CEO, iMatix FOSDEM 2011
Hintjens' Law of Concurrency e = mc 2 ,[object Object]
m  is for  mass , the size of the code
c  is for  conflict , when  c  threads collide
The Cost of Concurrency Where we end up Where we start
The Data-Centric Model Thread Thread Thread Thread ,[object Object]
What You (Probably) Know ,[object Object]
So, locks, semaphores, critical sections
So, code that fails by default
So, complexity, weird bugs, race conditions
Diminishing returns as  c  exceeds ' a few '
A bogus, if not totally insane model
The Ideal World Where we end up Where we start

More Related Content

What's hot

오픈소스 기반 비행제어컴퓨터 PX4 소개
오픈소스 기반 비행제어컴퓨터 PX4 소개오픈소스 기반 비행제어컴퓨터 PX4 소개
오픈소스 기반 비행제어컴퓨터 PX4 소개SungTae Moon
 
An SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environmentsAn SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environmentsGiacomo Vacca
 
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMUSFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMULinaro
 
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpPushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpJames Denton
 
The Elastix Call Center Protocol Revealed
The Elastix Call Center Protocol RevealedThe Elastix Call Center Protocol Revealed
The Elastix Call Center Protocol RevealedPaloSanto Solutions
 
ICE: The ultimate way of beating NAT in SIP
ICE: The ultimate way of beating NAT in SIPICE: The ultimate way of beating NAT in SIP
ICE: The ultimate way of beating NAT in SIPSaúl Ibarra Corretgé
 
2. introduction to compiler
2. introduction to compiler2. introduction to compiler
2. introduction to compilerSaeed Parsa
 
エンジニアなら知っておきたい「仮想マシン」のしくみ (BPStudy38)
エンジニアなら知っておきたい「仮想マシン」のしくみ (BPStudy38)エンジニアなら知っておきたい「仮想マシン」のしくみ (BPStudy38)
エンジニアなら知っておきたい「仮想マシン」のしくみ (BPStudy38)Takeshi HASEGAWA
 
from Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Worksfrom Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu WorksZhen Wei
 
FreeSWITCH Cluster by K8s
FreeSWITCH Cluster by K8sFreeSWITCH Cluster by K8s
FreeSWITCH Cluster by K8sChien Cheng Wu
 
Muduo network library
Muduo network libraryMuduo network library
Muduo network libraryShuo Chen
 
Media Handling in FreeSWITCH
Media Handling in FreeSWITCHMedia Handling in FreeSWITCH
Media Handling in FreeSWITCHMoises Silva
 
Reconnaissance of Virtio: What’s new and how it’s all connected?
Reconnaissance of Virtio: What’s new and how it’s all connected?Reconnaissance of Virtio: What’s new and how it’s all connected?
Reconnaissance of Virtio: What’s new and how it’s all connected?Samsung Open Source Group
 
Kamailio - Large Unified Communication Platforms
Kamailio - Large Unified Communication PlatformsKamailio - Large Unified Communication Platforms
Kamailio - Large Unified Communication PlatformsDaniel-Constantin Mierla
 
RabbitMQ Data Ingestion
RabbitMQ Data IngestionRabbitMQ Data Ingestion
RabbitMQ Data IngestionAlvaro Videla
 
HKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: IntroductionHKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: IntroductionLinaro
 
WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21Lorenzo Miniero
 

What's hot (20)

오픈소스 기반 비행제어컴퓨터 PX4 소개
오픈소스 기반 비행제어컴퓨터 PX4 소개오픈소스 기반 비행제어컴퓨터 PX4 소개
오픈소스 기반 비행제어컴퓨터 PX4 소개
 
An SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environmentsAn SFU/MCU integration for heterogeneous environments
An SFU/MCU integration for heterogeneous environments
 
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMUSFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
SFO15-202: Towards Multi-Threaded Tiny Code Generator (TCG) in QEMU
 
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack UpPushing Packets - How do the ML2 Mechanism Drivers Stack Up
Pushing Packets - How do the ML2 Mechanism Drivers Stack Up
 
The Elastix Call Center Protocol Revealed
The Elastix Call Center Protocol RevealedThe Elastix Call Center Protocol Revealed
The Elastix Call Center Protocol Revealed
 
ICE: The ultimate way of beating NAT in SIP
ICE: The ultimate way of beating NAT in SIPICE: The ultimate way of beating NAT in SIP
ICE: The ultimate way of beating NAT in SIP
 
2. introduction to compiler
2. introduction to compiler2. introduction to compiler
2. introduction to compiler
 
エンジニアなら知っておきたい「仮想マシン」のしくみ (BPStudy38)
エンジニアなら知っておきたい「仮想マシン」のしくみ (BPStudy38)エンジニアなら知っておきたい「仮想マシン」のしくみ (BPStudy38)
エンジニアなら知っておきたい「仮想マシン」のしくみ (BPStudy38)
 
from Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Worksfrom Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Works
 
FreeSWITCH Cluster by K8s
FreeSWITCH Cluster by K8sFreeSWITCH Cluster by K8s
FreeSWITCH Cluster by K8s
 
Muduo network library
Muduo network libraryMuduo network library
Muduo network library
 
Media Handling in FreeSWITCH
Media Handling in FreeSWITCHMedia Handling in FreeSWITCH
Media Handling in FreeSWITCH
 
Reconnaissance of Virtio: What’s new and how it’s all connected?
Reconnaissance of Virtio: What’s new and how it’s all connected?Reconnaissance of Virtio: What’s new and how it’s all connected?
Reconnaissance of Virtio: What’s new and how it’s all connected?
 
Kamailio - Large Unified Communication Platforms
Kamailio - Large Unified Communication PlatformsKamailio - Large Unified Communication Platforms
Kamailio - Large Unified Communication Platforms
 
GO AnyWhere - MFT
GO AnyWhere - MFTGO AnyWhere - MFT
GO AnyWhere - MFT
 
RabbitMQ Data Ingestion
RabbitMQ Data IngestionRabbitMQ Data Ingestion
RabbitMQ Data Ingestion
 
HKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: IntroductionHKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: Introduction
 
WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21
 
Qemu Introduction
Qemu IntroductionQemu Introduction
Qemu Introduction
 
gRPC with java
gRPC with javagRPC with java
gRPC with java
 

Similar to FOSDEM 2011 - 0MQ

Mirage: ML kernels in the cloud (ML Workshop 2010)
Mirage: ML kernels in the cloud (ML Workshop 2010)Mirage: ML kernels in the cloud (ML Workshop 2010)
Mirage: ML kernels in the cloud (ML Workshop 2010)Anil Madhavapeddy
 
Parallel architecture
Parallel architectureParallel architecture
Parallel architectureMr SMAK
 
Why we need censorship-resistant AI
Why we need censorship-resistant AIWhy we need censorship-resistant AI
Why we need censorship-resistant AIPandora Boxchain
 
Splunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageSplunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageDamien Dallimore
 
1005 cern-active mq-v2
1005 cern-active mq-v21005 cern-active mq-v2
1005 cern-active mq-v2James Casey
 
The von Neumann Memory Barrier and Computer Architectures for the 21st Century
The von Neumann Memory Barrier and Computer Architectures for the 21st CenturyThe von Neumann Memory Barrier and Computer Architectures for the 21st Century
The von Neumann Memory Barrier and Computer Architectures for the 21st CenturyPerry Lea
 
Open source building blocks for the Internet of Things - Jfokus 2013
Open source building blocks for the Internet of Things - Jfokus 2013Open source building blocks for the Internet of Things - Jfokus 2013
Open source building blocks for the Internet of Things - Jfokus 2013Benjamin Cabé
 
Industrial trends in heterogeneous and esoteric compute
Industrial trends in heterogeneous and esoteric computeIndustrial trends in heterogeneous and esoteric compute
Industrial trends in heterogeneous and esoteric computePerry Lea
 
Building an Open M2M community one step at a time
Building an Open M2M community one step at a timeBuilding an Open M2M community one step at a time
Building an Open M2M community one step at a timeBenjamin Cabé
 
Networking Basics
Networking BasicsNetworking Basics
Networking BasicsCarlo Fonda
 
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)Matthias Noback
 
Null mumbai-iot-workshop
Null mumbai-iot-workshopNull mumbai-iot-workshop
Null mumbai-iot-workshopNitesh Malviya
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSkills Matter
 
Peyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_futurePeyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_futureTakayuki Muranushi
 
[DSC Europe 23] Ales Gros - Quantum and Today s security with Quantum.pdf
[DSC Europe 23] Ales Gros - Quantum and Today s security with Quantum.pdf[DSC Europe 23] Ales Gros - Quantum and Today s security with Quantum.pdf
[DSC Europe 23] Ales Gros - Quantum and Today s security with Quantum.pdfDataScienceConferenc1
 
RestMS Introduction
RestMS IntroductionRestMS Introduction
RestMS Introductionpieterh
 

Similar to FOSDEM 2011 - 0MQ (20)

Amazon Elastic Computing 2
Amazon Elastic Computing 2Amazon Elastic Computing 2
Amazon Elastic Computing 2
 
Mirage: ML kernels in the cloud (ML Workshop 2010)
Mirage: ML kernels in the cloud (ML Workshop 2010)Mirage: ML kernels in the cloud (ML Workshop 2010)
Mirage: ML kernels in the cloud (ML Workshop 2010)
 
Parallel architecture
Parallel architectureParallel architecture
Parallel architecture
 
Why we need censorship-resistant AI
Why we need censorship-resistant AIWhy we need censorship-resistant AI
Why we need censorship-resistant AI
 
Splunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageSplunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the message
 
ZeroMQ
ZeroMQZeroMQ
ZeroMQ
 
1005 cern-active mq-v2
1005 cern-active mq-v21005 cern-active mq-v2
1005 cern-active mq-v2
 
The von Neumann Memory Barrier and Computer Architectures for the 21st Century
The von Neumann Memory Barrier and Computer Architectures for the 21st CenturyThe von Neumann Memory Barrier and Computer Architectures for the 21st Century
The von Neumann Memory Barrier and Computer Architectures for the 21st Century
 
Open source building blocks for the Internet of Things - Jfokus 2013
Open source building blocks for the Internet of Things - Jfokus 2013Open source building blocks for the Internet of Things - Jfokus 2013
Open source building blocks for the Internet of Things - Jfokus 2013
 
Industrial trends in heterogeneous and esoteric compute
Industrial trends in heterogeneous and esoteric computeIndustrial trends in heterogeneous and esoteric compute
Industrial trends in heterogeneous and esoteric compute
 
Building an Open M2M community one step at a time
Building an Open M2M community one step at a timeBuilding an Open M2M community one step at a time
Building an Open M2M community one step at a time
 
OWF12/Java Building an Open M2M community
OWF12/Java Building an Open M2M communityOWF12/Java Building an Open M2M community
OWF12/Java Building an Open M2M community
 
Networking Basics
Networking BasicsNetworking Basics
Networking Basics
 
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
 
Null mumbai-iot-workshop
Null mumbai-iot-workshopNull mumbai-iot-workshop
Null mumbai-iot-workshop
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelism
 
Peyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_futurePeyton jones-2011-parallel haskell-the_future
Peyton jones-2011-parallel haskell-the_future
 
[DSC Europe 23] Ales Gros - Quantum and Today s security with Quantum.pdf
[DSC Europe 23] Ales Gros - Quantum and Today s security with Quantum.pdf[DSC Europe 23] Ales Gros - Quantum and Today s security with Quantum.pdf
[DSC Europe 23] Ales Gros - Quantum and Today s security with Quantum.pdf
 
RestMS Introduction
RestMS IntroductionRestMS Introduction
RestMS Introduction
 
Mesh IoT Networks Explained
Mesh IoT Networks ExplainedMesh IoT Networks Explained
Mesh IoT Networks Explained
 

More from pieterh

Switch or broker
Switch or brokerSwitch or broker
Switch or brokerpieterh
 
Revolutionary Open Source
Revolutionary Open SourceRevolutionary Open Source
Revolutionary Open Sourcepieterh
 
CurveZMQ, ZMTP and other Dubious Characters
CurveZMQ, ZMTP and other Dubious CharactersCurveZMQ, ZMTP and other Dubious Characters
CurveZMQ, ZMTP and other Dubious Characterspieterh
 
Git Without Branches - Simple, Smooth, Scalable
Git Without Branches - Simple, Smooth, ScalableGit Without Branches - Simple, Smooth, Scalable
Git Without Branches - Simple, Smooth, Scalablepieterh
 
Software Architecture using ZeroMQ - techmesh 2012
Software Architecture using ZeroMQ - techmesh 2012Software Architecture using ZeroMQ - techmesh 2012
Software Architecture using ZeroMQ - techmesh 2012pieterh
 
Software Architecture over ZeroMQ
Software Architecture over ZeroMQSoftware Architecture over ZeroMQ
Software Architecture over ZeroMQpieterh
 
Social architecture-101
Social architecture-101Social architecture-101
Social architecture-101pieterh
 
Fosdem 2009
Fosdem 2009Fosdem 2009
Fosdem 2009pieterh
 

More from pieterh (8)

Switch or broker
Switch or brokerSwitch or broker
Switch or broker
 
Revolutionary Open Source
Revolutionary Open SourceRevolutionary Open Source
Revolutionary Open Source
 
CurveZMQ, ZMTP and other Dubious Characters
CurveZMQ, ZMTP and other Dubious CharactersCurveZMQ, ZMTP and other Dubious Characters
CurveZMQ, ZMTP and other Dubious Characters
 
Git Without Branches - Simple, Smooth, Scalable
Git Without Branches - Simple, Smooth, ScalableGit Without Branches - Simple, Smooth, Scalable
Git Without Branches - Simple, Smooth, Scalable
 
Software Architecture using ZeroMQ - techmesh 2012
Software Architecture using ZeroMQ - techmesh 2012Software Architecture using ZeroMQ - techmesh 2012
Software Architecture using ZeroMQ - techmesh 2012
 
Software Architecture over ZeroMQ
Software Architecture over ZeroMQSoftware Architecture over ZeroMQ
Software Architecture over ZeroMQ
 
Social architecture-101
Social architecture-101Social architecture-101
Social architecture-101
 
Fosdem 2009
Fosdem 2009Fosdem 2009
Fosdem 2009
 

FOSDEM 2011 - 0MQ