HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Design and Implementation of the FreeBSD Operating System, The

Marshall McKusick, George Neville-Neil, Robert Watson · 284 HN points · 8 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Design and Implementation of the FreeBSD Operating System, The" by Marshall McKusick, George Neville-Neil, Robert Watson.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
The most complete, authoritative technical guide to the FreeBSD kernel’s internal structure has now been extensively updated to cover all major improvements between Versions 5 and 11. Approximately one-third of this edition’s content is completely new, and another one-third has been extensively rewritten. Three long-time FreeBSD project leaders begin with a concise overview of the FreeBSD kernel’s current design and implementation. Next, they cover the FreeBSD kernel from the system-call level down–from the interface to the kernel to the hardware. Explaining key design decisions, they detail the concepts, data structures, and algorithms used in implementing each significant system facility, including process management, security, virtual memory, the I/O system, filesystems, socket IPC, and networking. This Second Edition • Explains highly scalable and lightweight virtualization using FreeBSD jails, and virtual-machine acceleration with Xen and Virtio device paravirtualization • Describes new security features such as Capsicum sandboxing and GELI cryptographic disk protection • Fully covers NFSv4 and Open Solaris ZFS support • Introduces FreeBSD’s enhanced volume management and new journaled soft updates • Explains DTrace’s fine-grained process debugging/profiling • Reflects major improvements to networking, wireless, and USB support Readers can use this guide as both a working reference and an in-depth study of a leading contemporary, portable, open source operating system. Technical and sales support professionals will discover both FreeBSD’s capabilities and its limitations. Applications developers will learn how to effectively and efficiently interface with it; system administrators will learn how to maintain, tune, and configure it; and systems programmers will learn how to extend, enhance, and interface with it. Marshall Kirk McKusick writes, consults, and teaches classes on UNIX- and BSD-related subjects. While at the University of California, Berkeley, he implemented the 4.2BSD fast filesystem. He was research computer scientist at the Berkeley Computer Systems Research Group (CSRG), overseeing development and release of 4.3BSD and 4.4BSD. He is a FreeBSD Foundation board member and a long-time FreeBSD committer. Twice president of the Usenix Association, he is also a member of ACM, IEEE, and AAAS. George V. Neville-Neil hacks, writes, teaches, and consults on security, networking, and operating systems. A FreeBSD Foundation board member, he served on the FreeBSD Core Team for four years. Since 2004, he has written the “Kode Vicious” column for Queue and Communications of the ACM. He is vice chair of ACM’s Practitioner Board and a member of Usenix Association, ACM, IEEE, and AAAS. Robert N.M. Watson is a University Lecturer in systems, security, and architecture in the Security Research Group at the University of Cambridge Computer Laboratory. He supervises advanced research in computer architecture, compilers, program analysis, operating systems, networking, and security. A FreeBSD Foundation board member, he served on the Core Team for ten years and has been a committer for fifteen years. He is a member of Usenix Association and ACM.
HN Books Rankings
  • Ranked #10 all time · view

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
The Design and Implementation of the FreeBSD Operating System, 2nd ed., in the same category.

https://www.amazon.com/dp/0321968972

I recommend (by most expensive, to free):

Marshall Kirk McKusick's FreeBSD Intensive Code Walkthrough: https://www.mckusick.com/courses/advdescrip.html

Also, The Design and Implementation of the FreeBSD Operating System (2nd Edition): https://www.amazon.com/Design-Implementation-FreeBSD-Operati...

Thirdly: grab a copy of FreeBSD (or OpenBSD) and (a) set it up in VirtualBox and SSH it into locally (b) use an old ThinkPad. Then grab the source code of the base system. Build and install it. And start reading code of things like usr.bin/grep/grep.c

