Live data from Hacker News

BareMetal OS: A 64-bit Operating System in only 16KiB

blog.returninfinity.com

21–30 of 40 posts

Re: BareMetal OS: A 64-bit Operating System in only 16KiB

#22
post #16

So is this like the demoscene stuff or is there a practical use for it?

I read the link in the article, so I'll just paste what it says: * High Performance Computing - Act as the base OS for a HPC cluster node. Running advanced computation workloads is ideal for a mono-tasking Operating System. * Embedded Applications - Provide a platform for embedded applications running on commodity x86-64 hardware. * Education - Provide an environment for learning and experimenting with programming in…

For the first use, it seems like it'd be nice if there were some way it could reuse existing hardware-compatibility work done on projects like the Linux kernel or the BSD kernels. Even if you want a single-tasking system with little in the way of OS services, you still usually don't want to be debugging the quirks of every hardware device, or writing your own driver every time you get a machine with a new SATA controller or NIC.

Re: BareMetal OS: A 64-bit Operating System in only 16KiB

#23
post #5

The spin-off Pure64 looks very interesting. It looks like they have factored out the code for getting up and running with your own project: "The loader gets the computer into a full 64-bit state with no legacy compatibility layers and also enables all available CPU Cores in the computer." "Two very simple kernels are included to get you started with your new 64-bit OS (One written in Assembly, the other in C)."

There seems to be some "64-bit" buzzwordism going on here. There's nothing special about 64-bit; it's just a different processor mode. Writing 64-bit code is no different than 32-bit.

Re: BareMetal OS: A 64-bit Operating System in only 16KiB

#24
post #7
post #5

The spin-off Pure64 looks very interesting. It looks like they have factored out the code for getting up and running with your own project: "The loader gets the computer into a full 64-bit state with no legacy compatibility layers and also enables all available CPU Cores in the computer." "Two very simple kernels are included to get you started with your new 64-bit OS (One written in Assembly, the other in C)."

Pure64 also is proprietary :( Is BareMetal bootable via GRUB?

I think that was just a poor choice of words.

They mean proprietary in the sense of "we built one ourselves". You can download source from the links at the bottom of the page: http://www.returninfinity.com/pure64.html

Re: BareMetal OS: A 64-bit Operating System in only 16KiB

#25
post #24
post #7

Earlier quoted context omitted.

Pure64 also is proprietary :( Is BareMetal bootable via GRUB?

I think that was just a poor choice of words. They mean proprietary in the sense of "we built one ourselves". You can download source from the links at the bottom of the page: http://www.returninfinity.com/pure64.html

The distribution zip actually just contains binary pure64.sys file and sources for their example kernels. The sources for Pure64 are not included. Also, no information on licensing is included.

Re: BareMetal OS: A 64-bit Operating System in only 16KiB

#26

Could be useful if it did something new - support virtual apps, manage restartable/persistent state processes, something. Just another thread/memory/interrupt kernel? Why?

I think the point here is being minimalism, and being a starting point to build on those features you mention.

Re: BareMetal OS: A 64-bit Operating System in only 16KiB

#27
post #23
post #5

The spin-off Pure64 looks very interesting. It looks like they have factored out the code for getting up and running with your own project: "The loader gets the computer into a full 64-bit state with no legacy compatibility layers and also enables all available CPU Cores in the computer." "Two very simple kernels are included to get you started with your new 64-bit OS (One written in Assembly, the other in C)."

There seems to be some "64-bit" buzzwordism going on here. There's nothing special about 64-bit; it's just a different processor mode. Writing 64-bit code is no different than 32-bit.

AMD64 also included a lot more registers, and has some extensions to the instruction set. It also makes a baseline for other features like SSE, as all CPU:s supporting AMD64 are relatively modern. Also having larger address space to work with may affect some design decisions.

So while you can write 64-bit code just like 32-bit code, it's bit like saying that writing c++ is no different than writing c.

Re: BareMetal OS: A 64-bit Operating System in only 16KiB

#28
post #8

This reminds me of MenuetOS ( http://www.menuetos.net ), although a bit larger BareMetal OS, still manages to cram in a unholy amount of functionality in to a couple of megs.

FWIW, I found a local privilege escalation vulnerability (arguably just a bug allowing apps to trash the kernel, since it's single-user anyway) in Menuet32, and I'm not optimistic about the network stack. I would have expected ping of death to work, but it doesn't even seem to support IP packet fragmentation.

These throwback OSes are cute, but there would be hell to pay if they ever took off.

Re: BareMetal OS: A 64-bit Operating System in only 16KiB

#29

Other than the academic nerdiness of minimal OSs, what is this good for? Do modern OSs cause too much overhead for certain operations?

They cause too much overhead for teaching. A minimal OS is a great way to show how one works, what the essentials are, and even what weaknesses it has.

Re: BareMetal OS: A 64-bit Operating System in only 16KiB

#30
post #23
post #5

The spin-off Pure64 looks very interesting. It looks like they have factored out the code for getting up and running with your own project: "The loader gets the computer into a full 64-bit state with no legacy compatibility layers and also enables all available CPU Cores in the computer." "Two very simple kernels are included to get you started with your new 64-bit OS (One written in Assembly, the other in C)."

There seems to be some "64-bit" buzzwordism going on here. There's nothing special about 64-bit; it's just a different processor mode. Writing 64-bit code is no different than 32-bit.

64bit allows and/or requires different designs to be efficient. While the difference is usually negligible in user mode, 64bit in a kernel is rather different.
Post reply on HN