Header Ads Widget

Responsive Advertisement

Ticker

10/recent/ticker-posts

Basic Linux elements || Architecture of Unix and Linux system || Kernel || shell

The Basic elements of Linux are discussed in the following sub-sections. 

Kernel:- 

Shell:- 

In Simple Words you can say---

Kernel - Interacts with the machine's hardware

Shell - Interacts with the user.  

The Kernel:-

    The kernel of UNIX is the hub of the UNIX operating system. Kernel is a set of routines mostly written in c language. 

    User programs that need to access the hardware ( Like Hard-disk or Terminal ) use the services of the kernel, which performs the job on the user's behalf.

    User interacts with the kernel by using System calls, Kernel allocates memory and time to programs and handles the file store and communications in response to system calls. 

    As an illustration of the way that the UNIX shell and the kernel together, suppose a user types mv myfile myfile1 (which has the effect of renaming the file myfile). The UNIX shell searches the file store for the file containing the program mv and the requests the kernel, through system calls, to execute the program mv on myfile. When the process mv ,myfile has finished running, the UNIX shell then returns the UNIX prompt to the user, indicating that it is waiting for further commands. 

Fig. :- Architectures of UNIX and Linux System

Some Other Functions Performed by the Kernel 

  1. Managing the machine's memory and allocating it to each process and decides their priorities.
  2. Scheduling the work done by the CPU so that the work of each user is carried out as efficiently as is possible.
  3. Organized the transfer of the from one part of the machine to another.
  4. Accepting instructions from the UNIX shell and carring them out.
  5. Enforcing the access permissions that are in farce on the file system.

The Shell:-  

    UNIX shell acts as a medium between the user and the kernel in UNIX system. When a user logs in, the login program checks the username and password and then starts another program call the shell.

    Computer don't have any inherent capability of translating commands into action. This requires a command line interpreter ( CLI ) and this handled by the "outer Part " of the operating system. i.e Shell. It interprets the commands the user types in and arranges for them to be carried out. 

The commands are themselves programs, when they terminate, the shell gives the user another prompt ( % on our systems ).

In every unix system, the user can customize his own shell, and users can use different shells on the same machine. 

The shell keeps a list of the commands you have typed in. if you need to repeat a command, use the cursor keys to scroll up and down the list or type history for a list of previous commands.

You can use and one of these unix shells if they are available on your system. And you can switch between the different  UNIX shells once you have found out if they are available. 

TC shell ( tcsh )

Korn shell ( ksh )

Bourne Again SHell ( bash )

Bourne shell ( sh )

C shell ( csh )

When you enter a command through the keyboard ( input ). The UNIX shell thoroughly examines the input for special characters.  

 
 
 
 
 
 
 
 
 
 


Post a Comment

0 Comments