antoncohen
I have't done the code walkthrough course, but I bought and watched Kirk McKusick's Kernel Internals course and it is excellent (https://www.mckusick.com/courses/introdescrip.html). It is based around FreeBSD, but is a generic enough Unix internals course that it is good for Linux.

I'm thankful to have the opportunity to learn from someone with such deep knowledge of Unix, who was involved with BSD from the early days in the 80s to modern FreeBSD.

"The Design and Implementation of the FreeBSD Operating System" not only does a great job at covering how the UFS filesystem is implemented, but also does a great job at explaining how and Unix systems are implemented. I highly recommend this book to anyone with an interest in Unix internals.

https://www.amazon.com/Design-Implementation-FreeBSD-Operati...

dekhn
Came here to say this. Fantastic book for self-learners.
vram22
Is that book similar in structure to the book "The Design of the Unix Operating System" by Maurice Bach? (or is it Design and Implementation of ... don't remember - had read it some years ago).
If you are into operating systems:

The Design and Implementation of the FreeBSD Operating System

https://www.amazon.co.uk/Design-Implementation-FreeBSD-Opera...

cperciva
Seconded. After being a FreeBSD developer for a dozen years some people might expect me to know everything this book covers, but in fact I pulled it out just last month to help me understand how some details of how the VFS layer and the NFS client worked.
weavie
I would be very impressed if anyone (human) could keep that whole book in their head!
Jul 31, 2016 · adamnemecek on FreeBSD Myths
If you haven't read the book "Design and implementation of the FreeBSD operating system" (https://www.amazon.com/Design-Implementation-FreeBSD-Operati...) you should. It's possibly the best "applied" OS book. It also contains some interesting code samples in the book which is surprisingly uncommon in comparable books.

FreeBSD has for years had some features that are only now reaching 'mainstream' popularity (e.g. jails, which containers are based on). This books explains all that in quite a bit of detail and manages to stay high level enough not to get boring with the details but gives you enough detail to have a pretty detailed understanding.

It's also one of the few books that talks about networking in very practical terms (and not like OSI layers and whatnot) which makes me say that it's also possibly one of the best books on networking (you learn quite a bit about networks from how OS's work with them).

It also has the hands down best file system around (the book also talks about that).

And unlike large parts of linux, the kernel source is actually pretty legible.

skrebbel
As a lifelong Windows user, I've always been surprised about the obsession Unix users seem to have with filesystems.

I mean, as an end user (developer, but I assume that doesn't matter), what I expect from a filesystem is:

    * let me save a file in a directory
    * let me open it again
I also appreciate how many tools can use stats (eg filemtime) for good effect, and how fine grained permissions help keep my computer secure. All filesystems I've ever used let me do these things, and have for a long time.

This probably makes me a Blub programmer in file system terms. What am I missing? Why should I be dissatisfied with NTFS? I mean, in all honesty I don't even know which filesystems my various hard drives and sd cards have - I just save and open files.

manquer
>> let me open it again This is the tricky part, you should about worry as a user

Will it open exactly the same ? How likely is data corruption ? Will it work if I mount it on another OS or another version ? Is versioning supported ? Can it save all the modifications to a file and can I roll back to previous version if I want to ?. Can I take periodic backups without copying/transferring entire drive or entire files even ? Will using "a" file system improve/change my disk life time ?

akvadrako
NTFS is a quite decent filesystem – even more so when it was introduced – and there is a lot to be said for having a one standard.

But would you really want to work with FAT or even exFAT as your main OS? It's about 20% slower and doesn't support ACLs or journaling, so you can lose data in a crash.

So filesystems matter and Linux still doesn't have a standard choice that's as good as other OSes had 5 years ago.

regularfry
The extra features and differences in the ways the filesystems work make workflows practical which, while they might be theoretically possible on older one work, are too inefficient, or need task-specific userspace tooling to achieve.

Sparse files are one example. They weren't in the original NTFS, although I'm not sure when they were introduced. If your workflow involves lots of files that happen to be mostly zeroes (which is surprisingly common), then you can save a lot of space and time by simply not writing those zeroes to disk. You could achieve the same result by compressing the files, but then everything you might want to use to manipulate those files has to be aware of that compression, and you've got added CPU overhead you might not want.

Copy-on-write snapshots are another. If you've taken a point-in-time backup and want to update it, you can take a snapshot and just copy the changed files across. That's not the clever bit, you can obviously do that with things like rsync. The clever bit is that you can make both the snapshot and the new version fully working file trees, which any of your other tools will work transparently with, and still take advantage of the space saving of the shared, unchanged parts. Again, you could mimic this by either fully copying the file tree first (in which case no space saving, and extra time to duplicate the files) or with hardlinks (which rsync does, but especially on Windows not all tools work well with).

I think one of the reasons Unix users seem to be more interested in filesystems than Windows users is that it's far, far harder to develop a new filesystem (or new filesystem features) on Windows than elsewhere. The Linux kernel interface was specifically designed to make it easy to plug new filesystem implementations in, so people have. On Windows, you're pretty much reliant on MS doing it for you, so you might not even notice when significant new NTFS features go in which would be headline news in other ecosystems. NTFS doesn't have to compete, and its users are in a sense locked in.

astrobe_
It's about how the FS does this stuff.

Take for instance the old FAT filesystem from MS-DOS. If you use it on an SD/SSD (or even a USB key, that's more or less the same tech), you're likely to burn it fast, unless the device does "wear-leveling" internally. Journaling filesystems like Ext4 avoid that by make it so that they don't overwrite again and again the same sector even if the system overwrites the same file again and again.

Another aspect is resilience to system crashes or power outages. A sudden power outage can leave data half-written, including the file allocation table, which may result in severe data corruption. This is especially important for embedded devices, but not only. Some file systems are designed with that possibility in mind.

Then there are performance considerations. FAT had to group sectors into clusters because of the limited number of FAT entries, so a little 1Kb file would actually use something like 8Kb on the disk (Windows still display both sizes BTW). There's also caching policies. If you want something "crash-proof", you don't want any write cache. But if you want something fast, you want a big cache. some filesystems pick resilience, others pick performance, others let you set the parameters you want.

wolf550e
I think you have confused journaled with log structured filesystems.
astrobe_
Yes I had.
wvh
Are you talking about high-performance high-reliability server applications, or more about end-user front-end applications?

There's a bit of a difference when it comes to running servers with thousands of users where you want to squeeze every drop of performance out of your hardware and without ever losing data, as to developing an end-user POS interface or other GUI applications. FreeBSD might be picked more often for back-end applications and Windows more for user-facing applications. It's the difference between keeping one user happy versus keeping many as happy as possible.

It probably doesn't matter much what kind of car you drive in the city centre – the requirements and limits are very different than on a race track where every little detail matters in the performance equation.

jvdh
Windows handles a lot of abstractions, to hide users from the nitty gritty details (OS X does the same thing). One of those things is hiding as much of the file system as possible.

Unix usually has users engaged at a lower level, adding a startup daemon means moving a file to a certain place. That shows that filesystems are much more the direct interface for the operating system.

Also, it is possible to have a Unix operating system, but have a completely different filesystem underneath. This is just not possible for Windows users. So there is no choice, so it is nothing Windows users think about in general.

eeZi
> FreeBSD has for years had some features that are only now reaching 'mainstream' popularity

It's also lacking a bunch of features that reached "mainstream popularity" a long time ago.

Example: ASLR, the most important exploit mitigation technique

  - 2001 - PaX Linux
  - 2003 - OpenBSD
  - 2005 - Upstream Linux
  - 2007 - Windows
  - 2007 - OS X
  - 2011 - iOS
  - 2016 - NetBSD
FreeBSD is still lacking ASLR support despite a number of attempts and an actively maintained fork.

Linux even has Kernel ASLR (even though its effectiveness is debatable and it's much better with the Grsecurity patchset).

I'm a FreeBSD user and run it on a number of firewalls, but FreeBSDs approach at security worries me and I consider porting everything to OpenBSD or Linux.

It did not even have signed packages until recently!

That was a great writeup, thanks. The author has a real talent for writing engaging explanations.

I've been making my way through The Design and Implementation of the FreeBSD operating System[1], which is a bit denser and more formal. It was nice to read about some of the same ideas in a different implementation. I'd recommend the book to anybody who enjoyed the post.

[1] http://www.amazon.com/Design-Implementation-FreeBSD-Operatin...

dimonomid
Thank you for such a positive feedback!

And thanks for sharing the book, I'll probably get to it. I've read a couple of books on Linux Kernel before writing TNeo, but haven't read anything on FreeBSD yet.

Nov 02, 2014 · aperture on FreeBSD turns 21
Wow! I just realized FreeBSD is about as old as I am! FreeBSD is a great system, and going from Windows to Ubuntu to FreeBSD was a fun transition, one I recommend for anybody willing to learn more about computers.

Recently a new book came out too for FreeBSD, I'll see if I can post it here without some sort of referral link: http://www.amazon.com/dp/0321968972/ref=wl_it_dp_o_pd_nS_ttl...

I managed to get one of my professors to purchase the book as well, and it was a nice piece of material for Intro to Operating Systems.

profquail
I saw a promotion for Design and Implementation of the FreeBSD Operating System, 2nd. ed this morning, in case anyone is considering purchasing the book. If you buy it direct from the publisher[1], there is a coupon code [2] for 35% off -- bringing the price down to a very reasonable $36.

[1] http://www.informit.com/store/design-and-implementation-of-t...

[2] https://twitter.com/MeetBSDCA/status/528659641106837504

Sep 17, 2014 · 195 points, 55 comments · submitted by todd8
mwcampbell
A DRM-free ebook is available here:

http://www.informit.com/store/design-and-implementation-of-t...

omnibrain
Can anyone with an account please check how much shipping to germany costs? I don't want to set up an account with another site just to check shipping costs. I can get the book from Amazon but the Bok + eBook bundle informit offers looks attractive, but it all depends on the shipping costs.
benjarrell
I tried with the shipping address to the German Parliment (taken from https://www.bundestag.de/htdocs_e/visits/hinweis)

Platz der Republik 1 Berlin 11011 Germany

International shipping -- $9.00

omnibrain
Thanks.
craftkiller
The FreeBSD foundation is one of the charities that smile.amazon.com donates to, so if you're not already using it, consider purchasing the booking through smile.amazon.com so 0.5% of your purchase goes to them.
aristus
I audited McKusick's kernel class at Berkeley extension. 8 hour sessions every Saturday for a couple of months. I don't have a formal CS background but at the time had 10-12 years of professional experience. It was the most useful class I have ever taken, removing the magic behind the OS.
Someone1234
Was that online?
KedarMhaswade
You can register here: https://www.mckusick.com/courses/introinterestform.html and if you are not in the Bay Area, you could buy the videos.
jrapdx3
As a long-time user of FBSD (since 4.x), the book looks like it's quite comprehensive. Keeping up with all the recent changes is difficult, and this detailed reference covers an impressive range of topics (as far as I can determine from the preview), particularly newer and updated features like the Capsicum framework, security features, ZFS, geom among others.

One disappointment is the book doesn't have much to say about UEFI and Secure Boot, which will be important to easily integrate FBSD with other systems on current PC hardware. Understandable though, as they're still in development and the authors not yet ready to discuss it.

For an 800+ page book the price is rather modest. Looks like one that will have to go on my "must get" list.

gonzo
UEFI just went into FreeBSD (it might make 10.1-RELEASE)

In other words: it's too early.

kev009
The UEFI memstick works for me. But there's no EFI ZFS boot loader, root on ZFS is an open feature still.
Tomte
But the book claims to "cover all major improvements between Versions 5 and 11". :-)
tkinom
Feel the Force, Read the Source! :-)
cperciva
UEFI is in 10.1-BETA1, so I think it's safe to assume that it will be in 10.1-RELEASE. ;-)
digitailor
If it wasn't ready by print date, it would be a very ugly section. ;) None of the tools people have made to get BIOS 'nixes to install on UEFI worked for me. (Debian still has no install for UEFI.) Maybe this process would work for FreeBSD. Here's what I had to do to get crunchbang going on a 2009 MacBook Pro (which is UEFI):

  1. Install Linux Mint via USB thumbdrive (Ubuntu has UEFI support)
     Use to format and partition destinination drive appropriately
  2. install grml-rescueboot
  3. cp crunchbang .iso to /boot/grml-rescueboot
  4. In the grub CLI (that 40x80 first stage GRUB prompt), set the $root variable
  5. > linux ($root)/install/vmlinux
     > initrd ($root)/install/initrd.*
  6. Insert Crunchbang install DVD, locate CDROM drive in the GRUB CLI
     (enjoy finding things in the 40x80 context)
  7. Install, reboot, sudo update-grub, reboot
  8. Celebrate, and then weep bitterly because it took ten hours to figure out
Bonus: Apple's bootloader is now gone, speeding things up and removing an extra bootup selection. Straight to GRUB.

Does anyone know if this process might work for 'BSD? Haven't installed one since the mid-2000s.

dmm
> Debian still has no install for UEFI.

It works fine for me? What's missing? I installed Debian on a UEFI system with gpt disk sometime around May 2013 and it's been running fine since.

https://www.debian.org/releases/stable/amd64/ch03s06.html.en...

None
None
digitailor
Yes you're right, except I wasn't able to get a Debian install image to burn to a thumb drive the Mac would recognize. That's why I had to use Mint. Unfortunately, for this particular MBP there are no nvidia drivers that work well or at all in Mint, so I went the masochistic #! install route. I'm glad I did though.
Kurtz79
It's about Ubuntu, but using this I was able to create a bootable USB drive with rEFIt, and then booting a FreeBSD live CD image on another stick for installing.

http://www.michaelevans.org/blog/2013/01/15/boot-ubuntu-from...

josteink
First this:

> Debian still has no install for UEFI.

Then this:

> I wasn't able to get a Debian install image to burn to a thumb drive the Mac would recognize

Blaming Debian for the locked down nature of Macs and the general shortcomings of Apple-computers for hacking-purposes seems a bit far-fetched.

Get a laptop not made by patent-trolls, and you may expect better Debian-support.

Kurtz79
I don't think he is blaming Debian in any way.
digitailor
Something got lost in translation- I use Debian exclusively as my Linux distro, and Crunchbang is a thin veneer over it. It was a lot of effort to get it going on that MacBook and worth every hour. The distro has zero responsibility to support Mac hardware, but they were close, and the last mile was my job. That's entirely reasonable.

Do you know how happy I was to figure out how to get the Apple bootloader off of the machine? Joyous! I was proud ;)

przemoc
I was never into FreeBSD (I hoped to dive into it more in the past, but never done so sadly), but heard that 1st ed was really good, so the revised version quite likely shouldn't be any worse (hopefully even better). I would order it, but there are still many technical books on my shelf waiting for my attention, thus adding another one will not help in that matter.

One thing is sure, even if you're not into FreeBSD, broadening your perspective is never wrong. So I may eventually order it in the future.

umanwizard
FreeBSD combined with this book is great for learning about operating systems in general, regardless of whether you care about FreeBSD specifically. The book goes into a lot of detail about why certain design decisions were made, and how things are implemented in other operating systems.

If you're already studied some other OS in general, you might not need this book, but if you haven't, this is a great place to start.

KedarMhaswade
Thanks! Do you think it's useful to get this one even if you have used Linux almost exclusively? Will it make it easier for one to get into Kernel development?
truncate
I've worked a little on kernel. I think it would surely help to get into kernel development. Codebase is different, but they share similar architecture. If you understand one, it wont be hard to get started with other. From my experience I found BSD codebase easier to approach than Linux.
count
Yes. I'd also get 'Modern Operating Systems' by Tannenbaum, which will explain lots of stuff that might be opaque/confusing if you're not already a kernel guy.
pjmlp
Personally I would say yes, as it shows not all UNIXes are alike.
umanwizard
Sure. But it's worth having a FreeBSD box (or VM) that you can use to tinker with the kernel.

Recompiling FreeBSD kernel source is super easy, by the way. It comes in /usr/src on your machine and all you need to do to reinstall one with your changes is "make buildkernel && make installkernel" . Actually understanding the sometimes decades-old source code, on the other hand, might be a little more difficult...

KedarMhaswade
How'd you compare this with Linux Kernel Development by Robert Love and/or Bovet/Cesati, especially for someone who's a newbie (but curious to learn and work hard)?
jonaldomo
For those of you who get to use this knowledge in your day to day jobs what kind of things are you working on?
lsllc
My copy arrived yesterday. A real old-school textbook; reminds me of the days of poring over "Modern Operating Systems" in college!
incision
Mine arrived yesterday.

The size and heft of the print book is a welcome surprise, it's something that you could toss in a bag and hold to read without support (2.7 lbs, 9.4x6.4x1.4) - relevant for something that will eventually be shelved among stuff like "The Linux Programming Interface" (5 lbs, 9.5x7.2x2.3)

Rapzid
TLPI is my favourite book(technical book I own). Sometimes I look over at it and think "Man, what a great book". I'm very tempted to purchase this as well :)
nomadlogic
These books are pretty much a must read for anyone interested in the internals of Unix-type systems. I keep them right next to my TCP/IP Illustrated volumes, I reckon it's always good to have good reference material handy - especially when it is well written and researched.
danso
You sold me. I'm not particularly interested in knowing enough about FreeBSD to diagnose anything non-trivial, but I am interested in learning about design decisions behind operating systems.
samuel
This book is great, even if you don't use FreeBSD. I remember that I learnt how a TLB/MMU really works by reading this book, and not on an Operating Systems lecture.
snlacks
Would HN-commenters recommend this (based off of experience with either edition) over other OS books for a self-teaching CS Curriculum?

Do you agree that picking one OS to study is the best way to learn about Operating Systems generally?

gabriel
I've read many theory and hands-on OS books and this book (the 1st Ed) is my favorite. But it is a dense book! Quite awesomely dense to be honest. One OS to study will certainly help (it helped me) to fully understand why the theory can be useful. This book especially can help make the connection between theory and practice.
snlacks
I'll check it out, thanks. It might come in handy after I read a couple other books.
kasperset
This should also help you: http://pages.cs.wisc.edu/~remzi/OSTEP/
snlacks
Wow! Thank you.
michaelsbradley
Is there a comparable, relatively up-to-date book for Linux?
mwcampbell
To be comparably authoritative, I guess a book like this for Linux would have to be written by Linus Torvalds or another senior Linux kernel developer.
incision
Not exactly.

What really sets this book apart, in my opinion, is just how readable it is. I haven't run across anything with quite the same combination of style and depth for Linux.

You could read through something like The Linux Programming Interface [1] or Understanding the Linux Kernel [2] and with effort extract much of the same information, but without the pace/structure/commentary that I think this book does so well.

Thing is, conceptually much of what you'll read in this book will be applicable to Linux just fine and having read it will make it far easier to grok how/where the two differ.

1: http://www.amazon.com/dp/1593272200 2: http://www.amazon.com/dp/0596005652

pkaye
What are the major changes from the 1st edition? I had bought the old one just a few months back...
rdc12
Has anything important from the first edition been omitted from the second?
cms07
The first edition is quite good. I'm sure the 2nd is just as good.
None
None
cbd1984
It seems odd that this book is only about the kernel, given that the BSD camp has always said that an advantage of a BSD over Linux is that a BSD is the whole package, from the GUI and command shell on down, whereas Linux is 'just' the kernel, and relies on distros to be usable.
kev009
The userland would be harder to write a long lasting book on. It's prone to change between major version numbers.. for instance clang/c++ RT/etc. It would be cool to see a volume on this stuff, but it would probably need a ton of authors and be more like a series of exposes (thinking a book like Architecture of Open Source Applications)
muhahahaehh
Don't forget: http://www.openbsdfoundation.org/
takeda
What this link has to do with the book?
darkandbrooding
Oh man, now you've triggered my OCD and I feel pedantic.

https://www.freebsdfoundation.org/

ChuckMcM
I have a very dog eared copy of the first edition and ordered this one. I also bought a copy of the CS class that Kirk taught at UCB on VHS video tape back when I was at NetApp.

I sort of think of three books as being core of a curriculum understanding operating systems, this book, "The Design of the UNIX Operating System"[1] by Bach, and "Operating System Concepts" by Silbershatz. Owning and understanding those three texts will give you everything you need to know about working in the kernel and designing your own OS code.

[1] www.amazon.com/Design-UNIX-Operating-System/dp/0132017997/

[2] www.amazon.com/Operating-System-Concepts-Abraham-Silberschatz/dp/1118063333/

kqr2
It looks like the lecture videos are still available, however, they are somewhat expensive.

https://www.mckusick.com/courses/index.html

https://www.mckusick.com/courses/introorderform.html

allegory
That's actually quite cheap as training materials go.
Mar 30, 2014 · 85 points, 25 comments · submitted by adamnemecek
linhat
The only non-FreeBSD systems I have to deal with by now are my Cellphone (Android) and my TV (funny enough, also Android). Made the switch from YOUR_FAVOURITE_LINUX_FLAVOUR after having to deal with (st)Ubuntu way too much at work.

Nonetheless, as much I prefer running FreeBSD on any kind of server system (as I have been for years), after using it on my (fairly new) laptop for a couple months now, I really wish there was better (new and shiny) hardware support (a commonly acknowledged FreeBSD deficiency, so yeah, I knew what I was getting myself into). Given, I only bought it because my old laptop was stolen at work, it belonging to the Haswell family did not really help (no internal WiFi [Intel IWN 7260], no hardware accelerated graphics [HD4400] and so forth...). But hey, who am I to complain, time to get hacking, which I suppose is more in the spirit of the BSD culture anyway and I'm not going back to NIX.

So yeah, glad this book got updated, most likely picking up this new edition...

geekam
I want to start learning internals of nix systems. Is this a good book to start with? Or is there a book on Linux (or any other nix OS) that I should begin with?
myg204
I recommend the xv6 source and commentary. Here's the link: http://pdos.csail.mit.edu/6.828/2012/xv6.html (has a pdf you can print out along with C code listing, and with nice references). It's very similar in idea to Lyon's commentary but with a more modern C code base.
matt_heimer
A little older but "The Magic Garden Explained: The Internals of UNIX System V Release 4, An Open Systems Design" is a really well written book for the core UNIX concepts.
adamnemecek
That kind of depends on your background. I think that this book is recommended in some OS college courses as complementary reading since it describes a full blown OS and not some simpler OS that might be better suited for teaching purposes. You might want to find some OS college course that has materials available online, work through that and read this as you go along or when you are done with the course.
JSno
dont waste your time on BSD anymore. Linux dominates.
ketralnis
Oh I'm sorry, we'll all stop using our own favourite toys and start using your favourite toys.

Sorry for the inconvenience.

adamnemecek
You don't know what you are talking about.
stormqloud
So not true.

FreeBSD is a great server OS. With VM's hardware support gets less important for some use cases. IE LAMP.

The ports selection in FreeBSD is second to none. Linux has nothing close.

JuniperOS is retooled freebsd.

Lots of imbedded projects are based on BSD and always will be. The insanity of GPL licensing.

GPL3 is for activists and manifesto's. LGPL, GPL2 more then covered it for non activists.

dscrd
>The ports selection in FreeBSD is second to none. Linux has nothing close.

Well... I don't know about that. The Debian repositories seem quite close to that offering, at least by their breadth. Arch Linux's core repositories offer a high quality up-to-date minimal set, while their community and AUR repos offer a very wide set of 3rd party software, even if the latter is not always reliable.

Even though I like a lot about FreeBSD, I always found the ports the most awkward and error-prone part of it. And it's far too flexible, which for me was not worth the burden.

herokusaki
>With VM's hardware support gets less important for some use cases.

Speaking of, I wish jail-based FreeBSD VPSs were more widely available and cheaper. Where I've seen them the price is such that their use is hard to justify compared to Linux containers on RamNode or Digital Ocean.

nnq
> jail-based FreeBSD VPSs

Isn't this called "shared FreeBSD hosting with shell access"? Like http://djangoeurope.com/ used to be, I think (I see they're Debian based now)...

Sanddancer
No. FreeBSD jails are different from a chroot jail -- it's much closer than OpenVZ than to something like Xen. You're running the core OS's kernel, but you have your own userland, namespaces, process space, etc.
throwaway812
> The ports selection in FreeBSD is second to none. Linux has nothing close.

[citation needed].

If you mean Linux-just-the-kernel, sure? But that's not really comparable.

Every Linux distro has a collection of 3rd-party packages; neither FreeBSD's 3rd party package integration (ports) nor breadth of software is particularly exceptional in this space.

And FreeBSD doesn't seem to attract as many volunteers to keep its port collection up to date, or at least that has been my experience.

> Lots of imbedded projects are based on BSD and always will be. The insanity of GPL licensing.

Sure. I work on a BSD-derived embedded system at $DAYJOB. But the GPL doesn't prevent Linux use in lots of spaces.

stormqloud
GPL3 certainly does.

Linux itself is fine with the GPL. Thats an OS only.

The problem is usually the Linux dist. Their solution to the packages problem is to include the kitchen sink.

Licensing is along the lines of "what's that". Ergo you use FreeBSD (or one of the others) when you need to have something to satisfy lawyers.

It's all tracked.

Companies can modify some minor bit for their "secret sauce" and bundle it up inside the vacuum cleaner. Not the hacker version.

Since the internet of the future is the "internet of things" that's kinda important.

throwaway812
GPLv3 doesn't see very widespread use.

Fedora tracks licenses on a package by package basis. You can fairly easily determine what the license of a library you use is, and recursively examine dependencies to see if there is something objectionable in there.

FreeBSD ships GPLv3 ports (gcc47, ...). So... it's not just smooth sailing there, either.

No need to hate on either platform.

adamnemecek
> JuniperOS is retooled freebsd.

Same with Orbis OS, the OS powering PS4.

samuel
And NetApp's Data ONTAP...
cperciva
If you want to understand how operating systems work, this is a very good book to start with.

If you just want to learn enough to be able to use unix, look for something else. As the title says, this book is about design and implementation, not usage.

geekam
I want to understand how Operating Systems work. Thanks.

I did read the theory of OS by Silberschatz, Galvin et. al. I needed something that had more real-world orientation with source code references.

Nzen
To see another way that operating systems (could) have gone, you could read about Niklaus Wirth's Oberon system that Zurich university still uses and develops on. He & Jurg Gutknecht designed/built the system from processor & peripherals to the language and end user applications. Total stack consistency.

* a better motivation: http://ignorethecode.net/blog/2009/04/22/oberon/ * Project Oberon pdf: http://www.inf.ethz.ch/personal/wirth/ * development branch head: http://bluebottle.ethz.ch/

hadoukenio
First edition was a great book. For anyone interested in other OS dev books, I highly recommend:

  - Design and Implementation of the UNIX Operating System (Maurice J. Bach)
  - Modern Operating Systems (Andrew S. Tanenbaum)
  - Operating Systems Design and Implementation (Andrew S. Tanenbaum)
  - Linux Core Kernel Commentary (Scott Andrew Maxwell)
kriro
Or if you are a bit less technical "The Elements of Computing Systems". A very good book for the "I taught myself how to program and now I'm curious about OSdev" crowd.

[adding to the off topic rant: I generally agree but off the top of my head "Schrödinger programmiert Java" and the entire Schrödinger... series are decent and hit the typical US-style tone. Not sure if you count a programming book as a technical book though :)]

wink
Moreover there were hardly any tech books besides those 2 by Tanenbaum that I thorougly enjoyed reading as much. Not quite like a novel, but surely not as dry as usual.

Queue mildly relevant rant: I've never seen a German technical author hit the casual tone that American authors are a lot better at. Originally German tech books usually are as fun reading as manuals to a device and not entertaining at all...

matt_heimer
Mr. Tanenbaum seems like a nice guy. I gave away a copy of Operating Systems Design and Implementation for my osdev website a couple years ago and asked him if he'd sign a copy if I sent it to him. He apologized for not having spare copies to give away and he paid to ship the book even though I told him I would.
HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ [email protected]
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.