Is there any equivalent for ARM architecture? P.S. Props for saying "Ubuntu or Elementary" -- I switched to Elementary earlier this year and love it so I'm glad it's getting more recognition.
BareMetal OS
31–40 of 50 posts
Re: BareMetal OS
#32It says that there's less overhead and higher efficiency, has anyone measured this? I'm wondering how big of a difference it makes.
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 likely the highly tailored app specific routines you wrote rather than the specific os optimizations.
In the end a fair benchmark on this very minimal os would be an app that makes no syscalls since this doesn’t really support much anyway. If you run an application with no syscalls on a modern Linux with context switching tuned (you can fine tune how the context switching runs other threads) the impact of an os vs this is simply the memory overhead alone.
You just can’t compare this fairly. There’s no reasonable ‘how fast does this handle a malloc syscall vs Linux’ when it doesn’t implement a malloc syscall at all.
Re: BareMetal OS
#33A low-overhead environment like this must be perfect for HPC applications, i.e., when you want to use a computer in its primary function (to perform calculations, as fast as possible).
I bet it doesn’t do that well. Here’s an example. I have a program that does a lot of memory allocation and reallocation. The memory management strategies in modern OS’s work wonders on this, better than a custom allocator I can write in a reasonable amount of time. In bare metal os I would lose this all for the advantage of not loading an os that tends to stay out of the way unless needed anyway. Where I see use for…
Re: BareMetal OS
#34Back to the OS architecture, AFAIK, exokernel tries to get rid of the OS overhead (context switching, abstractions, etc.) to improve performance back in 1995. But I assume with modern computers/workload, the OS overhead only takes a tiny piece. Is that the case? Are people still optimizing OS heavily for today's workload like AI/ML/servers?
Re: BareMetal OS
#35Earlier quoted context omitted.
> ARM/RISC-V would be interesting once that hardware is standardized. Could you elaborate on this? Both ARM and RISC-V have standardized their hardware feature and different target versions. Is it more on the iterative angle given X86-64 now moves very slowly?
While the ISAs are (mostly) standardized, the broader hardware support is a mishmash. ACPI is available, but not widely supported. Some hardware uses DeviceTree. Other hardware just expects you to know what devices are connected and how to interact with them.
https://documentation-service.arm.com/static/60250c7395978b5...
Re: BareMetal OS
#36It’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…
The spirit of TempleOS is alive and well!
Re: BareMetal OS
#37There was a test with the 1BRC and it was shown that Rust was faster than Assembly (and likely C as well), meaning, a compiler will probably do a better job than a human optimizing code. How sure can someone be that this is indeed performant?
OS performance comes from algorithms and data structures not from compiler optimizations.
Re: BareMetal OS
#38I used BareMetal and Pure64 as a source of inspiration and knowledge while writing an OS as a student. It is simple and well written. I miss the days of reading AMD64 manuals and directly interacting with my hardware through assembly, and I want to get back to it. What would be a good entry-point to OS development nowadays? I have the "FYSOS: The System Core" by Benjamin David Lunt. While I love the series, I wonder…
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.
Re: BareMetal OS
#39Re: BareMetal OS
#40It’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…