Live data from Hacker News

Linux Inside – How the Linux Kernel Works

0xax.gitbooks.io

11–20 of 33 posts

Re: Linux Inside – How the Linux Kernel Works

#11
post #8

Every time I start to fall into the conceit that I'm an exceptionally good developer, I look at things like kernels or low level hardware programming and eat a big ol' slice of humble pie.

Why? It's just a different level of detail than you're used to. It's not magic.

Thats right. We're each of us experts in our own systems.

Re: Linux Inside – How the Linux Kernel Works

#12
post #8

Every time I start to fall into the conceit that I'm an exceptionally good developer, I look at things like kernels or low level hardware programming and eat a big ol' slice of humble pie.

Why? It's just a different level of detail than you're used to. It's not magic.

This is probably the most important lesson I learned when I started doing kernel and firmware work - the Linux kernel is, fundamentally, just a C program - albeit quite a complex one where you don't have the standard library and you see "volatile __asm__" more than you'd like to, but it's still just a big C program.

I'd absolutely encourage anyone with some C background to go and write themselves a "hello world" Linux kernel module to go convince themselves of this.

Re: Linux Inside – How the Linux Kernel Works

#13
post #5

Besides some scattered text files and the Linux man pages, there is this: https://www.kernel.org/doc/html/latest/ It's fairly new - started about a year ago, but there's quite a lot of stuff in there already (bootstrapped from the old XML stuff, I believe).

... That guide is actually fucking hilarious. 'However, that’s not too bad, because even the makers of GNU indent recognize the authority of K&R (the GNU people aren’t evil, they are just severely misguided in this matter)'

but the preferred way, as shown to us by the prophets Kernighan and Ritchie, is to put the opening brace last on the line, and put the closing brace first, thusly:

So much for the idea that kernel developers are super-smart programming "gods". Formatting code that way is brain-dead and Kernighan and Ritchie are false prophets. The real prophet, Allman, tells us the Truth - curly braces go on a line by themselves, aligned vertically and indented to the same level as their corresponding control structure.

Re: Linux Inside – How the Linux Kernel Works

#14

Every time I start to fall into the conceit that I'm an exceptionally good developer, I look at things like kernels or low level hardware programming and eat a big ol' slice of humble pie.

+1 and then I feel the same and sometimes even worse when it comes to programming language design.

Re: Linux Inside – How the Linux Kernel Works

#15
post #8

Every time I start to fall into the conceit that I'm an exceptionally good developer, I look at things like kernels or low level hardware programming and eat a big ol' slice of humble pie.

Why? It's just a different level of detail than you're used to. It's not magic.

As someone that used to do kernel and RTOS development for many years and then migrated into web and app dev for a living because it allowed a more flexible lifestyle for paying the bills - this equivocation is disingenuous.

There is some room for disagreement, but I agree with most of the following. https://developer.apple.com/library/content/documentation/Da...

Kernel development, similar to algorithmic trading (incl HFT), some types of games, various embedded, actual production compilers etc requires a higher level of rigorous understanding from a variety of areas compared to the vast majority of webapps (often CRUD) and most software that IT professional work on. Kernel dev similar to other performance critical or safety critical systems has a much reduced set of tradeoffs and more numerous constraints, for one.

Of course, most applications require knowledge in disciplines such as design and domain specific knowledge that kernel development does not require, but that is besides the point. It requires a different type of thinking overall (one that is more unforgiving to lack of rigor and not as open to subjectivity cf. design) that low-level systems development/engineering and most app development are virtually unrelated disciplines outside of trivial similarities relating to them both targeting computers.

I don't say this to discourage anyone. But these reductions are unhelpful and outright condescending to those that might struggle to learn (oh it's just a slightly different domain than your JS TODO app....um no it's not.. it's harder for you to learn because it is actually harder and more complex).

Re: Linux Inside – How the Linux Kernel Works

#16

Earlier quoted context omitted.

... That guide is actually fucking hilarious. 'However, that’s not too bad, because even the makers of GNU indent recognize the authority of K&R (the GNU people aren’t evil, they are just severely misguided in this matter)'

but the preferred way, as shown to us by the prophets Kernighan and Ritchie, is to put the opening brace last on the line, and put the closing brace first, thusly: So much for the idea that kernel developers are super-smart programming "gods". Formatting code that way is brain-dead and Kernighan and Ritchie are false prophets. The real prophet, Allman, tells us the Truth - curly braces go on a line by themselves, ali…

These theories were ultimately settled by trial by combat between the champions representing each: Linux and BSD. Linux has clearly won this battle, and thus, the gods have spoken. ~

Re: Linux Inside – How the Linux Kernel Works

#18
post #8

Every time I start to fall into the conceit that I'm an exceptionally good developer, I look at things like kernels or low level hardware programming and eat a big ol' slice of humble pie.

Why? It's just a different level of detail than you're used to. It's not magic.

I work in JIT compilers and sometimes people say this about my field. But it's really not true for one major reason - not all the knowledge you need in this field is written down. So if you don't have someone you can ask questions nearly full time who knows it all, you can't just get started like you can in web programming, where there are endless books and tutorials.

Re: Linux Inside – How the Linux Kernel Works

#19
I've taken a class in college about the Linux kernel, and it's still amazing to see how complicated it actually is.

I've got a fairly good idea of how many pieces work, but the whole thing together still puzzles me at times.

I think that it's one of the biggest achievements of the internet as a tool for progress, and it shows that good intentions and pragmatism (together with some good Linus insults as well) can go a long way

Post reply on HN