Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Unix v6 was released in 1975. “It was roughly 9,000 lines of code,”

has anyone perused it? 9k is tiny.. is there any value, either direct or extrapolated, in lending it the mindshare?



As abecedarius says, there's a good commentary on it in the Lions book (https://en.wikipedia.org/wiki/Lions'_Commentary_on_UNIX_6th_...). That was reprinted in the late 90s when I was at university and I read through it then. I think it is worthwhile still, with caveats. The C dialect is ancient (pre-K&R), some of the algorithms are rather naive, and the whole thing is "oriented towards a machine that is little more than a memory", to quote the reprint's introduction. That said, the commentary is excellent (giving enough hints to enlighten but often requiring you to work through the detail yourself as a teaching mechanism), and the whole thing is real production code that gives you a feel for how a complete Unix-ish kernel is structured (which still applies to modern kernels, much as a housecat and an elephant have clear skeletal similarities despite massive differences in scale and features).

xv6 (https://en.wikipedia.org/wiki/Xv6) is a modern (x86/ANSI C) but similarly sized kernel designed for teaching purposes and to avoid the awkward obsolete-architecture-and-compiler aspects of the original 6th Ed code. If you can live with the PDP-11 assembly and ancient C (and not being able to run the code) I'd recommend the original, though.


Who says you can't run the code? Sure, few people have a real PDP-11/{40,45,70} these days but if you only care about the software using an emulator is perfectly acceptable.


I highly recommend checking out https://github.com/mit-pdos/xv6-public/


I have, and it was actually quite interesting and straightforward to understand. The style may seem extremely terse to those not accustomed to it, but I find it actually helps with no UltraLongAndRedundantlyVerbose identifiers to get in the way of seeing the structure and flow. Lions' book is a good guide, but I recommend reading and understanding the code first and resorting to Lions only when you get stuck.


That was just the kernel. There's a classic book by Lions adding commentary to the listings.


I guess that would count as virtual antiquing?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: