BareMetal

Last updated
BareMetal
Developer Return Infinity
Written in Assembly
Working stateCurrent
Source model Open source
Initial release2008;16 years ago (2008)
Latest release 1.0.0 / November 13, 2017;6 years ago (2017-11-13) [1]
Marketing target HPCs, HTC, Cloud computing
Available in English
Platforms x86-64
Kernel type Exokernel, SASOS
Userland Unknown
Default
user interface
Command-line
License BSD License [2]
Official website www.returninfinity.com

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

Contents

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

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. [8]

Programming

API

An API is documented [9] 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 [10] the Newlib C standard library. [11]

C++

A mostly-complete C++11 Standard Library was designed and developed for working in ring 0. [12] 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. [13]

Rust

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

Networking

TCP/IP stack

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

minIP, [17] 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.

Related Research Articles

<span class="mw-page-title-main">Linux distribution</span> Operating system based on the Linux kernel

A Linux distribution is an operating system made from a software collection that includes the Linux kernel and often a package management system. Linux users usually obtain their operating system by downloading one of the Linux distributions, which are available for a wide variety of systems ranging from embedded devices and personal computers to powerful supercomputers.

<span class="mw-page-title-main">ReactOS</span> Free incomplete Windows NT-like operating system

ReactOS is a free and open-source operating system for i586/amd64 personal computers intended to be binary-compatible with computer programs and device drivers developed for Windows Server 2003 and later versions of Microsoft Windows. ReactOS has been noted as a potential open-source drop-in replacement for Windows and for its information on undocumented Windows APIs.

<span class="mw-page-title-main">Arch Linux</span> Rolling release distribution of Linux

Arch Linux is an independently developed x86-64 general-purpose Linux distribution that strives to provide the latest stable versions of most software by following a rolling-release model. The default installation is intentionally minimal so that users can add only the packages they require.

<span class="mw-page-title-main">Git</span> Distributed version control software system

Git is a distributed version control system that tracks versions of files. It is often used to control source code by programmers collaboratively developing software.

<span class="mw-page-title-main">Mercurial</span> Distributed revision-control tool for software developers

Mercurial is a distributed revision control tool for software developers. It is supported on Microsoft Windows, Linux, and other Unix-like systems, such as FreeBSD and macOS.

Nix is a cross-platform package manager for Unix-like systems.

<span class="mw-page-title-main">Parabola GNU/Linux-libre</span> Linux distribution based on Arch Linux offering only free software

Parabola GNU/Linux-libre is a free and open-source Linux distribution based on Arch Linux and Arch Linux ARM for the x86-64, i686, and ARMv7 architectures. It is distinguished from other Arch-based distributions by offering only free software. It includes the GNU operating system components common to many Linux distributions and the Linux-libre kernel instead of the generic Linux kernel. Parabola is listed by the Free Software Foundation as a completely free operating system, true to their Free System Distribution Guidelines.

musl Implementation of C standard library for Linux operating system

musl is a C standard library intended for operating systems based on the Linux kernel, released under the MIT License. It was developed by Rich Felker to write a clean, efficient, and standards-conformant libc implementation.

mpv (media player) Free and open-source media player software

mpv is free and open-source media player software based on MPlayer, mplayer2 and FFmpeg. It runs on several operating systems, including Unix-like operating systems and Microsoft Windows, along with having an Android port called mpv-android. It is cross-platform, running on ARM, PowerPC, x86/IA-32, x86-64, and MIPS architecture.

<span class="mw-page-title-main">RIOT (operating system)</span> Real-time operating system

RIOT is a small operating system for networked, memory-constrained systems with a focus on low-power wireless Internet of things (IoT) devices. It is open-source software, released under the GNU Lesser General Public License (LGPL).

<span class="mw-page-title-main">Void Linux</span> Independent distribution developed entirely by volunteers

Void Linux is an independent Linux distribution that uses the X Binary Package System (XBPS) package manager, which was designed and implemented from scratch, and the runit init system. Excluding binary kernel blobs, a base install is composed entirely of free software.

<span class="mw-page-title-main">Redox (operating system)</span> Operating system written in Rust

Redox is a Unix-like microkernel operating system written in the programming language Rust, which has a focus on safety, stability, and performance. Redox aims to be secure, usable, and free. Redox is inspired by prior kernels and operating systems, such as SeL4, MINIX, Plan 9, and BSD. It is free and open-source software distributed under an MIT License.

<span class="mw-page-title-main">Fuchsia (operating system)</span> Computer operating system by Google

Fuchsia is an open-source capability-based operating system developed by Google. In contrast to Google's Linux-based operating systems such as ChromeOS and Android, Fuchsia is based on a custom kernel named Zircon. It publicly debuted as a self-hosted git repository in August 2016 without any official corporate announcement. After years of development, its official product launch was in 2021 on the first-generation Google Nest Hub, replacing its original Linux-based Cast OS.

