Comment by gnull

3 years ago

> IPC, memory management, process management, network management.

I imagine the non-trivial parts of these are done for the JS VM (correct me if I'm wrong), and therefore a VM design course would have more intersection with Browsers with respect to these disciplines than an OS course.

> security

This one is everywhere, it has no special connection to OSes.

> They all happen at a slightly higher layer

Slightly?! That's an understatement of the week! The difference in abstraction levels is huge here and the specifics of the two levels are very, very different.

> in terms of what you need to know, an OS class or three is definitely helpful

Sure. But I think it's as useful as any systems programming course. I can agree that systems programming is a good preliminary for both Browsers and OSes, and learning either of the two will teach you a good deal about systems programming, but I doubt they will repeat each other.

These are all part of the browser outside the VM too.

Multi-process architecture requires you to think deeply about IPC.

Memory management is all over the place - there isn't a browser without custom allocators, investment into GC, etc.

Process management -> see multi-process architecture.

Network management: Browsers need to handle a tremendous amount of network issues. I mean... that's what they do. Outside of the VM, too.

As for "security is everywhere" - the whole point of an OS (and a browser) is to make it possible for security to be everywhere. To provide the primitives that you can securely build on.

> Slightly?! That's an understatement of the week!

Not really, no. I've worked on embedded networking stacks, on full-fledged OSs, and on browsers. I stand by "slightly". Yes, granted, a browser doesn't get quite as bit-fiddly as a on-the-metal OS, but it's a matter of degrees, not quality.

Can you work on many areas of a browser without ever touching OS-like code? Absolutely. This particular book has a good chance of avoiding most, because it focuses on the rendering part.

But a browser, as a whole, provides an abstracted platform just like an OS. And it echoes many concepts, if in slightly different forms.

  • I think a good example of two solutions used in browsers and OSes that are meaningfully similar (and not inherent to all systems software) would convince me better. Do you have one?

The security problems of a browser are very similar to the security problems of a traditional mainframe OS.

You need to execute potentially malicious code in isolated containers (processes / pages). You need to protect the system from these processes, and protect these processes from one another. You need to run some code with elevated privileges / additional capabilities (setuid / permissioned APIs), including some with superuser privileges (root user processes / browser extensions).