In: Computer Science
How do you differentiate layered approach from Micro-kernel approach and Modular approach. Compare their advantages and disadvantages. ?
How could a system be designed to allow a choice of operating systems to boot from? What would the bootstrap program need to do?
An operation system is a construct that allows the user application programs to interact with the system hardware.
layered approach:it breaks up the operating system into different layers,each layer performing a specific functionality. This allows implementers to change the inner workings, and increases modularity. as long as the external interface of the routines don't change, developers have more freedom to change the inner workings of the routines. the main advantage of layered approach is simplicity of construction and debugging. The layer are selected so that each uses functions and services of only lower level layers.This approach simplifies debugging and system varifications. The bottom layer is the hardware and the topmost layer is the user interface. the main disadvantage of this approach is that at each layer , the data needs to be modified and passed on which adds overhead to the system. moreover careful planning of these layers is necessary as a layer can use only lower level layers.
Micro-kernel approach: In this approach remove all non-essential components from the kernel and implementing them as system and user programs.This result in a smaller kernel called the micro kernel.The entire operating system works in the kernel space. The main advantages of this approach are that all new services need to be added to user space and does not require the kernel to be modified.Thus it is more secure and reliable as if a service fails then rest of the operating system remains untouched.The disadvantages of this approach are the services in micro kernel approach are expensive. And context switch or a function call needed when the drivers are implemented as procedures or processes, respectively.The new commands require rewriting the interpreter program which ,after a number of modifications ,may get complicated,messy or too large.
Modular Approach: In this approach its various functions broken into distinct processes, each with its own interface.It involves designing of modular kernel. The kernel has only set of core components and other services are dynamically loadable modules to the kernel either during run time or boot time.It resembles layered structure due to the fact that each kernel has defined and protected interfaces but it is more flexible than the layered structure as a module can cany other module. The primary benefit of the modular approach is that each process operates independently ,and if one of them fails or needs an update , it won't affect any of the other function.THe disadvanages are it may loss stability. if there is a module that does something bad , the lernel can crash, as modules should have full permissions. And there for security is compromised.A module can do anything , so one could easy write an evil module to crash things.Coding can be more difficult, as the module cannot refrence kernel procedures without kernel symbols.
consider a system that would like to run both windows XP and three different distribution of Linux(eg: RedHat,Debian,and Mandrake.)Each operating system will be stored on disk.During system boot-up,a special program,which will be call the boot manager will determine which operating system to boot into.It means that rather initially booting to an operating system, the boot manager will first run during system startup. The boot manager must be stored at certain location of the hard disk to be recognized during system startup. boot managers often provide the user with the selection of systems to boot into , boot manager are also typically designed to boot into a default operating system if no choice is selected by the user