Operating system/Operating Systems Structure
Objective[edit | edit source]
Operating Systems Structure[edit | edit source]
Hardware Abstraction Layer[edit | edit source]
A hardware abstraction layer (HAL) is a layer between the physical hardware of a computer and the software that runs on that computer. The function is to hide differences in hardware, thereby providing a consistent platform on which applications may run.
The best example of an HAL can be found in the AS/400 architecture. The implementation of the LIC, or Licensed Internal Code, was so successful that software written on the predecessor, the S/38, runs without modifications on an AS/400. That, regardless of the underlying hardware having been changed dramatically; at least 3 different types of processors have been in use.
Windows NT implements a unique HAL technology that is extremely fast and makes Windows NT far more portable than most other OS technologies. Windows NT's HAL technology resides between the hardware and the base NT kernel. Windows NT is designed and optimized towards a specific architecture platform coded in portable C that is completely agnostic to the underlying hardware architecture.
Since the HAL only has to provide the differences between the Windows NT's targeted architecture platform and the actual hardware architecture it only has to translate a few operations. This approach allows Windows NT to be very fast as the HAL is under 300KB, needing to only translate the actual differences of what Windows NT expects and what the hardware provides. Because Windows NT portable C code is also compiled to native machine code for the actual hardware architecture it permits Windows NT to run as fast as the hardware architecture allows.
The specific design of the HAL in Windows NT is how Microsoft can quickly recompile and target several architectures, as they did with NT 4.0 and are once again able to easily adapt Windows 8 for ARM and several other architectures.
Windows CE borrows from Windows NT's HAL technology with an OEM Abstraction Layer (OAL), which has allowed Microsoft to easily deploy Windows CE on over a 1,000 different hardware architectures, and still compile to native machine code for each different architecture. This makes Windows CE one of the most ported OSes in history, and extremely fast even on low end hardware.
OS X, DOS, CP/M, Solaris, BSD and Linux based OS technologies use HAL technologies but are not necessary and are not inherently designed into the OS technology. These type of HAL implementations often provide very specific direct hardware access to devices that allow drivers and applications to bypass the kernel when working with the hardware. More commonly a HAL is used to provide generic drivers, especially on kernel models that require drivers to be compiled into the kernel or compiled directly to the specific device on the architecture. So a HAL is used to provide a generic interface for essential boot devices, like IDE, SCSI, PCI, ISA, etc. allowing the generic compiled driver/kernel to talk to the HAL which implements the device specific calls the devices need. This is a clever way to get generic drivers to work without needing the specific device driver to be compiled for the specific architecture.
Virtual Machines[edit | edit source]
For multi-platform operating systems, trying to generalize core components tends to make things very complex. A new philosophy emerging is to use a hypervisor (like Xen) to create a common machine interface which can then be extended to any architecture.
The Kernel[edit | edit source]
The fundamental program that is the basis of an operating system is typically referred to as a kernel. An operating system kernel is not strictly needed to run a computer. Programs can be directly loaded and executed on the "bare metal" machine, provided that the authors of those programs are willing to do without any hardware abstraction or operating system support. This was the normal operating method of many early computers, which were reset and reloaded between the running of different programs. Eventually, small ancillary programs such as program loaders and debuggers were typically left in-core between runs, or loaded from read-only memory. As these were developed, they formed the basis of what became early operating system kernels.
There are four broad categories of kernels :
Tradeoffs (micro vs macro)
Processes[edit | edit source]
A computer process is a running instance of a program, including all variables and other states. The three important components of a process are:
A multitasking operating system switches between processes to give the appearance of simultaneous execution, though in fact, in general, only one process can be executing per CPU core. Some new processors, such as Intel's Pentium 4 with Hyperthreading capability, can actually execute more than one process at a time.
Assignments[edit | edit source]