The Importance of Designing First and On $System Weenies
Posted: Wed Feb 28, 2007 12:05 pm
The Importance of Designing First
This is a polemic, written because I see many people doing very stupid things.
A majority of posts to this board have been written by relative beginners asking questions about hardware and low-level programming. By itself, this is not a bad thing, but the developers posting these questions seem to give no consideration to how they will fit their new hardware-banging knowledge into a coherent operating system.
Too many people here, though not so many of the "regulars", seem to plunge into operating-system development without giving much real thought to the design of their future operating system. Those who give it some thought usually jump to the conclusion that, even if they do not duplicate the actual design of any Unix variety, they will design their system to implement POSIX. Or DOS. But with real-time scheduling! And messages! And security! And... multi-processing! And distributed computing! And...
And now they've designed a useless system whose desired features won't fit with its desired user-land interface.
I only ask you all: give some thought to designing your operating system before you code! You don't have to create a final design. Most real designs are not final until you've built several layers of libraries and applications on them. But begin your system with one coherent goal in mind, and design everything around that goal.
This means you should not make POSIX the native system-call interface to a micro-kernel. If you must, implement a compatibility layer in user-land, because POSIX simply doesn't suit micro-kernels.
This means you should not plan elaborate IPC facilities for a macrokernel. Aside from networking (which certain distributed systems might call IPC), it isn't actually needed. Instead, concentrate on providing elegant abstractions with which user applications can work.
If you disagree with any of my design recommendations, great! You've actually put the time and thought in to refute my criticisms of what you were going to do. Most people don't even read up on previous designs, much less challenge their own design to themselves.
If your design isn't particularly unique or cool, fine. It doesn't need to be if you put the effort in to make it a coherent design that won't show a million corner-cases to every generalization as soon as you start coding.
On $System Weenies
That was a polemic. This is closer to a rant, but the topics are related.
I hate $System Weenies of all stripes. These are the people who go beyond merely copying system-call interfaces from an existing system. They copy the whole design. Not because they want humbly to learn from it (the reason for many copying Unix), but because they think it's the best design under the sun. When someone mentions using an original design they wonder, "Why would you ever want to do that?"
They also usually have an "enemy system" that they like to hate. For Unix Weenies, its Windows. For Windows Weenies (the few that exist), it's Linux. For Amiga Weenies, it's everybody. For VMS Weenies, it's Unix. For Andrew Tanenbaum, it's everything but Minix. Make even the slightest criticism of their $System and they will immediately brand you a weenie for their enemy system.
You people know who you are. Hopefully you can be made to understand how little you really know.
This relates to the previous polemic because not designing is the chief sin of $System Weenies. It's OK to like a preexisting system. Nobody's claiming that X or Y wasn't as well-engineered as the Weenies say it was. But all systems have their design flaws, desired features the hardware couldn't support, and kludge-like tradeoffs made for speed. Get over it!
This is a polemic, written because I see many people doing very stupid things.
A majority of posts to this board have been written by relative beginners asking questions about hardware and low-level programming. By itself, this is not a bad thing, but the developers posting these questions seem to give no consideration to how they will fit their new hardware-banging knowledge into a coherent operating system.
Too many people here, though not so many of the "regulars", seem to plunge into operating-system development without giving much real thought to the design of their future operating system. Those who give it some thought usually jump to the conclusion that, even if they do not duplicate the actual design of any Unix variety, they will design their system to implement POSIX. Or DOS. But with real-time scheduling! And messages! And security! And... multi-processing! And distributed computing! And...
And now they've designed a useless system whose desired features won't fit with its desired user-land interface.
I only ask you all: give some thought to designing your operating system before you code! You don't have to create a final design. Most real designs are not final until you've built several layers of libraries and applications on them. But begin your system with one coherent goal in mind, and design everything around that goal.
This means you should not make POSIX the native system-call interface to a micro-kernel. If you must, implement a compatibility layer in user-land, because POSIX simply doesn't suit micro-kernels.
This means you should not plan elaborate IPC facilities for a macrokernel. Aside from networking (which certain distributed systems might call IPC), it isn't actually needed. Instead, concentrate on providing elegant abstractions with which user applications can work.
If you disagree with any of my design recommendations, great! You've actually put the time and thought in to refute my criticisms of what you were going to do. Most people don't even read up on previous designs, much less challenge their own design to themselves.
If your design isn't particularly unique or cool, fine. It doesn't need to be if you put the effort in to make it a coherent design that won't show a million corner-cases to every generalization as soon as you start coding.
On $System Weenies
That was a polemic. This is closer to a rant, but the topics are related.
I hate $System Weenies of all stripes. These are the people who go beyond merely copying system-call interfaces from an existing system. They copy the whole design. Not because they want humbly to learn from it (the reason for many copying Unix), but because they think it's the best design under the sun. When someone mentions using an original design they wonder, "Why would you ever want to do that?"
They also usually have an "enemy system" that they like to hate. For Unix Weenies, its Windows. For Windows Weenies (the few that exist), it's Linux. For Amiga Weenies, it's everybody. For VMS Weenies, it's Unix. For Andrew Tanenbaum, it's everything but Minix. Make even the slightest criticism of their $System and they will immediately brand you a weenie for their enemy system.
You people know who you are. Hopefully you can be made to understand how little you really know.
This relates to the previous polemic because not designing is the chief sin of $System Weenies. It's OK to like a preexisting system. Nobody's claiming that X or Y wasn't as well-engineered as the Weenies say it was. But all systems have their design flaws, desired features the hardware couldn't support, and kludge-like tradeoffs made for speed. Get over it!