Live data from Hacker News

Xv6, a simple Unix-like teaching operating system

pdos.csail.mit.edu

41–50 of 100 posts

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

#41
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...

The way it was handled only proves the point UNIX would never had taken off outside Bell Labs, if AT&T was allowed to sell UNIX the moment it stopped being a toy project for playing games.

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

#42
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.

While microkernels play a vital role in our software ecosystem, most of the software anyone interacts with is not coordinated with a microkernel. Furthermore most of the software on the internet is not run by a microkernel, nor most of the software available on the internet. I suspect such a course would not prepare one well to either work with kernels or reason about the kernels you work with as a professional.

You right, it is run by a pile of containers in Kubernetes clusters, on top of type 1 hypervisors. The irony.

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

#43
post #40
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

NeXT you mean. Additionally, Apple has a long term roadmap to fix that design decision, hence why they are killing one kernel subsystem at a time, moving them into userspace, with one year given for the developers to adopt each of them, after being made available as the new way. Finally, it is kind of ironic that systems that have doubled down on monolithic kernels, are now used to run an endless pile of containers a…

well said

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

#44
post #26

Plan 9 is also a pretty simple codebase to understand.

One has to respect some of the design decisions behind Plan 9. Per-process namespaces, binds, and treating everything as a file provides a certain level of elegance that just isn't seen in many other Unix-like OSes.

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

#45
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.

It's not surprising Apple is moving away from kernel drivers and into userspace functionality.

That's largely a political decision because of Apple's totalitarianism.

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

#46
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…

>minix exists (though their source control system just fell offline this year),

https://git.minix3.org/index.cgi seems online?

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

#47
post #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...

The lectures are here https://pdos.csail.mit.edu/6.S081/2020/schedule.html

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

#48
post #42

Earlier quoted context omitted.

While microkernels play a vital role in our software ecosystem, most of the software anyone interacts with is not coordinated with a microkernel. Furthermore most of the software on the internet is not run by a microkernel, nor most of the software available on the internet. I suspect such a course would not prepare one well to either work with kernels or reason about the kernels you work with as a professional.

You right, it is run by a pile of containers in Kubernetes clusters, on top of type 1 hypervisors. The irony.

And? What's wrong with k8s and containerized setups?

Linux evolved numerous features over the years responding to server room challenges. Some of them look monolithic, others are decomposable, in any case linux became the default dev target platform for everything.

Minix might be nice, but linux has won, and it was NEVER about os architecture.

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

#49
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.

My comment was in the context of which is better for learning purposes. You spun my comment and turned it into mono vs micro kernel.

System Design is about trade offs. You conveniently say "expose the same structural flaws monolithic kernels do" and not mention anything about microkernels. System arch discussions are not about who "wins", but about trade offs.

> but monolithic kernels face the same problems they did in the 80s

Putting your lack of balance aside, what problems are you talking about specifically? Are you aware of how many new instructions have been added since the 80s that were designed specifically to address the shortcomings of monolithic kernels? Microkernels, even when resources were much scarcer back in the 1980s, still did not become popular.

Both designs have their use cases. Micro and mono kernels have pros and cons but for learning purposes it makes more sense to teach about monolothic kernels since all popular operating systems follow this design.

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

#50

I have ways wanted to understand the Windows NT kernel -- maybe the earlier versions as they are simpler. I heard the first version is close to VMS. Is it true? Is there any material on VMS? OpenVMS is open sourced but the version is too high.

For a good look at the development of the NT kernel, read the book show stopper from 1996. It is correct that Dave Cutler did lead a number of projects inside DEC including projects related to VMS, the only inheritance the Microsoft New Technology kernel received from VMS was spiritual at the design and architecture levels. Dave was already in the process of a major overhaul or successor to VMS when his team was shown the door at DEC and many of these visions made their way into windows at the cost of the robustness of the minicomputing established design patterns. Cutler saw the MSDOS team as rookie programmers writing themselves into spaghetti solutions for the wrong problems but papa gates had it locked up tight with the OEM contracting agreements so Bill paid him in blank checks to deal with the kids in the room and ship a real kernel to compete with what steve was cooking at NeXT.

So no, NT is nothing at all like VMS from a featureset or likeness perspective, nothing at all from an implementation perspective (VMS had beautiful clean C standard library and compiler suite), but very much was the race to the bottom by the mini crowd to play games in the micro world.

check dave plumbers interview with cutler on youtube for more color.

Post reply on HN