Operating System 15
Micro Kernel Based OS
Prof Neeraj Bhargava
Vaibhav Khanna
Department of Computer Science
School of Engineering and Systems Sciences
Maharshi Dayanand Saraswati University Ajmer
Kernel based OS
• Everything below the system-call interface and
above the physical hardware is the kernel.
• The kernel provides the file system, CPU
scheduling, memory management, and other
operating system functions through system calls.
• Taken in sum, that is an enormous amount of
functionality to be combined into one level.
• Systems programs use the kernel-supported
system calls to provide useful functions, such as
compilation and file manipulation.
Kernel based OS
• System calls define the programmer interface to UNIX; the set of
systems programs commonly available defines the user interface.
• The programmer and user interfaces define the context that the
kernel must support.
• Several versions of UNIX have been developed in which the kernel is
partitioned further along functional boundaries.
• The AIX operating system, IBM's version of kernel based OS
separates the kernel into two parts.
• Mach, from Carnegie Mellon University, reduces the kernel to a
small set of core functions by moving all nonessentials into systems
and even into user-level programs.
• What remains is a microkernel operating system implementing only
a small set of necessary primitives.
Microkernel System Structure
• Moves as much from the kernel into user space
• Mach example of microkernel
– Mac OS X kernel (Darwin) partly based on Mach
• Communication takes place between user
modules using message passing
• Benefits:
– Easier to extend a microkernel
– Easier to port the operating system to new
architectures
– More reliable (less code is running in kernel mode)
– More secure
• Detriments:
– Performance overhead of user space to kernel space
communication
Microkernel System Structure
Application
Program
File
System
Device
Driver
Interprocess
Communication
memory
managment
CPU
scheduling
messages
messages
microkernel
hardware
user
mode
kernel
mode
Modules
• Many modern operating systems
implement loadable kernel modules
– Uses object-oriented approach
– Each core component is separate
– Each talks to the others over known
interfaces
– Each is loadable as needed within the kernel
• Overall, similar to layers but with more
flexible
– Linux, Solaris, etc
Solaris Modular Approach
Extensible Nucleus, or Microkernel,
Organization
• The extensible nucleus organization is a modular organization
intended to implement real-time systems, timesharing systems, and
the like, by using a common set of skeletal facilities.
• The approach is to define two types of modules for any particular
OS: policy-specific modules and the skeletal policy-independent
modules.
• The policy-independent modules implement the extensible nucleus,
or microkernel.
• It is not intended to provide complete functionality. Rather, it is
supposed to create an environment in which policy-specific
operating systems can be constructed to meet the needs of an
application domain.
• The skeletal component is a general-purpose foundation for policy-
specific parts of the architecture.
Philosophy of Policy based OS
• The philosophy behind this approach is that the OS can be
implemented in two parts:
• (1) a mechanism-dependent, hardware-dependent part
• (2) a policy-dependent, hardware-independent part.
• The first part provides a low-level virtual machine with some form
of memory and process management, usually with only the bare
essentials for device management.
• The second part reflects the requirements of the specific OS. This
architecture supports two new directions in operating systems.
• It allows policy-dependent variants of an OS to be built on a single
hardware platform.
• The microkernel provides skeletal, policy-independent functions
that are extended with specialized servers to implement a policy.
Microkernel
• A microkernel (also known as μ-kernel) is the
near-minimum amount ofsoftware that can
provide the mechanisms needed to implement an
operating system (OS).
• These mechanisms include low-level address
space management, thread management, and
inter-process communication (IPC).
• Early operating system kernels were rather small,
partly because computer memory was limited.
• As the capability of computers grew, the number
of devices the kernel had to control also grew.
Era of Big Kernels
• The Berkeley Software Distribution (BSD) of Unix began
the era of big kernels.
• In addition to operating a basic system consisting of
the CPU, disks and printers, BSD started adding
additional file systems, a complete TCP/IP networking
system, and a number of "virtual" devices that allowed
the existing programs to work invisibly over the
network.
• This growth continued for many years, resulting in
kernels with millions of lines of source code.
• As a result of this growth, kernels were more prone to
bugs and became increasingly difficult to maintain.
Monolithic to Microkernels
Birth of Micro Kernels
• The microkernel was designed to address the
increasing growth of kernels and the
difficulties that came with them.
• In theory, the microkernel design allows for
easier management of code due to its division
into user space services.
• This also allows for increased security and
stability resulting from the reduced amount of
code running in kernel mode
Microkernels and IPC
• Inter-process communication (IPC) is any mechanism which
allows separate processes to communicate with each other,
usually by sending messages.
• Shared memory is strictly speaking also an inter-process
communication mechanism, but the abbreviation IPC
usually only refers to message passing, and it is the latter
that is particularly relevant to microkernels.
• IPC allows the operating system to be built from a number
of small programs called servers, which are used by other
programs on the system, invoked via IPC.
• Most or all support for peripheral hardware is handled in
this fashion, with servers for device drivers, network
protocol stacks, file systems, graphics, etc.
Server Based Approach in Microkernel
• A basic set of servers for a general-purpose
microkernel includes file system servers, device driver
servers, networking servers, display servers, and user
interface device servers.
• This set of servers (drawn from QNX) provides roughly
the set of services offered by a Unix monolithic kernel.
• The necessary servers are started at system startup and
provide services, such as file, network, and device
access, to ordinary application programs.
• Many "crashes" can be corrected by simply stopping
and restarting the server
Assignment
• Explain the need and concept of MicroKernels.

