Module I · Loading

The browser as operating system

The standard introduction to a browser is a diagram with an arrow: URL in one side, rendered page out the other. We will spend nine modules taking that arrow apart. But the arrow is the wrong shape to start with, because it suggests a pipe — bytes flowing through a fixed channel. The browser is not a pipe. It is a small operating system, and the page is a program it agrees to run.

1.1 Why “operating system” and not “renderer”

Call the browser a renderer and you have described one of its subsystems while hiding the rest. Rendering — turning markup and styles into pixels — is genuinely hard and gets three modules of its own. But it is not the part that makes the browser interesting as a piece of systems software. The interesting part is everything around the rendering: the browser accepts a program written by someone it has never met, transmitted over a network it does not control, and runs that program on your machine, with access to your screen, your input, and a curated slice of your hardware — without letting it read your filesystem, your other tabs, or your bank session.

That sentence is a description of an operating system. An OS runs untrusted programs and keeps them from harming the machine or each other. Substitute “web page” for “program” and “origin” for “process” and you have the browser's job description. Once you see it this way, a long list of browser behaviors that otherwise look like trivia — why scripts block rendering, why a slow tab can stutter an animation in another, why a page cannot read a file you did not hand it, why the camera asks permission — stop being trivia and become the predictable consequences of a few systems-design decisions.

A web page is untrusted code from a stranger. Everything the browser does is shaped by the problem of running it safely and fast.

1.2 The subsystems

A browser is conventionally decomposed into a handful of major components. The decomposition below has been stable since the mid-2000s — the famous “How Browsers Work” primer used it — even as the implementations underneath changed completely. The labels are worth memorizing because every later module lives inside one of these boxes.

The user interface (the browser shell, or “chrome”)
Everything that is not the page: the address bar, the back and forward buttons, tabs, bookmarks, the menus. None of it is defined by any web specification; it is pure convention, evolved by browsers imitating each other. The word “chrome” meant this long before it was a product name.
The browser engine
The coordinator between the shell and the rendering engine. It marshals actions: you click back, the shell tells the browser engine, the browser engine drives the rendering engine to a previous state. In a modern multiprocess browser this is the privileged core — hold that thought, it becomes the kernel of our analogy.
The rendering engine
The subsystem that turns a document into a picture: parse HTML into a tree, parse CSS, compute styles, lay out boxes, paint pixels. Blink (Chrome, Edge, Opera, and every other Chromium browser), WebKit (Safari), and Gecko (Firefox) are the three that matter in 2026. Modules 3 through 5 are entirely about this box.
Networking
Fetches bytes. DNS, connections, TLS, HTTP, caching policy. A platform-independent interface over wildly platform-specific guts. This is the I/O subsystem; Module 2 is its tour.
The JavaScript engine
Parses and executes JavaScript — V8 in Chrome, JavaScriptCore in Safari, SpiderMonkey in Firefox. Distinct from the rendering engine it sits next to, though they are deeply entangled, because the script can rewrite the document mid-render. Module 6.
The UI backend
Draws the primitive widgets — checkboxes, drop-downs, the window itself — through a generic interface implemented with the host OS's own drawing calls. This is the seam where the browser touches the real operating system underneath it.
Data storage
The persistence layer: cookies, Web Storage, IndexedDB, the HTTP cache, the origin-private filesystem. The browser is a small database engine you never sign up for. Module 8.
Browser subsystem architectureThe browser shell sits on top of the browser engine, which coordinates the rendering engine and the JavaScript engine. Networking, storage, and the UI backend are shared services beneath them.Browser shell — address bar, tabs, menusBrowser engine — coordinatorRendering enginemarkup + styles → pixelsJavaScript engineexecutes page scriptsshared services, reachable from the engines aboveNetworkingStorageUI backend
Figure 1.1 — The seven subsystems. The shell drives the browser engine; the engine coordinates the two engines that turn a document into something you can see and interact with; networking, storage, and the UI backend serve them all.

Seven boxes. The rest of this module makes a single claim about them: arrange them under the pressure of running untrusted code at sixty frames a second, and what you get is not a media player. It is an operating system.

1.3 The mapping

Here is the analogy stated literally, term by term. Read the right column as the thing you already understand from an operating systems course, and the left as the browser's version of it.

