by asciilifeform · 17y ago · 0 comments
Once you've built a UNIX clone, you have polluted your mind as an OS designer. I did so (as a standard college homework assignment) and it took me years to shake the crud out of my head.
As for the tutorial, it is very well written, but x86-32-centric and therefore worthless. There are nontrivial differences between x86-32 and x86-64 from the standpoint of an OS author who wants to make full use of the latter's capabilities.
As for the x86/x64 differences, they're by no means insurmountable once you have the concepts down, which is exactly what this tutorial provides.
As I said, you can't expect someone to create something original unless they understand the mistakes of the past. I started off implementing toy kernels with no structure, moved on to Unix-like kernels, and eventually ended up in a realm entirely different. Just because someone starts out copying Unix doesn't mean they're going to be blind to other competing designs or completely unique ones.
Expecting someone to build something new without any basis is just foolish.
Base it on your mental model of how your CPU's internals ought to be used, as inferred from the latter's manuals - like 1980s microcomputer users did.
Creativity exists.
OS development is already difficult enough, why make it harder? For every ten people that read and follow this and decide to make the Next Big OS (TM) following Unix concepts, you might get one that sees something bigger.
There are plenty of tutorials on ASM coding, and plenty on low-level C coding. There are plenty of books about OS internals. The books and articles I've found before tend to stay firmly in the theoretical, in the abstract. The aim of this series is to show how the theory can be implemented. Then, the reader has the knowledge to (possibly) implement their own algorithms and know how they link to the CPU's internals.
As to your second point - do you think that the memory manager in this OS is optimal? Do you think that the linked-lists everywhere are optimal? Of course not. Everything was chosen for its simplicity - I failed in some areas I know, and I'm rewriting them as I speak (they're stalled at the moment due to a lack of time); the heap for example is a mess in that series. The new one is much easier to understand.
The series does not create an optimal OS for IA32. So your point about transitioning to amd64 to "make full use of the latter's capabilities" is moot - you have to do more research to optimise for IA32 anyway, let alone amd64!
(And let's not forget that all amd64 CPUs are backwards compatible with IA32).