Live data from Hacker News

Xv6, a simple Unix-like teaching operating system

pdos.csail.mit.edu

21–30 of 100 posts

Re: Xv6, a simple Unix-like teaching operating system

#21
post #12

Why Unix v6? Why teach with a 50 years old design? I feel to teach the fundamentals of an operating system, i.e. scheduling, IPC, address space management, a microkernel design would be better.

a lot of people agree with you, which is why minix exists (though their source control system just fell offline this year), but none of windows nt, linux, os/360, and even really macos/ios are microkernel designs. sel4 and the other l4 variants are, and so is qnx, and linuxcnc runs linux under a microkernel, and xen is kind of a microkernel if you look at it funny, so we're definitely seeing significant mainstream use of microkernels, but it's not clear that that 50-year-old design is actually obsolete the way the pdp-11, the cray-1, and the system/370 are

Re: Xv6, a simple Unix-like teaching operating system

#22
post #17

Earlier quoted context omitted.

Vonn Neumann architecture is 80 yrs old. Why is it relevant how long a design is if it's still the most relevant and widely used one? The basic abstractions of unix v6 still holds to this day. The main difference between Microkernels and Monolithic is how address space get to be shared between userland and kernel. I don't see how microkernel design would be "better". Why teach a design that isn't widely used?

The Vonn Neumann architecture does not expose the same structural flaws monolithic kernels do—namely, their (of course tendency in modern computing to be) massive size and their failure scenarios in the event of a problem. Old is not always a problem, but monolithic kernels face the same problems they did in the 80s. It's not surprising Apple is moving away from kernel drivers and into userspace functionality.

apple started with mach, which was a microkernel, and linked basically all of the freebsd kernel into it, morphing it from a microkernel operating system into a monolithic operating system

i agree that monolithic kernels are unpleasant and brittle, but unfortunately they don't actually seem to be obsolete

Re: Xv6, a simple Unix-like teaching operating system

#24

Took this class at MIT. 20/10 would recommend, especially for people who don't come from a systems background. The textbook is quite easy to understand and the labs are a very good check of your comprehension. Just maybe skip the network driver on the first go around :P

Thanks! Do you know if the course is taught online? I couldn't find any lecture recordings on OpenCourseWare. I did find this YouTube playlist about xv6[1], which looks very good, but it's not from MIT.

[1]: https://www.youtube.com/playlist?list=PLbtzT1TYeoMhTPzyTZboW...

Re: Xv6, a simple Unix-like teaching operating system

#25
post #22

Earlier quoted context omitted.

The Vonn Neumann architecture does not expose the same structural flaws monolithic kernels do—namely, their (of course tendency in modern computing to be) massive size and their failure scenarios in the event of a problem. Old is not always a problem, but monolithic kernels face the same problems they did in the 80s. It's not surprising Apple is moving away from kernel drivers and into userspace functionality.

apple started with mach, which was a microkernel, and linked basically all of the freebsd kernel into it, morphing it from a microkernel operating system into a monolithic operating system i agree that monolithic kernels are unpleasant and brittle, but unfortunately they don't actually seem to be obsolete

> apple started with mach, which was a microkernel, and linked basically all of the freebsd kernel into it, morphing it from a microkernel operating system into a monolithic operating system

The microkernel aspect of it had completely vanished by the time they hit the general public.

> i agree that monolithic kernels are unpleasant and brittle, but unfortunately they don't actually seem to be obsolete

Of course they aren't obsolete! The security in your phone depends directly on sel4, at least if you use an apple device. They just aren't relevant to most of the compute and most of the software you interact with today or in all of history.

Re: Xv6, a simple Unix-like teaching operating system

#28
post #12

Why Unix v6? Why teach with a 50 years old design? I feel to teach the fundamentals of an operating system, i.e. scheduling, IPC, address space management, a microkernel design would be better.

Lion's Commentary on Unix is a classic tome on the subject, but unfortunately was illegal for quite some time.

https://en.wikipedia.org/wiki/A_Commentary_on_the_UNIX_Opera...

Re: Xv6, a simple Unix-like teaching operating system

#29
post #21
post #12

Why Unix v6? Why teach with a 50 years old design? I feel to teach the fundamentals of an operating system, i.e. scheduling, IPC, address space management, a microkernel design would be better.

a lot of people agree with you, which is why minix exists (though their source control system just fell offline this year), but none of windows nt, linux, os/360, and even really macos/ios are microkernel designs. sel4 and the other l4 variants are, and so is qnx, and linuxcnc runs linux under a microkernel, and xen is kind of a microkernel if you look at it funny, so we're definitely seeing significant mainstream us…

Actually, z/OS (descendant of System/370) is more microkernel than Linux is. But the problem with microkernels is similar to the problem with microservices - you have to make the executive decisions somewhere, and that unfortunately ends up being the bulk of "business logic" that the OS does.

In theory, I like the concept of functional core, imperative shell - the imperative shell provides various functions as a kind of APIs, and the functional core handles all the business logic that involves the connections between the APIs. (It's also sometimes called hexagonal architecture.)

However, it is questionable whether it actually reduces complexity; I daresay it doesn't. Every interaction of different shell APIs (or even every interaction that serves a certain purpose) needs a controller in the core that makes decisions and mediates this interaction.

So when you split it up, you end up with more bureaucracy (something needs to call these APIs in between all the services) which brings additional overhead, but it's not clear whether the system as a whole has actually become easier to understand. There might also be some benefit in terms of testability, but it's also unclear if it is all that helpful because most of the bugs will then move to the functional core making wrong decisions.

Re: Xv6, a simple Unix-like teaching operating system

#30
post #22

Earlier quoted context omitted.

apple started with mach, which was a microkernel, and linked basically all of the freebsd kernel into it, morphing it from a microkernel operating system into a monolithic operating system i agree that monolithic kernels are unpleasant and brittle, but unfortunately they don't actually seem to be obsolete

> apple started with mach, which was a microkernel, and linked basically all of the freebsd kernel into it, morphing it from a microkernel operating system into a monolithic operating system The microkernel aspect of it had completely vanished by the time they hit the general public. > i agree that monolithic kernels are unpleasant and brittle, but unfortunately they don't actually seem to be obsolete Of course they…

you seem to have thought i said 'unfortunately microkernels aren't obsolete', but that is the opposite of what i said
Post reply on HN