BrowserOperating system
The browser process / engineThe kernel and its privileged services — the trusted code that everything else must ask for resources.
A renderer processA userland process: unprivileged, sandboxed, unable to touch hardware directly.
A tabA running application.
A page's DOM + JavaScriptA program and its address space.
The event loopThe scheduler — decides what runs next on a thread that can only do one thing at a time.
The origin (scheme + host + port)The process / permission boundary — the unit of isolation and access control.
Web APIs (fetch, geolocation, WebGPU, clipboard)The syscall interface — the controlled gate through which a program reaches the outside world.
The networking layerThe I/O subsystem and device drivers.
Storage (cookies, IndexedDB, cache)The filesystem.
The sandboxMemory protection and privilege separation — the wall between untrusted code and everything valuable.
The permission promptAccess control — the user as the authority granting a capability.

The rest of the series is, in effect, a walk down this table. Module 2 is I/O. Modules 3 through 5 are the program being loaded into memory and prepared to display. Module 6 is the scheduler. Module 7 is the process boundary and access control. Module 8 is the filesystem. Module 9 is the syscall surface, expanding year over year. The single most useful thing this module can give you is the habit of reaching for the right column whenever the left column surprises you.

1.4 From one process to many

The analogy was not always this clean. Early browsers were single-process programs: the shell, the rendering of every tab, and every page's JavaScript all ran in one address space on, effectively, one thread of control. This had the property every systems programmer will wince at — no isolation. A bug on one page could corrupt another. A script that spun forever froze the whole browser. A crash anywhere took down every tab you had open. In OS terms, it was a machine with no memory protection, running every application in ring zero.

1990s–2000s
Single-process browsers. One tab's runaway script or fatal bug crashes or hangs them all. Isolation between pages is, at best, advisory.
2008
Chrome ships with a multiprocess architecture: a privileged browser process plus separate, sandboxed renderer processes. A crashing page now takes down one tab, not the session — the “Aw, Snap” page instead of a dead browser. This is the move from a single-tasking monitor to a real multitasking OS.
2017
Firefox completes its multiprocess rollout (project “Electrolysis”), splitting chrome from content after years as a single-process design.
2018
The Spectre and Meltdown speculative-execution attacks change the threat model overnight. They show that code in one process can read memory it was never granted, by timing the CPU's guesses. Chrome responds by turning on Site Isolation by default: each site gets its own renderer process, so a cross-origin secret is not even in the address space the attacker's script can probe.
2021
Firefox ships its equivalent, project “Fission.” Per-site process isolation is now table stakes across the major engines.
Single-process versus multiprocess browser architectureOn the left, a single-process browser holds every tab, the shell, and all scripts in one shared address space, so one failure takes everything down. On the right, a privileged browser process supervises separate sandboxed renderer processes per site, so failures are contained.Single process (early browsers)Multiprocess + Site IsolationTab ATab BShellScriptsone shared address spaceOne crash, hang, or exploittakes down everything.Browser process (privileged)Renderersite A(sandboxed)Renderersite B(sandboxed)A crash or compromise iscontained to one process.
Figure 1.2 — The architectural shift Chrome made in 2008 and Site Isolation completed in 2018: from one address space shared by everything to one sandboxed process per site, supervised by a privileged core. This is the move from no memory protection to real isolation between mutually distrustful programs.

Notice the shape of that history. It is the same arc an operating system traveled decades earlier: from a single program in charge of the machine, to cooperative multitasking, to preemptive multitasking with hardware-enforced memory protection between mutually distrustful processes. The browser walked the road again, compressed into about a decade, under the same pressure that drove the original: you cannot let one untrusted program read or wreck another's memory.

1.5 The kernel and its userland

A modern Chromium browser does not run two kinds of process — it runs several, and the division of labor is the analogy made concrete:

  • The browser process is the privileged core. It owns the window and the shell, it talks to the real OS, and it is the only process trusted to touch the network and the disk directly. It is the kernel.
  • Renderer processes run the actual web content: the rendering engine and the JavaScript engine for a given site. They are sandboxed — stripped of OS privileges — and cannot open a socket or read a file themselves. They are userland.
  • The GPU process mediates access to graphics hardware so that a compromised renderer cannot drive the GPU driver directly. A device driver behind a guard.
  • The network service and other utility processes isolate specific risky jobs — parsing untrusted data formats, handling the network stack — away from both the kernel and the content.
