Live data from Hacker News

Linux Inside – How the Linux Kernel Works

0xax.gitbooks.io

21–30 of 33 posts

Re: Linux Inside – How the Linux Kernel Works

#21
post #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…

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

Complexity doesn't necessarily mean it's a masterpiece. A lot of it is just old and has been incrementally changed without being simplified in the mean time.

As a concrete example, the guide goes through the rather complicated mess of how syscalls worked. That complexity was the result of a series of optimizations and features added over time, but it wasn't a good design. These days Linux syscalls (on x86_64 anyway) are a good deal simpler than they are in the guide.

(Hey 0xAX, I don't suppose you'd like to update the guide?)

Re: Linux Inside – How the Linux Kernel Works

#22
post #15
post #8

Earlier quoted context omitted.

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 (in…

> this equivocation is disingenuous

i'm super confused. what equivocation are you refering to?

Re: Linux Inside – How the Linux Kernel Works

#23
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.

It's not magic indeed:

——

Looking up and down the aisles at Lowes and not finding a raised garden bed that met my needs, I inquired with a staff member:

“Sorry, we don’t carry anything like that.”

“Darn. Ok, I’ll try another store then,” I sighed with resignation.

“You know,” he said to me, “it’s just wood.”

It took me a moment to realize how liberating this statement was. To him, woodworking held no mystery at all - it was just a thing you did. If he wanted a garden bed, there’d be no question in his mind that he’d make it himself. Why spend more on something suboptimal when you can build exactly what you want?

— Bryan Kennedy (http://plusbryan.com/its-just-wood)

Re: Linux Inside – How the Linux Kernel Works

#24
post #15
post #8

Earlier quoted context omitted.

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 (in…

This is true insofar that bugs resulting from an incomplete understanding of the system have far more significant implications in kernel development (kernel panics, seg faults, OOM killer) than in web dev, where you might get an Exception that's handled by your framework.

Re: Linux Inside – How the Linux Kernel Works

#25
post #8

Earlier quoted context omitted.

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" Linu…

[deleted]

Re: Linux Inside – How the Linux Kernel Works

#26
post #23
post #8

Earlier quoted context omitted.

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

It's not magic indeed: —— Looking up and down the aisles at Lowes and not finding a raised garden bed that met my needs, I inquired with a staff member: “Sorry, we don’t carry anything like that.” “Darn. Ok, I’ll try another store then,” I sighed with resignation. “You know,” he said to me, “it’s just wood.” It took me a moment to realize how liberating this statement was. To him, woodworking held no mystery at all -…

Nice quote.

At least half of what I have learned has been because I was dissatisfied with what was available and thought I could do better myself.

Sometimes I could make a better thing, and sometimes I couldn't, but I always learned something. Even sometimes just the knowledge that it's harder than it looks.

Re: Linux Inside – How the Linux Kernel Works

#28
post #15

Earlier quoted context omitted.

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 (in…

> this equivocation is disingenuous i'm super confused. what equivocation are you refering to?

I think he may have meant equiparation.

Re: Linux Inside – How the Linux Kernel Works

#29
post #21
post #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…

> I've taken a class in college about the Linux kernel, and it's still amazing to see how complicated it actually is. Complexity doesn't necessarily mean it's a masterpiece. A lot of it is just old and has been incrementally changed without being simplified in the mean time. As a concrete example, the guide goes through the rather complicated mess of how syscalls worked. That complexity was the result of a series of…

I'm not 0xAX, but care to make a pull request to get the ball rolling?

Re: Linux Inside – How the Linux Kernel Works

#30
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.

Eh... It's far more complex than what most devs are accustomed to, and often too complex for most devs to be good at. It's not just "different", it's harder. You have to solve hard problems if you're going to build and maintain an OS. You're not solving hard problems when you write your next CRUD app.
Post reply on HN