BareMetal

Operating system From Wikipedia, the free encyclopedia

BareMetal is an exokernel-based single address space operating system (OS) created by Return Infinity.

DeveloperReturn Infinity
Working stateCurrent
Source modelOpen source
Quick facts Developer, Written in ...
BareMetal
DeveloperReturn Infinity
Written inAssembly
Working stateCurrent
Source modelOpen source
Initial release2008; 18 years ago (2008)
Latest release2025.04 / April 30, 2025; 10 months ago (2025-04-30)[1]
Marketing targetHPCs, HTC, Cloud computing
Available inEnglish
Supported platformsx86-64
Kernel typeExokernel, SASOS
UserlandUnknown
Default
user interface
Command-line
LicenseBSD License[2]
Official websitewww.returninfinity.com
Close

It is written in assembly to achieve high-performance computing with minimal footprint[3][4] with a "just enough operating system" (JeOS) approach.[5] The operating system is primarily targeted towards virtualized environments for cloud computing, or HPCs due to its design as a lightweight kernel (LWK). It could be used as a unikernel.

It was inspired by another OS written in assembly, MikeOS,[2] and it is a recent example of an operating system that is not written in C or C++, nor based on Unix-like kernels.[6]

Overview

Hardware requirements

Source:[7]

  • AMD/Intel based 64-bit computer
  • Memory: 4 MB (plus 2 MB for every additional core)
  • Hard Disk: 32 MB

Supported devices

Source:[8]

  • Bus - PCIe, PCI, xHCI
  • Non-volatile storage - NVMe, AHCI (SATA), ATA, Virtio-Blk
  • Ethernet - Intel 8259x 10-gigabit, Intel 8254x/8257x Gigabit, Realtek 816x/811x Gigabit, Virtio-Net

One task per core

Multitasking on BareMetal is unusual for modern operating systems. BareMetal uses an internal work queue that all CPU cores poll. A task added to the work queue will be processed by any available CPU core in the system and will execute until completion, which results in no context switch overhead.[9]

Programming

API

An API is documented[10] but, in line with its philosophy, the OS does not enforce entry points for system calls (e.g.: no call gates or other safety mechanisms).

C

BareMetal OS has a build script to pull the latest code, make the needed changes, and then compile C code using[11] the Newlib C standard library.[12]

C++

A mostly-complete C++11 Standard Library was designed and developed for working in ring 0.[13] The main goal of such library is providing, on a library level, an alternative to hardware memory protection used in classical OSes, with help of carefully designed classes.[14]

K

k for BareMetal:[15] a port of k edu from shakti[16] by Jack Andrews. At this stage, it is just a proof of concept and doesn't integrate the BareMetal file system.

Rust

A Rust program demonstration was added to the programs in November 2014, demonstrating the ability to write Rust programs for BareMetal OS.[17]

Networking

TCP/IP stack

A TCP/IP stack was the #1 feature request.[18] A port of lwIP written in C was announced in October 2014.[19]

minIP,[20] a minimalist IP stack in ANSI C able to provide enough functionalities to serve a simple static webpage, is being developed as a proof of concept to learn the fundamentals in preparation for an x86-64 assembly re-write planned for the future.

References

Related Articles

Wikiwand AI