The browser as kernel and userland, with fetch as an inter-process callThe privileged browser process sits above a sandbox boundary. Below it, sandboxed renderer processes, a GPU process, and a network service run unprivileged. When a page calls fetch, the renderer sends an inter-process message up to the browser process, which performs real network and disk I/O against the host operating system and returns the bytes to the page as a message.Browser process — the privileged core (“kernel”)the only code trusted to touch the network and disk directlysandbox boundary — everything below runs unprivilegedRenderer · site A(sandboxed)rendering engine + JS engineRenderer · site B(sandboxed)rendering engine + JS engineGPU processNetwork serviceHost operating system — CPU · memory · devices① fetch() → IPC② real I/O③ bytes returned as a message
Figure 1.3 — The privilege split. A renderer cannot open a socket; it asks the browser process to. That request is an inter-process call — the web's version of a syscall — and it is the shape of every capability the platform exposes.

The crucial detail for a programmer: a renderer process cannot do anything dangerous on its own. When the page calls fetch(), the renderer does not open a connection. It sends a message — an inter-process call — to the browser process, which performs the network operation on its behalf and ships the bytes back. This is exactly a syscall: an unprivileged process asking the privileged kernel to do the thing it is not allowed to do itself, through a narrow, checkable interface. Every capability the web platform exposes is a door of this kind, and Module 7 is about who is allowed through which door.

1.6 The sandbox is the whole point

It is worth dwelling on the sandbox, because it is the single feature that most justifies the operating-system framing and the one most invisible to authors. A renderer process runs with its operating-system privileges deliberately reduced to almost nothing: on Linux through seccomp-bpf syscall filtering, on Windows through restricted tokens and job objects, on macOS through the Seatbelt sandbox. The renderer can compute, and it can talk to the browser process over IPC. It cannot, by itself, read your home directory, open a network socket, start a program, or look at another tab's memory.

Think about what this buys you. You navigate to a page. The page ships you JavaScript. That JavaScript is, from your computer's point of view, an arbitrary program written by a stranger, now executing on your hardware. On any other software platform, “run an arbitrary program from the internet” is the definition of catastrophe. On the web it is the normal case, survived billions of times a day, because the program runs inside a sandbox inside an unprivileged process behind a syscall gate. The browser made “execute untrusted code on sight” routine. That is an operating-system achievement, not a rendering one.

The sandbox is why the web could become a platform. Without it, every link would be a download you ran without asking.

1.7 Every user agent is a different machine

The phrase “the browser” is a convenient lie. There is no the browser. There is a population of user agents, each a different machine: a different rendering engine with different bugs, a different process and memory budget, a different network underneath, a different set of capabilities granted or denied, a different threat posture. The cast from The Web for Programmers is the human-readable index of that variation, and it maps onto the systems concepts in this module precisely.

1.8 The lab: meet Demo Company

From here on the series carries a running example so that none of this stays abstract. democompany.com is a deliberately tiny site whose every page is engineered to add one new idea and to print its own list of HTTP requests directly in the content. Its home page makes the smallest possible point: a document and a favicon.

/index.html /favicon.ico

Two requests. One is the program; the other is a resource the shell asks for on its own, without being told, because browsers fetch a site's icon by convention. Already the operating-system framing earns its keep: that second request did not come from anything the author wrote. It came from the user agent acting on its own policy. Throughout this series you will keep meeting requests, behaviors, and decisions that no line of HTML asked for — they are the OS doing its job around your program.

Open the site. Open DevTools to the Network panel. Reload. Watch two requests appear, and notice that the page tells you to expect exactly those two. Over the coming modules each new Demo Company page adds one resource — an image, a stylesheet, a font, a script, a frame, a remote and then a hostile resource — and the waterfall grows in a way you will be able to predict and explain rather than merely observe.

1.9 What you now have

One mental model, stated as a table and defended with history: the browser is the operating system of the web, the page is an untrusted program, and every subsequent module is a tour of one OS subsystem. You have the component decomposition — shell, browser engine, rendering engine, networking, JavaScript engine, UI backend, storage — and the reason those components are arranged the way they are: the relentless requirement to run a stranger's code safely and at speed. You have the multiprocess architecture and the reason it exists, the sandbox and why it is the platform's foundation, and the cast as a reminder that “the browser” is a population, not a thing.

Next we follow the first subsystem in motion. You press Enter on a URL. Before a single byte of HTML exists in memory, the browser parses the address, decides what kind of thing it points at, finds the server, negotiates a secure connection, and asks for the document. Module 2 is the I/O subsystem from address bar to first byte.

Stop picturing a pipe. Picture a kernel that just agreed to run a program it has never seen.