3 ms·
Well, with the exception of the BSD-like systems, none of the systems being written will actually run software people want to run unless they target those kerne
by zahllos 7y ago
Well, with the exception of the BSD-like systems, none of the systems being written will actually run software people want to run unless they target those kernels. By definition, none of these kernels will therefore likely see widespread use. You can see a microcosm of this with Linux: popular commercial software like games often doesn't come to linux. To make an operating system that sees popular use, you'd likely need to emulate the API of an existing system.
This is actually fine. These systems aren't really trying to do that because they're created for other reasons. Maybe it is to learn about building operating systems and the author picked a not-C language? Maybe it is an academic research project like seL4 and the question being asked is "can we formally verify a whole kernel?" Maybe the kernel will use some esoteric feature of the processor, like i386's hardware threads or POWER's hypervisor? Maybe it is to produce a security kernel like GEMSOS or a separation kernel like Windriver's vxworks or Muen (which is written in Ada). Or it could be to build a different design of kernel, like a microkernel or unikernel. There are many reasons, and some of these are sold commercially and used in critical environments, albeit not on the scale of say Windows or Linux.
I don't think there's anything wrong with trying to build a kernel in a new language for many of the reasons other commenters have suggested. Perhaps it is simply to see if the language is suitable for kernel development? Maybe it is just to learn, and the developer in question picked their favourite language? I do agree with you though that doing some research is absolutely necessary. Writing a kernel is not a small project and it helps to decide what your aims are :)
- thesuperbigfrog 7y agoYou are exactly right! The "chicken and egg" problem is a large part of why these favorite language X operating systems slowly evolve into partial implementations of existing operating systems. What good is the favorite language X operating system if there is no software for it? But wait a second, if the favorite language X operating system would implement these handful of POSIX APIs then look how much software could probably run with just a few tweaks. Except the POSIX APIs do not get implemented completely right. Or they suffer from terrible impedance mismatches due to the design differences or safe ideals that have to be relaxed in order to have them work. For example: Ada has unchecked conversion, unchecked deallocations, etc. Rust has unsafe. A big part of the reason that GNU and Linux have succeeded is that they implemented Unix APIs with some innovations and improvements along the way.
- thesuperbigfrog 7y agoPerhaps this is the crossover between Henry Spencer's observation about Unix ("Those who don't understand Unix are condemned to reinvent it, poorly.") and Greenspun's tenth rule ("Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp."). The crossover is: "Any sufficiently complicated, real-world operating system contains an ad-hoc, informally-specified, perhaps buggy, implementation of half of Unix."