kernel (os)

22
KERNEL

Upload: -

Post on 21-Jan-2017

1.053 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Kernel (OS)

KERNEL

Page 2: Kernel (OS)

WHAT IS KERNEL?• In computing, the kernel is the central component of most computer

operating systems; it is a bridge between applications and the actual data processing done at the hardware level.• It acts as an interface between the user applications and the hardware.• The sole aim of kernel is to manage the communication between the

software (user level applications) and the hardware (CPU, disk memory etc)• When a process makes requests of the kernel, the request is called a

system call. Various kernel designs differ in how they manage system calls and resources.

Page 3: Kernel (OS)
Page 4: Kernel (OS)

TYPES OF KERNELS:

• Micro Kernel:Only the very important parts like INTER process communication(IPC) , basic schedular, basic memory handling , basic I/O primitives are placed in kernel. Others are maintained as server processes in user space . Communication is done by message passing .• The kernel is broken down into separate processes, known as servers. Some of

the servers run in kernel space and some run in user-space. All servers are kept separate and run in different address spaces. The communication in microkernels is done via message passing. The servers communicate through InterProcess Communication IPC. Servers invoke “services” from each other by sending messages.

Page 5: Kernel (OS)

ADVANTAGES OF MICROKERNEL• Microkernels are easier to maintain than monolithic kernels, but the

large number of system calls and context switches might slow down the system because they typically generate more overhead than plain function calls. A microkernel allows the implementation of the remaining part of the operating system as a normal application program written in a high-level language• Crash resistant ( if one server fails, other servers can still work

efficiently.)• Portable• Smaller in Size

Page 6: Kernel (OS)

Slower processing because of additional message passing.

DISADVANTAGES OF MICROKERNEL:

Page 7: Kernel (OS)

MONOLITHIC KERNEL

• MONOLITHIC KERNEL: It runs every basic system service like process and memory management, interrupt handling and I/O communication, file system etc. in kernel space. Examples are Linux, Unix.

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

Page 8: Kernel (OS)
Page 9: Kernel (OS)

HYBRID KERNEL:

• One other type of kernel is called a hybrid kernel which lies on the boundary between monolithic kernels and microkernels. This means it has qualities of both, but hybrid kernels cannot be classified as a monolithic kernel or microkernel exclusively.

Combine the best of both worlds• Speed and simple design of a monolithic kernel•Modularity and stability of a microkernel

Page 10: Kernel (OS)

HYBRID KERNELS:

Advantages:• Benefits of monolithic and microkernelsDisadvantages:• Same as monolithic kernels

Page 11: Kernel (OS)
Page 12: Kernel (OS)
Page 13: Kernel (OS)

KERNEL’S RESPONSIBILITIES:

• The central processing unit• Random access memory• INPUT/OUTPUT devices• Memory management • Device management • System calls

Page 14: Kernel (OS)

THE CENTRAL PROCESSING UNIT

• This central component of a computer system is responsible for running or executing programs. The kernel takes responsibility for deciding at any time which of the many running programs should be allocated to the processor or processors (each of which can usually run only one program at a time).

Page 15: Kernel (OS)

RANDOM ACCESS MEMORY

• Random-access memory is used to store both program instructions and data. Typically, both need to be present in memory in order for a program to execute. Often multiple programs will want access to memory, frequently demanding more memory than the computer has available. The kernel is responsible for deciding which memory each process can use, and determining what to do when not enough memory is available.

Page 16: Kernel (OS)

INPUT/OUTPUT DEVICES

• I/O devices include such peripherals as keyboards, mice, disk drives, printers, network adapters, and display devices. The kernel allocates requests from applications to perform I/O to an appropriate device and provides convenient methods for using the device.

Page 17: Kernel (OS)

MEMORY MANAGEMENT

• The kernel has full access to the system's memory and must allow processes to safely access this memory as they require it. Often the first step in doing this is virtual addressing, usually achieved by paging and/or segmentation. Virtual addressing allows the kernel to make a given physical address appear to be another address, the virtual address. Virtual address spaces may be different for different processes; the memory that one process accesses at a particular (virtual) address may be different memory from what another process accesses at the same address. This allows every program to behave as if it is the only one (apart from the kernel) running and thus prevents applications from crashing each other.

Page 18: Kernel (OS)

DEVICE MANAGEMENT

• A kernel must maintain a list of available devices. This list may be known in advance configured by the user or detected by the operating system at run time (normally called plug and play). In a plug and play system, a device manager first performs a scan on different hardware buses, such as Peripheral Component Interconnect (PCI) or Universal Serial Bus (USB), to detect installed devices, then searches for the appropriate drivers.

Page 19: Kernel (OS)

SYSTEM CALLS

• In computing, a system call is how a program requests a service from an operating system's kernel that it does not normally have permission to run. System calls provide the interface between a process and the operating system. Most operations interacting with the system require permissions not available to a user level process, e.g. I/O performed with a device present on the system, or any form of communication with other processes requires the use of system calls.

Page 20: Kernel (OS)
Page 21: Kernel (OS)

FEATURES THAT KERNEL PROVIDES:• low-level scheduling of processes (dispatching)• inter-process communication• process synchronization• context switching• manipulation of process control blocks• interrupt handling• process creation and destruction• process suspension and resumption

Page 22: Kernel (OS)

Group members:

•Maryum Khan (D-14-CS-08)•Fawaz Ali (D-14-CS-09)•Ata Ul Munim (D-14-CS-10)•Aqsa Manzoor (D-14-CS-25)• Jaipal Puri (D-14-CS-31)