Shared Memory and Atomics

Let's go to low-level memory stuff! This chapter is going to be a bit advanced, but interesting. I'll try to make it as simple and understandable as possible.

With that out of the way, let's get to what we've FINALLY in JavaScript! Low-level memory access, multi-threading, atomics, shared memory, and all that cool and powerful stuff. But, as someone said, with great power comes great responsibility. Let's go!

We'll cover the following things in this chapter:

  • Basics of memory management in computers
  • What is shared memory?
  • Using SharedArrayBuffer
  • Introduction to parallel programming
  • Problems when multiple threads access one memory location
  • What are atomics?
  • Performing atomic operations
  • Atomic APIs in JavaScript

Get Learn ECMAScript - Second 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.