Monday 29 April 2013

Kernels and Shells








A kernel is the core component of an operating system. Using interprocess communication and system calls, it acts as a bridge between applications and the data processing performed at the hardware level.When an operating system is loaded into memory, the kernel loads first and remains in memory until the operating system is shut down again. The kernel is responsible for low-level tasks such as disk management, task management and memory management.In other words it is the intermediate between OS and hardware .




                                     this is the structure of kernel



The kernel is responsible for the following things:


#.Process management for application execution


#.Memory management, allocation and I/O

#.Device management through the use of device drivers

#.System call control, which is essential for the execution of kernel    services


There are five types of kernels


Monolithic Kernel: All operating system services run along the main kernel thread in a monolithic kernel, which also resides in the same memory area, thereby providing powerful and rich hardware access.Most work in the monolithic kernel is done via system calls. These are interfaces, usually kept in a tabular structure, that access some subsystem within the kernel such as disk operations. Essentially calls are made within programs and a checked copy of the request is passed through the system call.


                                    monolithic kernel 
                                       

Micro kernel: Defines a simple abstraction over hardware that use primitives or system calls to implement minimum OS services such as multitasking, memory management and inter process communication.Most micro kernels use a message passing system of some sort to handle requests from one server to another. The message passing system generally operates on a port basis with the microkernel. As an example, if a request for more memory is sent, a port is opened with the microkernel and the request sent through. Once within the microkernel, the steps are similar to system calls. The rationale was that it would bring modularity in the system architecture, which would entail a cleaner system, easier to debug or dynamically modify, customizable to users' needs, and more performing.

                                            micro kernel 
                                        

Hybrid Kernel: Run a few services in the kernel space to reduce the performance overhead of traditional. These kernels represent a compromise that was implemented by some developers before it was demonstrated that pure micro kernels can provide high performance. These types of kernels are extensions of micro kernels with some properties of monolithic kernels. Unlike monolithic kernels, these types of kernels are unable to load modules at runtime on their own. Hybrid kernels are micro kernels that have some "non-essential" code in kernel-space in order for the code to run more quickly than it would were it to be in user-space. Hybrid kernels are a compromise between the monolithic and micro kernel designs.In other words it is a mixture of micro kernel and monolithic kernel.

                                           hybrid kernel 
                                       
Nano kernel:A nanokernel delegates virtually all services — including even the most basic ones like interrupt controllers or the timer — to device drivers to make the kernel memory requirement even smaller than a traditional microkernel.

                                        

                                           nano kernel 

Exo Kernel:It allocates physical hardware resources such as processor time and disk block to other programs, which can link to library operating systems that use the kernel to simulate operating system abstractions.Exokernels are a still experimental approach to operating system design. They differ from the other types of kernels in that their functionality is limited to the protection and multiplexing of the raw hardware, providing no hardware abstractions on top of which to develop applications. This separation of hardware protection from hardware management enables application developers to determine how to make the most efficient use of the available hardware for each specific program . Exokernels in themselves are extremely small. However, they are accompanied by library operating systems, providing application developers with the functionalities of a conventional operating system. A major advantage of exokernel-based systems is that they can incorporate multiple library operating systems, each exporting a different API, for example one for high level UIdevelopment and one for real-time control.

                                           exo kernel


                                                                 


Shells 



 A shell is a software the gives a user interface to various operating system fuctions and services..So in other words your interface to operating system is called shell. Shells provide a way for you to communicate with the operating system. This communication is carried out either interactively input from the keyboard is acted upon immediately or as a shell script. A shell script is a sequence of shell and operating system commands that is stored in a file.
                                               this is a figure of shell 

there are mainly four kind of shells 
some features of shells 
 #.Wildcard substitution in file names (pattern-matching):Carries out commands on a group of files by specifying a pattern to match, rather than specifying an actual file name.
#.Command aliasing:Gives an alias name to a command or phrase. When the shell encounters an alias on the command line or in a shell script, it substitutes the text to which the alias refers.
#.Command history:Records the commands you enter in a history file. You can use this file to easily access, modify, and reissue any listed command.
#.File name substitution:Automatically produces a list of file names on a command line using pattern-matching characters.
 #.Input and output redirection:Redirects input away from the keyboard and redirects output to a file or device other than the terminal. For example, input to a program can be provided from a file and redirected to the printer or to another file.Piping:Links any number of commands together to form a complex program. The standard output of one program becomes the standard input of the next.
#.Shell variable substitution:Stores data in user-defined variables and predefined shell variables.
 there are mainly two kind of shells 
C shell: C shell is a unix shell created by Bill Joy.at the University of California at Berkeley as an alternative to UNIX’s original shell, the Bourne shell . These two UNIX shells, along with the Korn shell , are the three most commonly used shells. The C shell program name is csh. The C shell was invented for programmers who prefer a syntax similar to that of the C programming language.
 Korn Shell:Korn shell is basically a UNIX shell that was developed by David Korn in Bell Labs. It has many features of C shell(csh) and Bourne Shell(bsh) and is one of the most efficient shells.

Hope you got basic knowledge of kernels and shells.Please like Encyberpedia's facebook page

No comments:

Post a Comment

Bottom Navi

copyright Encyberpedia. Powered by Blogger.

Followers

like Encyberpedia on Facebook

About

I am Abhilash Naik.Ilove writing blogs on technology and web designing .

About

Tips,Tricks,Hacks,Internet

Total Pageviews