WebGPU is a JavaScript API provided by a web browser that enables webpage scripts to efficiently utilize a device's graphics processing unit (GPU). This is achieved with the underlying Vulkan, Metal, or Direct3D 12 system APIs. On relevant devices, WebGPU is intended to supersede the older WebGL standard.

ToaruOS is a hobby operating system and kernel developed largely independently by K. Lange. Despite a 1.0 version being released, Lange has stated that it is still 'incomplete', and may not be 'suitable for any purpose you might have for an operating system'. It is released under the permissive UIUC License, and supports 64-bit computer hardware with SMP.

postmarketOS Free and open-source operating system for smartphones, based on Alpine Linux

postmarketOS is an operating system primarily for smartphones, based on the Alpine Linux distribution.

<span class="mw-page-title-main">MsQuic</span> Microsoft open source library

MsQuic is a free and open source implementation of the IETF QUIC protocol written in C that is officially supported on the Microsoft Windows, Linux, and Xbox platforms. The project also provides libraries for macOS and Android, which are unsupported. It is designed to be a cross-platform general purpose QUIC library optimized for client and server applications benefitting from maximal throughput and minimal latency. By the end of 2021 the codebase had over 200,000 lines of production code, with 50,000 lines of "core" code, sharable across platforms. The source code is licensed under MIT License and available on GitHub.

io_uring is a Linux kernel system call interface for storage device asynchronous I/O operations addressing performance issues with similar interfaces provided by functions like read /write or aio_read /aio_write etc. for operations on data accessed by file descriptors.

<span class="mw-page-title-main">SerenityOS</span> Hobbyist desktop computing operating system

SerenityOS is a free and open source desktop operating system that has been in continuous development since 2018. Initially the one-man project of Swedish programmer Andreas Kling, SerenityOS is now developed by a community of hobbyists. The system supports the x86-64 instruction set, features a preemptive kernel, and hosts multiple complex applications including its own web browser, Ladybird, and integrated development environment (IDE).

<span class="mw-page-title-main">OpenHarmony</span> Family of open-source operating systems based on OpenHarmony

OpenAtom OpenHarmony, or abbreviated as OpenHarmony (OHOS), is a family of open-source distributed operating systems based on HarmonyOS derived from LiteOS, donated the L0-L2 branch source code by Huawei to the OpenAtom Foundation. Similar to HarmonyOS, the open-source distributed operating system is designed with a layered architecture, which consists of four layers from the bottom to the top, i.e., the kernel layer, system service layer, framework layer, and application layer. It is also an extensive collection of free software, which can be used as an operating system or can be used in parts with other operating systems via Kernel Abstraction Layer subsystems.

References

  1. Seyler, Ian. "kernel.asm". BareMetal OS GitHub repository. Retrieved May 24, 2017.
  2. 1 2 Voorsanger, Conrad (June 2, 2011). "Interview With Baremetal OS' Ian Seyler". OSNews . Retrieved May 26, 2014.
  3. Adams, David (July 14, 2010). "BareMetal OS". OSNews . Retrieved May 26, 2014.
  4. Benchoff, Brian (May 27, 2011). "64-bit OS written entirely in assembly". Hack A Day. Retrieved May 26, 2014.
  5. Seyler, Ian. "Return Infinity (home page), The BareMetal advantage". Return Infinity. Retrieved February 2, 2015.
  6. Smith, Jesse (July 19, 2010). "DistroWatch Weekly, Issue 363". DistroWatch . Retrieved May 26, 2014.
  7. "BareMetal OS Requirements". Return Infinity (archived copy at Wayback Machine). Archived from the original on September 6, 2014. Retrieved September 6, 2014.
  8. "BareMetal OS Queue" . Retrieved April 28, 2015.
  9. Seyler, Ian. "API documentation". BareMetal OS GitHub repository. Retrieved June 26, 2015.
  10. Seyler, Ian (January 17, 2014). "Newlib build script". BeareMetal OS Google Group . Retrieved February 2, 2015.
  11. Seyler, Ian. "newlib.sh". Build scripts for BareMetal OS and its related utilities, GitHub repository. Retrieved February 2, 2015.
  12. Lodyagin, Sergei (November 17, 2013). "Bare C++ library". BeareMetal OS Google Group . Retrieved February 2, 2015.
  13. Lodyagin, Sergei. "The Bare C++ library". The Bare C++ library GitHub repository. Retrieved February 2, 2015.
  14. Seyler, Ian. "Add Rust example". BareMetal OS GitHub repository (legacy version). Retrieved March 18, 2018.
  15. Seyler, Ian (August 22, 2013). "TCP/IP". BeareMetal OS Google Group . Retrieved February 2, 2015.
  16. Seyler, Ian (October 31, 2014). "BareMetal and lwIP". BeareMetal OS Google Group . Retrieved February 2, 2015.
  17. Seyler, Ian. "minIP - A minimalist IP stack written in ANSI C". BareMetal OS GitHub repository. Retrieved May 24, 2017.