bare machine
   HOME

TheInfoList



OR:

In
information technology Information technology (IT) is a set of related fields within information and communications technology (ICT), that encompass computer systems, software, programming languages, data processing, data and information processing, and storage. Inf ...
, bare machine (or bare-metal computer) is a
computer A computer is a machine that can be Computer programming, programmed to automatically Execution (computing), carry out sequences of arithmetic or logical operations (''computation''). Modern digital electronic computers can perform generic set ...
which has no
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
. The software executed by a bare machine, commonly called a "bare metal program" or "bare metal application", is designed to interact directly with hardware. Bare machines are widely used in
embedded system An embedded system is a specialized computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is e ...
s, particularly in cases where resources are limited or high performance is required.


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.


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 In computing, an emulator is Computer hardware, hardware or software that enables one computer system (called the ''host'') to behave like another computer system (called the ''guest''). An emulator typically enables the host system to run sof ...
, 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 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) ...
, C++, C, or
assembly language In computing, assembly language (alternatively assembler language or symbolic machine code), often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence bet ...
.


Examples


Early computers

Early computers, such as the PDP-11, allowed programmers to load a program, supplied in
machine code In computer programming, machine code is computer code consisting of machine language instructions, which are used to control a computer's central processing unit (CPU). For conventional binary computers, machine code is the binaryOn nonb ...
, to RAM. The resulting operation of the program could be monitored by lights, and output derived from
magnetic tape Magnetic tape is a medium for magnetic storage made of a thin, magnetizable coating on a long, narrow strip of plastic film. It was developed in Germany in 1928, based on the earlier magnetic wire recording from Denmark. Devices that use magnetic ...
, print devices, or storage. Amdahl UTS's performance improves by 25% when run on bare metal without VM, the company said in 1986.


Embedded systems

Bare machine programming is a common practice in
embedded system An embedded system is a specialized computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is e ...
s, in which
microcontroller A microcontroller (MC, uC, or μC) or microcontroller unit (MCU) is a small computer on a single integrated circuit. A microcontroller contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals. Pro ...
s or
microprocessor A microprocessor is a computer processor (computing), processor for which the data processing logic and control is included on a single integrated circuit (IC), or a small number of ICs. The microprocessor contains the arithmetic, logic, a ...
s boot directly into monolithic, single-purpose software without loading an operating system. Such
embedded software Embedded software is computer software, written to control machines or devices that are not typically thought of as computers, commonly known as embedded systems. It is typically specialized for the particular hardware that it runs on and has tim ...
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.


See also

* Bare machine computing * Barebone computer * Standalone program


References


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 Classes of computers History of software Operating systems