Ask HN: Do you understand your operating system?
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.
20 comments
[ 3.6 ms ] story [ 54.6 ms ] threadAs 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.
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)
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.
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.
"Explain how a USB keyboard interacts with a computer" is one of my favourite interview questions at the moment. A surprising number of people can't tell you an in depth answer and you either hear:
- it's serial err no idea beyond that
- serial connection, I guess.. <creative attempt at answer>
- random bullshit about bits and serial (they can waffle for hours)
Really good for seeing them come up with creative solutions. Couple it with a whiteboard and work through the electronics with them and you can have a great interview.
(I started to do the whiteboard thing after one interviewee asked for a pen/paper to try and sketch out what he was thinking)
If they have the balls to say "no idea, why do I need to know" that is someone we like. If they say that and then attempt to work out an answer extra bonus points. If they stumble they get no set back - it is a random question. If they bullshit they are marked down a fair way - not the kind of person we want.
(we design it to be a question you have to actively fuck up to be marked down on)
We sit and work through an answer together and you get a real insight into them outside their area of expertise (where you would expect them to be slick)
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.
I assume he/she wants to have a more understandable OS; and because the BSD's excel at that area, I guess she/he's referring to the BSD's.
Windows --> Great but I still cannot understand some of its peculiarities such as unexpected crashes, sudden explorer.exe restarts.
MAC OS --> Great but I still cannot understand just why its USB connection speeds are interestingly low or why it has such an inadequate Unicode support for different FileSystems like NTFS.
Linux --> All great, but I cannot figure out why there are so many different package managers out there?
As for BSD, because it's structure is so well-founded there's nothing which is not understandable. Everything's got its place where you'd expect them: Ports collection under /usr/ports, and package manager is just the pkg_add command. There are no window-manager or desktop-environments pre-loaded and configured, you just chose what to do. And the kernel structure is extremely simple: You can add extra functionality to kernel easily with the Loadable Kernel Module (KLM) concept. That's it, everthing's under control.
There are things I don't understand. I don't know the I/O architecture of a PC nor how the OS integrates with the BIOS. I don't know how the subdirectories of linux/drivers/ are organized, even at the first level. I've never designed a filesystem, and suspect there are subtleties I don't appreciate.
I never bought Bill Gates' testimony during US vs Microsoft that an operating system includes its web browser. In my arrogant opinion, an OS starts and ends with the kernel. So the next question is, how much do I understand about the rest of the platform? It varies.
I do know how the X11 protocol works, how the classic X server worked, how Xt intrinsics work. Do understand the classic Unix utilities and libc and their modern GNU reimplementations.
Don't know how an RDBMS works inside. Haven't kept up to date with compiler optimizations. Don't know how debug info is stored in object file and executables or even exactly what it is. Don't have any idea how that huge pile of libraries in GNOME (or KDE) is organized. Have only a vague idea of how the current X server is organized.
Even though the last (and first) time I implemented a page fault handler was 1986, I feel like I understand what they have to do, why, and what data structures they need. I'm sure the specifics are very different in any of today's OSes than they were in 4.3BSD, but I don't think that matters. OTOH, I think most of my graphics knowledge is obsolete.
So, in sum, I partly understand my OS. (-: