bare machine

{{short description|Computer without an operating system}}

{{Redirect|Bare metal}}

In information technology, bare machine (or bare-metal computer) is a computer which has no operating system.{{cite web |title=Understanding Bare Metal: Exploring the Meaning and Benefits |url=https://www.databank.com/resources/blogs/what-is-bare-metal-meaning/ |publisher=DataBank |access-date=17 January 2025}} The software executed by a bare machine, commonly called a "bare metal program" or "bare metal application",{{cite web |title=Bare Metal Overview |url=https://www.intel.com/content/www/us/en/docs/programmable/683211/current/bare-metal-overview.html#:~:text=Firmware%20applications%20intended%20to%20run,and%20run%20without%20an%20OS. |publisher=Intel |access-date=17 January 2025}} is designed to interact directly with hardware. Bare machines are widely used in embedded systems, particularly in cases where resources are limited or high performance is required.{{cite web |last1=Beningo |first1=Jacob |title=Is Bare-Metal Programming Dead? |url=https://www.designnews.com/embedded-systems/is-bare-metal-programming-dead- |publisher=DesignNews |access-date=17 January 2025}}

Advantages

Typically, a bare-metal application will run faster, use less memory and be more power efficient than an equivalent program that relies on an operating system, due to the inherent overhead imposed by system calls. For example, hardware inputs and outputs are directly accessible to bare metal software, whereas they must be accessed through system calls when using an OS.{{Cite journal|url=https://dl.acm.org/doi/pdf/10.1145/2248487.2151020|doi = 10.1145/2248487.2151020|title = ELI|year = 2012|last1 = Gordon|first1 = Abel|last2 = Amit|first2 = Nadav|last3 = Har'El|first3 = Nadav|last4 = Ben-Yehuda|first4 = Muli|last5 = Landau|first5 = Alex|last6 = Schuster|first6 = Assaf|last7 = Tsafrir|first7 = Dan|journal = ACM SIGPLAN Notices|volume = 47|issue = 4|pages = 411–422|url-access = subscription}}

Disadvantages

Bare metal applications typically require more effort to develop because operating system services such as memory management and task scheduling are not available.

Debugging a bare-metal program may be complicated by factors such as:

  • Lack of a standard output.
  • The target machine may differ from the hardware used for program development (e.g., emulator, simulator). This forces setting up a way to load the bare-metal program onto the target (flashing), start the program execution and access the target resources.

Bare-metal programming is generally done using a close-to-hardware language such as Rust, C++, C, or assembly language.{{Cite web|url=https://arobenko.gitbooks.io/bare_metal_cpp/content|title=Practical Guide to Bare Metal C++|access-date=December 16, 2022}}

Examples

= Early computers =

Early computers, such as the PDP-11, allowed programmers to load a program, supplied in machine code, to RAM. The resulting operation of the program could be monitored by lights, and output derived from magnetic tape, print devices, or storage.

= Embedded systems =

{{Wikibooks|Embedded Systems|Super Loop Architecture}}

Bare machine programming is a common practice in embedded systems, in which microcontrollers or microprocessors boot directly into monolithic, single-purpose software without loading an operating system. Such embedded software can vary in structure. For example, one such program paradigm, known as "foreground-background" or "superloop" architecture, consists of an infinite main loop in which each task is executed sequentially.{{cite web |last1=Niedźwiedź |first1=Krzysztof |title=Embedded Systems Programming: A Foreground-Background (“Superloop”) Architecture |url=https://intechhouse.com/blog/embedded-systems-programming-a-foreground-background-superloop-architecture/ |access-date=17 January 2025}}

See also

References

{{Reflist}}

Further reading

  • {{cite book|first1=A.|last1=Silberschatz|first2=Peter|last2=Galvin|first3=Greg|last3=Gagne|title=Operating System Concepts|year=2003|publisher=Wiley |isbn=9780471250609|url=https://archive.org/details/operatingsystemc0006silb|url-access=registration}}

Category:Classes of computers

Category:History of software

Category:Operating systems