5 ms·
In all honesty, if you're only a beginning OS hacker, you probably shouldn't be diving into the Linux kernel unless you have a keen specific interest in it. Bes
by vezzy-fnord 11y ago
In all honesty, if you're only a beginning OS hacker, you probably shouldn't be diving into the Linux kernel unless you have a keen specific interest in it. Besides all the complexity, both intrinsic and accidental from its adoption by many heterogenous parties with different interests, it just isn't architecturally interesting.
You want something to broaden your horizons, and that has a much smaller surface. Try Minix 3, Plan 9 (or the 9front fork), DragonFly BSD, Genode, Haiku (BeOS-like), some flavor of illumos, HelenOS or even GNU Hurd.
Besides the easier entry and the higher learning opportunity, you have more of a chance to make truly major contributions. Something like porting your favorite package can get your hands dirty quickly.
Arguably, having less conflict of interest from corporate benefactors makes for a much smoother communication experience, too.
- webaholic 11y agoThis does not make any sense. Any modern kernel(including the ones you mentioned) is going to be complex. The only way to get started is to dig in. Even if you do not make changes right away, trying to understand the code is a reward in itself. I also don't get your point about conflict of interest. There is no one corporate sponsor of Linux. And just because you are a newbie, your patch is not looked down upon. There is a great community willing to help if you put in the effort.
- davidw 11y agoA while back I did some fooling around with eCos, and wanted to add a floppy driver. I looked at the Linux one, some from BSD, but settled on the Minix code: it was a lot simpler and easier to understand. I'm sure it was less efficient, and handled far fewer weird corner cases, but it was just a matter of a day or two of hacking to port it to eCos. It really depends on your goals - if you just want to learn, then Minix is pretty good.
- pmelendez 11y agoMinix 3 is quite efficient. I would suspect that the complexity comes from the design choices of each OS. Monolithic kernels tend to be more complicated to be maintained than microkernel OSs.
- shmerl 11y agoYeah, illumos doesn't sound like a simple example.
- bcantrill 11y agoillumos actually has the advantage of a rich set of tooling designed for kernel development (DTrace, mdb, etc.) as well as an ethos of detailed comments -- and it tends to be a bit of a self-selecting community in that it attracts people who value the same. As an example of the adventures of a relative newcomer to illumos, see the excellent writings of Ryan Zezeski, e.g. [1][2][3]. [1] http://zinascii.com/2015/illumos-5498.html http://zinascii.com/2015/illumos-5498.html [2] http://zinascii.com/2014/crossed-signals.html http://zinascii.com/2014/crossed-signals.html [3] http://zinascii.com/2014/a-posix-queue-implementation.html http://zinascii.com/2014/a-posix-queue-implementation.html
- shmerl 11y agoThanks!
- cyphar 11y ago20% of contributions to Linux are by people who aren't backed by corporate interest. That's better than most open source projects of even moderate size. All modern kernels are going to be complicated. Simple kernels aren't efficient or full-featured, that's just how the real world works. There is no prioritisation of people who are and aren't backed by companies. All patches are judged by merit. And anybody can give a major contribution (just take a look at the massive amount of work going into kdbus which is being worked on by many different people with different interests).
- vezzy-fnord 11y agoAll modern kernels are going to be complicated. Simple kernels aren't efficient or full-featured, that's just how the real world works. I sense a real bias as to how module boundaries should be architected here. Right off the bat, saying all modern kernels will be complicated (as opposed to complex) and that simple kernels won't be efficient or full-featured, demonstrates you're thinking squarely in terms of monolithic kernels. Are QNX and L4 not simple, small yet efficient kernels? Complexity is intrinsic, but something being complicated usually implies the use of wrong or incomplete abstractions. Having the right architecture from the beginning can make huge differences, as certain problems either go away or become more manageable as they're shifted into the library or server level, with all the advantages that come from being there. just take a look at the massive amount of work going into kdbus which is being worked on by many different people with different interests kdbus is mostly worked on by the core systemd contributors + Greg K-H, which is a handful of people. The fact that it has been routinely criticized by Lutomirski and others speaks for itself.
- brendangregg 11y agoI'd warn against working on obscure operating systems and kernels unless you were independently wealthy so that this could truly be a hobby. You may invest years of your life into an OS, only to find the job market virtually non-existent. It's possible to switch kernels later in your career (and having worked on another kernel provides valuable perspective), but good luck convincing employers of that (some get it, but they are harder to find). There are plenty of jobs for Linux and FreeBSD, and I find both kernels very interesting. As for architectural interest, I can see a case being made for Plan 9 or unikernels, but most other kernels are pretty similar.
- vezzy-fnord 11y agoI don't see the point here. The majority of OS hackers are hobbyists to begin with, and learning should be the top priority in any event. Learning for the sake of being employed as a kernel hacker sounds backwards and an unhealthy approach. You demonstrate your skills and then get hired or apply for a job after the fact. Besides, it's not like you can't be a Linux sysadmin/programmer in your day job and hack on more novel OS as your hobby. For example, Al Viro was an ex-Plan 9 hacker who later became a full-time Linux guru. The thing is that once you've been involved in truly different OS architectures, migrating to a relatively boring Unix monolith like Linux isn't all that hard. Besides, Unix and Linux are so widespread there's little chance you won't be using them in some form throughout. As for architectural interest, I can see a case being made for Plan 9 or unikernels, but most other kernels are pretty similar. Sorry, but this is a plain falsehood.
- brendangregg 11y agoSorry, I should have been more clear: your point was about architectural differences. I find unikernels and distributed operating systems like plan 9 very architecturally different (for reasons I'm sure you know). I'd probably include microkernels like Minix 3 as well. But monolithic kernels, like Linux, BSD, and Solaris, being architecturally different? I think if your goal was to explore different kernel architecture, you'd be better off looking at the others, as these are relatively similar. I think you'd even agree!