4 ms·
Like the others, I'm really enjoying these posts. She seems to have a healthy curiousity for how things work, and a nice low level focus. This seems so rare t
by gwu78 13y ago
Like the others, I'm really enjoying these posts. She seems to have a healthy curiousity for how things work, and a nice low level focus. This seems so rare these days.
But I have a suggestion.
Instead of writing your own kernel, what about stripping down someone else's? I imagine their would be great value, not to mention great fun, in reducing the size of, say, the Linux kernel, taking out things that are not absolutely necessary.
As Professor McIlroy, the man behind pipes and tr, I believe once said, "The hero is the negative coder." What that means is it's not the coder who adds features that is a hero. It is the one who fixes bugs and removes unneeded code.
I know someone, who is probably one of the best C coders alive today, who has asked for a Linux kernel under 200K. Wanna be a hero? Reduce the size of a large executable, e.g., a kernel. It's a challenge and a worthy goal.
- lmkg 13y agoShe wants to learn kernels, and she wants to learn Rust. There are no extant kernels written in Rust, so she's making one. Contributing to an existing program (positively or negatively) may be more valuable, but I would say this project is more ambitious. Also, if her goal is knowledge of the system, it's more instructive to build from the ground up rather than start with a system where you can always take parts of it for granted.
- gwu78 13y ago"... where you can always take parts of it for granted." A truly curious person tends not to do this. The point of using a system is that you can take it apart to see how it works.
- bjz_ 13y agoWhat she is doing is similar to implementing her own Lisp or Forth interpreter. It does not matter whether it will ever be used in production, what matters is learning whilst building, as opposed to by wrote. You do mention that working on somebody else's construction would be useful, and would give a different perspective on the problem, but that process emphasizes different skills. Treat her wheel reinvention project as an investment in her future as a programmer and a systems designer. Re-building things that others have made to discover how they work is one of the first, vital steps in the process of developing new ideas and approaches to problems. I would also add Rust offers some really great semantics, and it's well worth the trouble to see how a kernel would look in it. It's been a while since we've had a new, reasonably well known language that is truly capable of this level of systems programming.
- gwu78 13y ago"It's been a while since we've had a new, reasonably well known language that is truly capable of this level of systems programming." You mean, like C?
- Locke1689 13y agoWell, your friend should keep a closer eye to the research literature ;) A number of projects have been launched to create smaller, leaner OS kernels. This is particularly important in HPC applications as the kernel is a primary source of latency in computation. One of the major works in this area is (shameless plug) Kitten OS[1], which is a stripped down Linux kernel meant mainly for HPC. However, I don't think recreating or hacking on Kitten is a good task for someone who wishes to learn kernel programming, Rust, or both. The best way to learn how something works is to remake it yourself. [1] https://software.sandia.gov/trac/kitten https://software.sandia.gov/trac/kitten