4 ms·
if I was curious, what would be a couple of the good complexities?
by gmadsen 4y ago
if I was curious, what would be a couple of the good complexities?
- mikepurvis 4y agoNot the OP, but I would assume that necessary complexity is at least where the complexity mirrors whatever real world complexity it is implementing, thinking particularly of protocol stacks like usb, networking, etc.
- tux3 4y agoDepends on what kind of problems you you find interesting, but since it's so close to the metal, and since people want their kernel to be fast, there tends to be a lot of clever algorithms, intricate locking, architecture-specific considerations, dealing with the hardware, all sorts of pretty interesting things you wouldn't usually find in regular business logic. Take filesystem code for example. It can sound like a conceptually simple and well trodden topic, but if you try writing one there's a pretty large design space and tons of interesting problems to try to solve. And then because of concurrency and the need for performance, there can be very intricate locking to the point it can be challenging to hold the whole model in your head all at once (you can have truncates, writes, mmap, all sorts of very different operations in flight in parallel that interract in funny ways). Or memory models. Reading memory-barriers.txt is a lesson in humility, I believe you can count on your fingers and toes the number of people in this world who can truly claim intimate familiarity with all the corner-cases and details implied by the model in that little text file =) But take practically any big subsystem of the kernel, and there tends to be plenty of interesting domain-specific problems and challenges.
- quirino 4y agoI believe they're referring to the essential complexity of the domain. An operating system has some "lower bound" on how complex it can be, which is rather high. But some stuff doesn't _have_ to be hard. Like OP said, there's no inherent reason for error messages and failures to be cryptic or documentation to be sparse. The system could be more transparent or modular, easier to debug/analyze, etc. I think there's an example in GCC vs Clang here, but I'm not qualified to comment.