by dododo · 16y ago · 0 comments
other kernels (like NetBSD) where designed with being portable across architectures in mind and so have much cleaner code paths (typically just one system call table and the bare minimum arch specific code to link it all together).
minix is okay but it's not really going to give you a grip on a real work kernel. "design and implementation of 4.4BSD-lite" is a really good book for this: most BSDs are very similar to this design still in a lot of ways, and many of the ideas described (e.g., VFS) are also used in linux.
Second, actually the more architectures you are compatible with, the more code is involved, and it tends to be more, not less, complicated. This is especially the case because all OSs have some assembly in them, and that assembly DOES change per your architecture.
Third, Minix is a "working" kernel. The main difference between Minix and BSD/Linux/whatever is that it is a microkernel, which is easily the best to learn on, on account of things like the permissions structure being MUCH simpler (arguably one of the most difficult things to grasp), but not the best in terms of (for example) security.
2. linux duplicates the system call dispatch table for each architecture. check it out:
http://lxr.linux.no/linux+v2.6.35/arch/x86/ia32/ia32entry.S#...
vs
http://lxr.linux.no/linux+v2.6.35/arch/avr32/kernel/syscall_...
whereas NetBSD has no such duplication. in fact, one complaint about the linux kernel is that it has too much per-architecture code.
3. who uses minix? the linux kernel is actually not too bad. ctags is your friend. i learnt on linux+netbsd, it's not really as bad as people make out.