Operating system 15 micro kernel based os

  • 1.
    Operating System 15 MicroKernel Based OS Prof Neeraj Bhargava Vaibhav Khanna Department of Computer Science School of Engineering and Systems Sciences Maharshi Dayanand Saraswati University Ajmer
  • 2.
    Kernel based OS •Everything below the system-call interface and above the physical hardware is the kernel. • The kernel provides the file system, CPU scheduling, memory management, and other operating system functions through system calls. • Taken in sum, that is an enormous amount of functionality to be combined into one level. • Systems programs use the kernel-supported system calls to provide useful functions, such as compilation and file manipulation.
  • 3.
    Kernel based OS •System calls define the programmer interface to UNIX; the set of systems programs commonly available defines the user interface. • The programmer and user interfaces define the context that the kernel must support. • Several versions of UNIX have been developed in which the kernel is partitioned further along functional boundaries. • The AIX operating system, IBM's version of kernel based OS separates the kernel into two parts. • Mach, from Carnegie Mellon University, reduces the kernel to a small set of core functions by moving all nonessentials into systems and even into user-level programs. • What remains is a microkernel operating system implementing only a small set of necessary primitives.
  • 4.
    Microkernel System Structure •Moves as much from the kernel into user space • Mach example of microkernel – Mac OS X kernel (Darwin) partly based on Mach • Communication takes place between user modules using message passing • Benefits: – Easier to extend a microkernel – Easier to port the operating system to new architectures – More reliable (less code is running in kernel mode) – More secure • Detriments: – Performance overhead of user space to kernel space communication
  • 5.
  • 6.
    Modules • Many modernoperating systems implement loadable kernel modules – Uses object-oriented approach – Each core component is separate – Each talks to the others over known interfaces – Each is loadable as needed within the kernel • Overall, similar to layers but with more flexible – Linux, Solaris, etc
  • 7.
  • 8.
    Extensible Nucleus, orMicrokernel, Organization • The extensible nucleus organization is a modular organization intended to implement real-time systems, timesharing systems, and the like, by using a common set of skeletal facilities. • The approach is to define two types of modules for any particular OS: policy-specific modules and the skeletal policy-independent modules. • The policy-independent modules implement the extensible nucleus, or microkernel. • It is not intended to provide complete functionality. Rather, it is supposed to create an environment in which policy-specific operating systems can be constructed to meet the needs of an application domain. • The skeletal component is a general-purpose foundation for policy- specific parts of the architecture.
  • 9.
    Philosophy of Policybased OS • The philosophy behind this approach is that the OS can be implemented in two parts: • (1) a mechanism-dependent, hardware-dependent part • (2) a policy-dependent, hardware-independent part. • The first part provides a low-level virtual machine with some form of memory and process management, usually with only the bare essentials for device management. • The second part reflects the requirements of the specific OS. This architecture supports two new directions in operating systems. • It allows policy-dependent variants of an OS to be built on a single hardware platform. • The microkernel provides skeletal, policy-independent functions that are extended with specialized servers to implement a policy.
  • 10.
    Microkernel • A microkernel(also known as μ-kernel) is the near-minimum amount ofsoftware that can provide the mechanisms needed to implement an operating system (OS). • These mechanisms include low-level address space management, thread management, and inter-process communication (IPC). • Early operating system kernels were rather small, partly because computer memory was limited. • As the capability of computers grew, the number of devices the kernel had to control also grew.
  • 11.
    Era of BigKernels • The Berkeley Software Distribution (BSD) of Unix began the era of big kernels. • In addition to operating a basic system consisting of the CPU, disks and printers, BSD started adding additional file systems, a complete TCP/IP networking system, and a number of "virtual" devices that allowed the existing programs to work invisibly over the network. • This growth continued for many years, resulting in kernels with millions of lines of source code. • As a result of this growth, kernels were more prone to bugs and became increasingly difficult to maintain.
  • 12.
  • 13.
    Birth of MicroKernels • The microkernel was designed to address the increasing growth of kernels and the difficulties that came with them. • In theory, the microkernel design allows for easier management of code due to its division into user space services. • This also allows for increased security and stability resulting from the reduced amount of code running in kernel mode
  • 14.
    Microkernels and IPC •Inter-process communication (IPC) is any mechanism which allows separate processes to communicate with each other, usually by sending messages. • Shared memory is strictly speaking also an inter-process communication mechanism, but the abbreviation IPC usually only refers to message passing, and it is the latter that is particularly relevant to microkernels. • IPC allows the operating system to be built from a number of small programs called servers, which are used by other programs on the system, invoked via IPC. • Most or all support for peripheral hardware is handled in this fashion, with servers for device drivers, network protocol stacks, file systems, graphics, etc.
  • 15.
    Server Based Approachin Microkernel • A basic set of servers for a general-purpose microkernel includes file system servers, device driver servers, networking servers, display servers, and user interface device servers. • This set of servers (drawn from QNX) provides roughly the set of services offered by a Unix monolithic kernel. • The necessary servers are started at system startup and provide services, such as file, network, and device access, to ordinary application programs. • Many "crashes" can be corrected by simply stopping and restarting the server
  • 16.
    Assignment • Explain theneed and concept of MicroKernels.