HLT (machine command)

from Wikipedia, the free encyclopedia

HLT is a mnemonic of the assembly language for x86 - computer architectures . It stands for the machine instruction stop ( Opcode F4 16 ) connecting the main processor (CPU) in the halt state added until an external interrupt request ( interrupt request, short IRQ) is active. In the halt state , program execution is halted, which saves the processor energy and consequently produces less heat loss. IRQs are signals with which the periphery - hardware , CPU information on events that have occurred (for example, activity on mouse or keyboard).

If the operating system has no immediate processing tasks, the idle process is executed, which in turn executes the Halt machine command . In Windows NT , for example, the System Idle Process executes the command .

history

The instruction set of all x86 processors , beginning with the Intel 8086 , includes the stop instruction. However, it was not initially designed to reduce power consumption. This only changed in 1994 with the Intel DX4 . MS-DOS provides the file POWER.EXE in versions 6.0, 6.2, 6.21 and 6.22, which can be loaded (via configuration in CONFIG.SYS ). Even if the BIOS does not provide any functions for Advanced Power Management (APM), the Halt command is used here; In tests, electricity savings of five percent were achieved.

Some of the first 100 MHz chips in the DX series had an incorrect implementation of the Halt command. As a workaround , the no-hlt argument can be passed when starting a Linux system ; thus urges the kernel no halt state , but rather leads the alternative, an endless loop of ( active waiting ).

process

The instruction set of almost every modern processor has an instruction to pause the processor when there are no tasks to be processed. This is usually preferred to active waiting.

Use in the operating system

Since the halt command can only be executed in ring  0, it can only be executed by privileged system programs such as the kernel . Due to this restriction, every application outside of ring 0 should only request the halt status if necessary via a corresponding function of the operating system programming interface (API). This enables the process scheduler to transfer the computer capacity that has become available to other processes that are ready to be executed or to switch to power-saving mode using the Halt command.

See also

Individual evidence

  1. Intel 64 and IA-32 Architectures Software Developer's Manual: Instruction Set Reference AZ . Retrieved March 1, 2012.
  2. POWER.EXE and Advanced Power Management (APM) Support . Retrieved September 27, 2015.
  3. The Linux Boot Prompt HOWTO . Retrieved November 18, 2018.