Live data from Hacker News

BareMetal OS

github.com

11–20 of 50 posts

Re: BareMetal OS

#11
post #8

I 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 used https://wiki.osdev.org/Resources back it the day and it looks like it's still alive and well!

Re: BareMetal OS

#12
post #8

I 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 particularly like the mit 6.S081 operating systems course [1].

The course has you make useful extensions to a reimplementation of the XV6 kernel in RISC-V.

This course really helped me start to understand how an OS works and what the hardware software interface really is.

[1] https://pdos.csail.mit.edu/6.828/2020/ — linking to the 2020 class because all of the lectures were uploaded to YouTube to accommodate remote work during the thick of Covid.

Re: BareMetal OS

#13

I wonder what kinds of hardware are supported... Like I'd imagine a keyboard is not

Keyboard is supported. NVMe, AHCI, ATA, and VirtIO for storage. A few gigabit network adapters from Intel, Realtek, and also VirtIO. A 10gbit intel network driver is currently being developed. Send works on it currently.

Re: BareMetal OS

#14
It’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 standardized.

Re: BareMetal OS

#15
post #5
post #3

A 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).

This is a really interesting approach. What are the main bottlenecks something like BaremetalOS solves? Context switches? Copying data forth and back userland? Something else?

Correct. BareMetal (the kernel) doesn't have context switching or userland. Think of the kernel as just a hardware abstraction layer.

Re: BareMetal OS

#16

It’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…

What are some examples of computations

Re: BareMetal OS

#17

It’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…

> 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?

Re: BareMetal OS

#18
post #8

I 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

#19
So 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 system does absolutely nothing for you. As long as you had something—a subroutine called disk driver, a subroutine called some kind of communication support, in the modern world, it doesn’t do anything else."

- Chuck Moore, interview in "Masterminds of Programming", 2009

Re: BareMetal OS

#20
post #19

So 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 @ianseyler writes below, the kernel should be seen more as a hardware abstraction layer. It seems to fill this role well and minimally. I'm not sure we could definitely say that Chuck Moore would call BareMetal OS unnecessary. Maybe it should just not be called an OS.

He would say, as I would, that you're much better off with a Forth, but that's another matter :)

Post reply on HN