BareMetal is an
exokernel-based
single address space operating system (OS) created by Return Infinity.
It is written in
assembly to achieve high-performance computing with minimal footprint
with a "just enough operating system" (
JeOS
Just enough operating system (JeOS, pronounced "juice" according to SUSE S.A., SUSE) is a paradigm for customizing operating systems to fit the needs of a particular application such as for a software appliance. The platform only includes the oper ...
) approach.
The operating system is primarily targeted towards
virtualized environments for
cloud computing
Cloud computing is "a paradigm for enabling network access to a scalable and elastic pool of shareable physical or virtual resources with self-service provisioning and administration on-demand," according to International Organization for ...
, 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,
and it is a recent example of an operating system that is not written in
C or
C++, nor based on
Unix-like
A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
kernels.
Overview
Hardware requirements
*
AMD/
Intel
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, and Delaware General Corporation Law, incorporated in Delaware. Intel designs, manufactures, and sells computer compo ...
based 64-bit computer
* Memory: 4 MB (plus 2 MB for every additional core)
* Hard Disk: 32 MB
Supported devices
* 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.
Programming
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
An API is documented
but, in line with its philosophy, the OS does not enforce entry points for
system call
In computing, a system call (syscall) is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services (for example, accessing a hard disk drive ...
s (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
the
Newlib C standard library.
C++
A mostly-complete
C++11 Standard Library was designed and developed for working in
ring 0.
The main goal of such
library
A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
is providing, on a library level, an alternative to hardware
memory protection used in classical OSes, with help of carefully designed classes.
K
''k for BareMetal''
: a port of ''k edu'' from shakti
by Jack Andrews. At this stage, it is just a proof of concept and doesn't integrate the BareMetal file system.
Rust
Rust is an iron oxide, a usually reddish-brown oxide formed by the reaction of iron and oxygen in the catalytic presence of water or air moisture. Rust consists of hydrous iron(III) oxides (Fe2O3·nH2O) and iron(III) oxide-hydroxide (FeO(OH) ...
A Rust program demonstration was added to the programs in November 2014, demonstrating the ability to write Rust programs for BareMetal OS.
Networking
TCP/IP stack
A
TCP/IP
The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the suite are ...
stack was the #1 feature request.
A port of
lwIP written in C was announced in October 2014.
minIP,
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
x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit extension of the x86 instruction set architecture, instruction set. It was announced in 1999 and first available in the AMD Opteron family in 2003. It introduces two new ope ...
assembly re-write planned for the future.
References
External links
*
BareMetal OS Google Group discussion forum
Free software operating systems
Hobbyist operating systems
Microkernels
Software using the BSD license
Assembly language software
X86-64 operating systems
{{Operating-system-stub