← Back to context

Comment by zeroxfe

3 years ago

> There's IPC. There's memory management. There's process management. There's network management. There's security. There's device management.

OSs are built on hardware, browsers are built on OSs. Even though they "sort of" do the same types of things, the abstractions are very different.

- OS memory management is more about managing hardware page tables, copy-on-write, page sharing, page protections etc. Browser memory management is typically custom allocators optimizing for different types of structures.

- OS process management is about using CPU primitives to multitask segments of code, context switching, timers, wait queues, interrupt management etc. In the browser, it's more about managing webpage/process relationships, application threading, rendering pipelines, and the JS runtime.

- OS network management is all about interfaces, packet processing, buffer management, low level protocols (ethernet, IP, etc.) Browser network management is all about protocols, and not really much about the hardware.

Sure there's a lot of broad-stroke similarity between OSs and browsers, but for a university course, where one typically gets deep into the details, they're entirely different.

I think that highly optimized browsers have to deal with memory usage and page sharing as well. And QUIC started out as a userspace implementation shipped with Chrome handling packets and such, so I think browsers and OSes are not "entirely different".