2. microkernel new

21
Operating System Support Including 1.Introduction 2.The OS layer 3.Protection 4.Processes & Threads 5.Operating System Architecture

Upload: abdul-thayyal

Post on 15-Jul-2015

94 views

Category:

Documents


2 download

TRANSCRIPT

Operating System Support

Including

1.Introduction

2.The OS layer

3.Protection

4.Processes & Threads

5.Operating System Architecture

Operating System Architecture

Definition of Kernel• The fundamental part of an operating system.

• Responsible for providing secure access to the machine's hardware for various programs.

• Responsible for deciding when and how long a program can use a certain hardware.

Hardware must provide at least two execution levels:

• Kernel mode In this mode, the software has access to all the instructions and every piece of hardware.

• User mode In this mode, the software is restricted and cannot execute some instructions, and is denied access to some hardware.

Types of Kernels

1. Monolithic Kernels

2. Micro kernels

3. Hybrid Kernels

4. NanoKernels

5. Exokernels

Monolithic Kernels• All OS services operate in kernel space• Good performance• Execute all of their code in the same address

space (kernel space)• Rich and powerful hardware access• Monolithic Kernel : Kernel Image = (Kernel

Core+Kernel Services). When system boots up entire services are loaded and resides in memory.

• Example: Windows and Unix.

1. Monolithic Kernels

Disadvantages

Disadvantages The dependencies between system components A bug in a driver might crash the entire system Large kernels → very difficult to maintain

• E.g. Unix, Linux

Microkernels

• Minimalist approach– IPC, virtual memory, thread scheduling

• Put the rest into user space– Device drivers, networking, file system, user interface• Run most of their services in user space

→improve maintainability and modularity• Micro kernel : Kernel Image = Kernel Core. Services are

build into special modules which can be loaded and unloaded as per need.

Microkernel

• Disadvantages– Lot of system calls and context switches

• E.g. Mach, L4, AmigaOS, K42

17

Operating System Architecture

Monolithic Kernel Microkernel

Server: Dynamically loaded server program:Kernel code and data:

.......

.......

Key:

S4

S1 .......

S1 S2 S3

S2 S3 S4

Figure 5. Monolithic kernel and microkernel

Couloris,Dollimore and Kindberg Distributed Systems: Concepts & Design Edn. 4 , Pearson Education 2005

Summary: Kernels• Monolithic kernels

– Advantages: performance– Disadvantages: difficult to debug and maintain

• Microkernels– Advantages: more reliable and secure– Disadvantages: more overhead

• Hybrid Kernels– Advantages: benefits of monolithic and microkernels– Disadvantages: same as monolithic kernels

• Nano kernel & Exo kernels– Advantages: minimal and simple– Disadvantages: more work for application developers

Thank You