Chapter 26Programming Multicore CPUs

images/Computer_chip_AI8.png

How can we write programs that run faster on a multicore CPU? It’s all about mutable state and concurrency.

Back in the old days (twenty-odd years ago), there were two models of concurrency.

  • Shared state concurrency

  • Message passing concurrency

The programming world went one way (toward shared state). The Erlang community went the other way. (Few other languages followed the “message passing concurrency” road; some others were Oz and Occam.)

In message passing concurrency, there is no shared state. All computations are done in processes, and the only way to exchange data is through asynchronous message ...

Get Programming Erlang, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.