kerneldevice-driverhardware-interfacehardware

What is an OS' HAL?


The hardware abstraction layer (HAL) is (AFAIK) the lowest level software within a computing system. Thus, is it a set of functions implemented in assembly language (specific for a particular processor) which are called by some routines from the OS installed "over" it? If it is so, then, who is the one who provides it? The hardware manufacturer? Or, whether it is not separate from the OS, then, how does the OS developer know all the particularities of all the processors from the entire world and what is its purpose if the OS developer has to write a HAL for every OS?


Solution

  • I believe it's safe to think of the HAL roughly as an I/O driver for your CPU. In any reasonable circumstance, you should expect the manufacturer of an I/O device to provide you with its driver. The same applies to a CPU and its HAL.

    You asked:

    Or, whether it is not separate from the OS, then, how does the OS developer know all the particularities of all the processors from the entire world and what is its purpose if the OS developer has to write a HAL for every OS?

    This is actually what the HAL is intended to address. At one point, the OS was roughly expected to handle everything. But, as hardware became more complex, an additional abstraction layer was introduced.