Earlier quoted context omitted.
I still stick with xv6: https://github.com/mit-pdos/xv6-public - It's not only a kernel, but also have user space - Code is pretty compact and well documented, in general can be understood in a few days - No need to spend hours to custom build gcc. Just use the one provided by the distro package manager The x86 version isn't mantained anymore. They switched to RISC-V.
I would give Minix3 a try.
BareMetal OS
41–50 of 50 posts
Re: BareMetal OS
#42It’s always fun to see this get brought up on Hacker News! I’m the developer behind BareMetal OS. Keep in mind that this is all geared toward raw compute and throughput. No ring-3, no multitasking (we do support multiple cores though), and no higher-level abstractions like TCP/IP or full-featured file systems. While it’s all coded in X86-64 assembly, a rewrite to ARM/RISC-V would be interesting once that hardware is…
Re: BareMetal OS
#43Earlier quoted context omitted.
OS performance comes from algorithms and data structures not from compiler optimizations.
Os performance depends upon the overhead imposed over workloads. Being that a compilation, a computation or a communication task is a different topic.
Re: BareMetal OS
#44Re: BareMetal OS
#45So first, nicely done. But second, why have an OS at all if running only one program and supports only one ISA? "The operating system is another concept that is curious. Operating systems are dauntingly complex and totally unnecessary. It’s a brilliant thing that Bill Gates has done in selling the world on the notion of operating systems. It’s probably the greatest con game the world has ever seen... An operating sys…
"An operating system is a collection of things that don't fit inside a language; there shouldn't be one."
Re: BareMetal OS
#46So first, nicely done. But second, why have an OS at all if running only one program and supports only one ISA? "The operating system is another concept that is curious. Operating systems are dauntingly complex and totally unnecessary. It’s a brilliant thing that Bill Gates has done in selling the world on the notion of operating systems. It’s probably the greatest con game the world has ever seen... An operating sys…
As Dan Ingalls (implementor of Smalltalk) said: "An operating system is a collection of things that don't fit inside a language; there shouldn't be one."
Smalltalk is a VM, the VM isn't 'inside of' the language.
You could argue that an OS is just another high level virtual machine.
Re: BareMetal OS
#47It says that there's less overhead and higher efficiency, has anyone measured this? I'm wondering how big of a difference it makes.
FWIW it’s super hard to benchmark since it just doesn’t have many features. There’s no syscall for memory management for a start. So if you have an application that uses this you need to create your own memory routines in that app. At some point your app that successfully runs on this is doing all the things your os would normally do. At which point the os is superfluous anyway and the biggest optimizations are likel…
Hard realtime applications come to mind, though I'm not sure if BareMetal OS is suitable for those?
Re: BareMetal OS
#48Earlier quoted context omitted.
As Dan Ingalls (implementor of Smalltalk) said: "An operating system is a collection of things that don't fit inside a language; there shouldn't be one."
Thats kind of just redefining the OS though, and what a programming language is. Smalltalk is a VM, the VM isn't 'inside of' the language. You could argue that an OS is just another high level virtual machine.
Well, yes.
I am not deeply knowledgeable about the detailed history of Smalltalk, but my impression is that Alan Kay had the ideas and Ingalls wrote the code and made it work. He may be excused some bias. :-)
> You could argue that an OS is just another high level virtual machine.
Hmmmm. I think it depends on the OS.
OTOH, and I read this, barely understood it and disagreed with what I understood:
https://www.humprog.org/~stephen/research/papers/kell19unix-...
Re: BareMetal OS
#49Re: BareMetal OS
#50Earlier quoted context omitted.
Thats kind of just redefining the OS though, and what a programming language is. Smalltalk is a VM, the VM isn't 'inside of' the language. You could argue that an OS is just another high level virtual machine.
> Thats kind of just redefining the OS though, and what a programming language is. Well, yes. I am not deeply knowledgeable about the detailed history of Smalltalk, but my impression is that Alan Kay had the ideas and Ingalls wrote the code and made it work. He may be excused some bias. :-) > You could argue that an OS is just another high level virtual machine. Hmmmm. I think it depends on the OS. OTOH, and I read t…
An os does the same, with the quirk that its processor specific.
If youre writing Posix C, you shouldn't need to care what that software is running on, as long as its Posix. same goes for a Java or Smalltalk VM.
I suppose some things get interesting, when you start thinking in terms of languages. If you want to write to a serial port, is that an OS thing, or is that a library? Same for the file system. Is MSDOS an OS, or a library?
if you want to go ultra minimalist an OS is just locks and privileges. but I don't think anyone would class that as an OS.
The only satisfying answer for me, is the OS as a collection of services. Those services could be in the form of a programming language, but as Mr Kay points out, some bits don't fit in the programming language model.
This then raises the question, of how far you can take the model. 'everything as a file' does quite well, despite not applying to everything