BareMetal

Last updated
BareMetal
Developer Return Infinity
Written in Assembly
Working stateCurrent
Source model Open source
Initial release2008;13 years ago (2008)
Latest release 1.0.0 / November 13, 2017;3 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

ReactOS Free software Windows NT-like operating system

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

Arch Linux is a Linux distribution meant for computers with x86-64 processors. Arch Linux adheres to the KISS principle and is focused on simplicity, modernity, pragmatism, user centrality, and versatility. In practice, this means the project attempts to have minimal distribution-specific changes, and therefore minimal breakage with updates, and be pragmatic over ideological design choices and focus on customizability rather than user-friendliness.

Git Free and open-source software (FOSS) for version control

Git is software for tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows.

seccomp is a computer security facility in the Linux kernel. seccomp allows a process to make a one-way transition into a "secure" state where it cannot make any system calls except exit , sigreturn , read and write to already-open file descriptors. Should it attempt any other system calls, the kernel will terminate the process with SIGKILL or SIGSYS. In this sense, it does not virtualize the system's resources but isolates the process from them entirely.

Mercurial Distributed revision-control tool for software developers

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

The Embeddable Linux Kernel Subset (ELKS), formerly known as Linux-8086, is a Linux-like operating system kernel. It is a subset of the Linux kernel, intended for 16-bit computers with limited processor and memory resources such as machines powered by Intel 8086 and compatible microprocessors not supported by 32-bit Linux.


This is a comparison of notable free and open-source configuration management software, suitable for tasks like server configuration, orchestration and infrastructure as code typically performed by a system administrator.

Parabola GNU/Linux-libre Linux distribution offering only free software

Parabola GNU/Linux-libre is an operating system for the i686, x86-64 and ARMv7 architectures. It is based on many of the packages from Arch Linux and Arch Linux ARM, but distinguishes from the former 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.

elementary OS Desktop operating system based on Ubuntu

elementary OS is a Linux distribution based on Ubuntu LTS. It promotes itself as a "thoughtful, capable, and ethical" replacement to macOS and Windows and has a pay-what-you-want model. The operating system, the desktop environment, and accompanying applications are developed and maintained by Elementary, Inc.

Whonix Anonymous Operating System

Whonix is a Debian–based security-focused Linux distribution. It aims to provide privacy, security and anonymity on the internet. The operating system consists of two virtual machines, a "Workstation" and a Tor "Gateway", running Debian Linux. All communications are forced through the Tor network to accomplish this.

RIOT (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).

Nim (programming language) Programming language

Nim is an imperative, general-purpose, multi-paradigm, statically typed, systems, compiled programming language designed and developed by Andreas Rumpf. It is designed to be "efficient, expressive, and elegant", supporting metaprogramming, functional, message passing, procedural, and object-oriented programming styles by providing several features such as compile time code generation, algebraic data types, a foreign function interface (FFI) with C, C++, Objective-C, and JavaScript, and supporting compiling to those same languages.

NextBSD

NextBSD was an operating system initially based on the trunk version of FreeBSD as of August 2015. It is a fork of FreeBSD which implements new features developed on branches but not yet implemented in FreeBSD. As of 2019 the website seems defunct, and the later commits on GitHub date from October 2019. The Wayback Machine captures of the website after 2016-12-15 are domain squatter pages and as of 2021-03-17 the site is redirecting to a fake "Apple Support" page.

Void Linux

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, but users can access an official non-free repository to install proprietary software.

Redox (operating system) 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 similar to GNU and BSD, but is written in a memory-safe language. It is free and open-source software distributed under an MIT License.

Google Fuchsia Computer operating system by Google

Fuchsia is an open-source capability-based operating system developed by Google. It first became known to the public when the project appeared on a self-hosted form of git in August 2016 without any official announcement. The reasoning behind the name is "Pink + Purple = Fuchsia ", which is a reference to Pink and Purple. In contrast to prior Google-developed operating systems such as Chrome OS and Android, which are based on the Linux kernel, Fuchsia is based on a new kernel called Zircon. After years of development, Fuchsia was officially released to the public on the first-generation Google Nest Hub, replacing its original Cast OS.

FlatBuffers is a free software library implementing a serialization format similar to Protocol Buffers, Thrift, Apache Avro, SBE, and Cap'n Proto, primarily written by Wouter van Oortmerssen and open-sourced by Google. Like Cap'n Proto and SBE, it supports “zero-copy” deserialization, so that accessing the serialized data does not require first copying it into a separate part of memory, which makes accessing data in these formats much faster than data in formats requiring more extensive processing, such as JSON, CSV, and in many cases Protocol Buffers. Compared to other serialization formats however, the handling of FlatBuffers requires usually more code, and some operations are not possible.

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

PostmarketOS is a free and open-source operating system under development primarily for smartphones, based on the Alpine Linux distribution.

KaOS

KaOS is a Linux distribution that is built from scratch with a very specific focus on Qt and KDE.

Microsoft, a technology company known for its opposition to the open source software paradigm, turned to embrace the approach in the 2010s. From the 1970s through 2000s under CEOs Bill Gates and Steve Ballmer, Microsoft viewed the community creation and sharing of communal code, later to be known as free and open source software, as a threat to its business, and both executives spoke negatively against it. In the 2010s, as the industry turned towards cloud, embedded, and mobile computing—technologies powered by open source advances—CEO Satya Nadella led Microsoft towards open source adoption although Microsoft's traditional Windows business continued to grow throughout this period generating revenues of 26.8 billion in the third quarter of 2018, while Microsoft's Azure cloud revenues nearly doubled.

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.