7 ms·
Yes! I'm so happy to see this featured on HN. You'll be fascinated by the topics presented in xv6. Have you ever: - ... Wondered how a filesystem can survive
by sillysaurus2 13y ago
Yes! I'm so happy to see this featured on HN. You'll be fascinated by the topics presented in xv6.
Have you ever:
- ... Wondered how a filesystem can survive a power outage?
- ... Wondered how to organize C code?
- ... Wondered how memory allocation works?
- ... Wondered how memory paging works?
- ... Wondered about the difference between a kernel function and a userspace function?
- ... Wondered how a shell works? (How it parses your commands, or how to write your own, etc)
- ... Wondered how a mutex can be implemented? Or how to have multiple threads executing safely?
- How multiple processes are scheduled by the OS? Priority, etc?
- How permissions are enforced by the OS? Security model? Why Unix won while Multics didn't (simplicity)?
- How piping works? Stdin/stdout and how to compose them together to build complicated systems without drowning in complexity?
- So much more!
I credit studying xv6 as being one of the most important decisions I've made; up there with learning vim or emacs, or touch typing. This is foundational knowledge which will serve you the rest of your life in a thousand ways, both subtle and overt. Spend a weekend or two dissecting xv6 and you'll love yourself for it later. (Be sure to study the book, not just the source code. It's freely available online. The source code is also distributed as a PDF, which seems strange till you start reading the book. Both PDFs are meant to be read simultaneously, rather than each alone.)
- mwcampbell 13y ago> Why Unix won while Multics didn't (simplicity)? Considering how many not-so-simple systems have succeeded in the market, I suspect that the real reasons for the failure of Multics are more nuanced.
- angersock 13y agoEh? How do you figure?
- bodyfour 13y agoI'm not the commenter you're replying to, but I'll take a crack. Saying it was a matter of "simplicity" glosses over too many of the details to be useful. Also consider that many things that early UNIX didn't include from multics got added back later (memory mapped files, dynamic linking, symlinks, ...) so by that measure it was maybe too simple. A few points to consider: * Multics was a joint project, and each participant had different levels of commitment and priorities for the project. This wasn't a recipe for success (see also: Taligent, OS/2) * Hardware. UNIX moved to the PDP-11 soon after that machine became available. That machine went on to become the smash hit of the decade, especially in academia. The GE and Honeywell mainframes that Multics ran on continued their decades-long loss to IBM. I've often wondered how different history would be if Bell Labs had bought any other minicomputer for the project. Probably today UNIX would only be known as a bunch of research papers. By skill or by luck they landed on the platform that would let their creation spread. * Language choice. When the Multics project kicked off, using PL/I seemed like a progressive choice. After all, it had been designed by all the right committees! However, PL/I only had a moment in the sun. To me, the single most impressive thing about the original UNIX team was that they also built C at the same time. This created a virtuous cycle where language-geeks wanted to use C (and thus wanted UNIX) and OS geeks wanted UNIX (and ended up learning C). If PL/I had lived up to its billing of being the true successor to Algol then C might not have had a void to fill and this cycle wouldn't be possible. * Being born to the right (corporate) parent. Building even a small OS at that time cost quite a bit of money: not only to pay bright people for years to work on it, but to buy the minicomputers they needed. Bell labs had the resources and interest to do this but, uniquely, couldn't meaningfully productize it (due to their status as the telephone monopoly at the time) This meant that in the early days it was near-free, source code included. If UNIX had instead been developed inside of a computer company it would have been turned into an exclusive product and probably wouldn't have spread so far in its early days. Bell labs was one of the few organizations outside academia that would have done this. * Just plain talent. The UNIX guys were, of course, flat out brilliant. Take pipes for example. Multics had the ability for processes to be chained, but it wasn't recognized as a first-class feature.. they were still thinking of programs as usually being separate beasts. The flash of insight was "this would be super-useful if all programs behaved this way and if the shell made it easy to construct" It's not a matter of "simplicity", but that they simply saw the problem in different way than everyone who came before. In short, UNIX was just damn good. Certainly UNIX started out as a simple system, and that was part of its success. However, other things have been simple and never went anywhere. The point I'm trying to make is that to understand why UNIX won you need to consider a lot more of the history.
- deleted 13y ago[deleted]
- justin66 13y agoThe quick, short example is VMS and Windows NT, two systems which were quite successful and not so simple.
- ChickeNES 13y agoInterestingly, both of those were worked on by Dave Cutler originally at DEC before being hired by Microsoft.
- manish_gill 13y agoWow, this comment made me look twice at the OP and now I want to really give this a go! Are there any other versions of this class for videos/lecture notes? The links in OP seem to be dead.
- ash 13y agoYes, there are lecture videos and notes from 2011 course: http://pdos.csail.mit.edu/6.828/2011/schedule.html http://pdos.csail.mit.edu/6.828/2011/schedule.html
- chris_wot 13y agoThere's a 2012 schedule also: http://pdos.csail.mit.edu/6.828/2012/schedule.html http://pdos.csail.mit.edu/6.828/2012/schedule.html
- paul_milligram 13y agoI'm sold. Based on your experience, would this course be approachable for self-study by individuals without 3 years of CS education? The MIT page[1] suggests the intended audience for the class are seniors and graduate students (M.Eng and PhD). [1] http://pdos.csail.mit.edu/6.828/2012/general.html http://pdos.csail.mit.edu/6.828/2012/general.html
- DigitalJack 13y agoIn my opinion, the 3 years of CS has more to do with age of the student than actual learning. With a requisite level of maturity, this should not be a problem.
- sillysaurus2 13y agoI wish I'd studied xv6 in my early teens. It would've answered many of my inexperienced questions and served as a guide for how to write quality code and architect large systems. For what it's worth, I was able to learn xv6 just by working hard to understand everything fully. Effort seems to matter more than prerequisites. Plus it was a fun challenge. Also, please feel free to email me (sillysaurus2 at gmail) if I can be of assistance to anyone, e.g. by talking about some nuance of unix architecture or about anything at all. Intensive self-study can sometimes feel overwhelming, so feel free to message me for encouragement.
- chamakits 13y agoI'll definitely add this to my "List of things to read" A bit off topic, but you really know how to sell things :D
- UNIXgod 13y agohttp://www.multicians.org/myths.html http://www.multicians.org/myths.html