Live data from Hacker News

Ask HN: Do you understand your operating system?

news.ycombinator.com

1–10 of 21 posts

Ask HN: Do you understand your operating system?

#1
Dear HN readers,

this is something that bugs me for quite some time, therefore I decided to ask around:

Do you feel like you understand your OS? Have you really have acquired the feeling of trust and mastering its (inner) complexities? And, most obvious: do you care about this?

This question affects free OSes a lot more than proprietary ones, obviously, so if you care, it'd be great to hear from your experienced feelings corresponding to the OS you use or used, as well as the depth your technical understanding had to reach in order to gain the experience of 'groking it'.

I hope that's not too vague, maybe it helps to tell you that this question popped into my mind when I thought about switching from GNU/Linux to *BSD once again, this time hoping to leave some mysteries behind.

Re: Ask HN: Do you understand your operating system?

#3
I care and I think I pretty much get what's going on under the hood of my Linux boxes as they seldom surprises me. OTOH, it's a complex system, with stack upon stack of hardware, firmware and software that makes really groking it (as I did with my Apple IIs in the early 80's) next to impossible. Even before the OS loads, an x86 PC is a very complicated animal.

As for the Windows notebook I am typing this in, it never ceases to amaze me and surprise me in almost always frustrating ways. It's indeed a box full of magic, but I am not sure its genies always work for me rather than against me.

I have tried a couple times to move to FreeBSD, but I always got frustrated with, what I perceived, a purist view of what a Unix machine should be - clean, simple and somewhat bare. I kind of like the magical things that happen in Linux, particularly package management. I utterly dislike the way it handles wireless networking, but I guess this is a feature nobody got right.

Re: Ask HN: Do you understand your operating system?

#7
I'm currently working on a block device driver, which means I'm digging around in kernels. I've found the O'Reilly books on the Linux kernel ("Understanding the Linux Kernel, 3rd ed" and "Linux Device Drivers, 3rd ed") as well as "Mac OS X Internals" by Amit Singh extremely helpful. The latter doesn't only cover the darwin/xnu kernel but also a lot of the OS X user space. All of them are quite technical and can be a bit dry, but they're certainly densely packed with information - and you can safely skip/skim most sections if you like. Linux Device Drivers is probably only useful if you're actually trying to write a kernel driver, I can recommend the others for general interest as well, though.

I've also got Windows Internals from MS Press, but I've only looked at it briefly so far. It seems higher-level than even the OSX book.

In general, I've found it extremely interesting to see how it all fits together, but I've got a general soft-spot for low-level hackery. (until recently that mainly involved game consoles)

Re: Ask HN: Do you understand your operating system?

#8
It's hard to say what it is to "understand" an operating system, though. Knowing how it works in a fairly broad sense, or even knowing how specific parts of the kernel work doesn't mean you completely grok the system.

I mean, understand in the broad sense of "stuff all OSes do": certainly. I realize that there is memory management and etc. and etc. that is going on, and I have a basic idea of how that works, at least on Windows. (I use Windows, Linux, and Mac regularly, and can reach each from where I'm sitting.)

I have a decent enough understanding of Windows system internals and how it actually handles memory allocation, permissions, etc., but not down to the lowest level, just sort of a vague idea of what system files do what.

I assume Linux and OSX handle things somewhat similarly aside from implementation details, but I don't really know.

I haven't had the time to poke around Linux kernel internals (I have a pretty good understanding of the system down to that level, though), and I doubt I'll ever mess with OSX internals beyond what is necessary to have it 'just work'.

I figure I will master what I need to get things to do what I want. I find it fascinating, and at some point I'll probably have a project which requires me to hack on the Linux kernel in some way, shape, or form (unless someone else already has). In the meantime, though, I remain knowledgeably ignorant (I know that I do not know), which I think will have to do for now.

BIOS-level stuff and all of that is black magic to me. :P

It's hard to say what is and isn't necessary just from a development standpoint. From a curiosity standpoint, assuming unlimited time, complete knowledge of a system is better than limited knowledge. From a practical standpoint, such knowledge may make you a 'better' coder, but it may also tie you more to one OS rather than another. It cuts both ways there, though, because it could be that by understanding what does and doesn't change from one system to another, writing portable code is much easier.

So do I care that I don't know? Yes. Do I think it's the end of the world and must be remedied immediately? No. I will have plenty of opportunity to remedy my desire to know more about OS internals if I ever take on a project that requires me to know them exceptionally well. At some point that will inevitably happen, considering my interest in them. In the meantime, I'm content to know that I do not know and that in an ideal future, someday I will know.

Re: Ask HN: Do you understand your operating system?

#9
Or, at an even lower level... do you understand your hardware? Not just disk space and memory, as most programmers need to know those... But do you know how the keyboard works? USB? How the processor receives/manages all the signals?

I did know all this, 10 years ago... I haven't kept up with newer systems, but even that basic understanding helps in many subtle ways.

Re: Ask HN: Do you understand your operating system?

#10
Windows: yes Linux: pretty much (90%) Mac: nope

When I started my current job in computer forensics and security it shocked me how much I didnt know. There is a LOT of stuff going on in the internals that is pretty smart.

Believe me: you have no idea how bloody complicated a discussion of the Windows file system (a fairly simple high level subject right? :P) can become when you put a couple of forensic guys in a room :)

EDIT: I like a lot of the ways the Linux device/file system is organised. It makes a little more logical sense (though it might just be that it is more accessible) than windows.

Post reply on HN