System Structure


Operating-System Structure


For efficient performance and implementation an OS should be partitioned into separate subsystems, each with carefully defined tasks, inputs, outputs, and performance characteristics. These subsystems can then be arranged in various architectural configurations:
 

  • Simple Structure
  • Layered Approach
  • Microkernels
1) Simple Structure:It does not break the system into subsystems, and has no distinction between user and kernel modes, allowing all programs direct access to the underlying hardware.

Figure 2.11 - MS-DOS layer structure
The original UNIX OS used a simple layered approach, but almost all the OS was in one big layer, not really breaking the OS down into layered subsystems:




Figure 2.12 - Traditional UNIX system structure

2) Layered Approach


  • Another approach is to break the OS into a number of smaller layers, each of which rests on the layer below it, and relies solely on the services provided by the next lower layer.
  • This approach allows each layer to be developed and debugged independently, with the assumption that all lower layers have already been debugged and are trusted to deliver proper services.
  • The problem is deciding what order in which to place the layers, as no layer can call upon the services of any higher layer, and so many chicken-and-egg situations may arise.
  • Layered approaches can also be less efficient, as a request for service from a higher layer has to filter through all lower layers before it reaches the HW, possibly with significant processing at each step.

Figure 2.13 - A layered operating system

3) Microkernels

  • The basic idea behind micro kernels is to remove all non-essential services from the kernel, and implement them as system applications instead, thereby making the kernel as small and efficient as possible.
  • Most microkernels provide basic process and memory management, and message passing between other services, and not much more.
  • Security and protection can be enhanced, as most services are performed in user mode, not kernel mode.
  • System expansion can also be easier, because it only involves adding more system applications, not rebuilding a new kernel.
  • Mach was the first and most widely known microkernel, and now forms a major component of Mac OSX.
  • Windows NT was originally microkernel, but suffered from performance problems relative to Windows 95. NT 4.0 improved performance by moving more services into the kernel, and now XP is back to being more monolithic.
  • Another microkernel example is QNX, a real-time OS for embedded systems.

Figure 2.14 - Architecture of a typical microkernel




No comments:

Post a Comment