In this article you will learn about the three Unix components namely, kernel, shell and file system.
Contents
Unix Components: The Kernel
Kernel is the only component that can communicate directly with the hardware. Following are some of the important functionalities provided by a kernel:
- Manage hardware devices like memory and other I/O devices.
- User and process management in the case of multi-user environment.
- Managing priorities of processes.
- Inter Process Communication (IPC) management.
During previous days all the programs related to kernel are combined together into a single module and is available in the memory always. Such kernel is known as monolithic kernel.
Now-a-days the programs are divided into several modules and only those modules which are required, are stored in the memory. Such modular kernel is known as micro kernel.
Unix Components:
The Shell
We execute commands at the shell. When a command line is given at the prompt, the shell performs some or all of the steps mentioned below:
- It parses the command line and identifies words in it and removes any additional spaces or tabs present, if any.
- Evaluates all the variables that are prefixed with $.
- Shell performs command substitution (done using back quotes).
- It checks for any I/O redirection and establishes the connectivity between the files accordingly.
- Then it checks for the presence of wild card characters like *, ?, and ,. If any of the characters are present, file name generation and substitution takes place.
It then looks for the required commands and files, retrieves them and hands them to the kernel for execution. The path used for looking out for the required commands will be in the PATH shell variable. Also the semicolon which allows multiple commands, and logical operators are taken care of by the shell.
Types of shells
There are different types of shells available. Some of them are mentioned below:
Type of Shell | Description |
Bourne Shell (sh) | This is the most common and first available shell on Unix. It was developed by Stephen Bourne at AT&T Bell Labs. This does not support background jobs. |
C Shell (csh) | This was developed at UCB by Bill Joy. It is called C shell because its syntax and usage is very similar to the C programming language. A version of this shell called tcsh is available free of cost under Linux. |
Korn Shell (ksh) | This shell was developed at AT&T Bell Labs by David Korn. It is built on the Bourne shell and incorporates features of the C shell. One of its versions, the public-domain Korn shell (pdksh), comes with Linux free of cost. |
Bourne-Again Shell (bash) | This shell was developed at Free Software Foundation by B Fox and C Ramey. This is clearly a free ware shell. |
The shell prompt for sh, ksh, pdksh, and bash is represented with $ character. The shell prompt for csh and tcsh is represented with % character.
Unix Components:
The File System
All the files in a Unix system are organized as a inverted tree-like structure. This hierarchical structure in which all the files are stored is referred to as a file system.
A file system could be local or distributed. Local file systems store and manage their data on devices directly connected to the system. Distributed file systems allow a user to access file stored on remote machines which can be accessed through a network.
Learn more about Unix components here.
Suryateja Pericherla, at present is a Research Scholar (full-time Ph.D.) in the Dept. of Computer Science & Systems Engineering at Andhra University, Visakhapatnam. Previously worked as an Associate Professor in the Dept. of CSE at Vishnu Institute of Technology, India.
He has 11+ years of teaching experience and is an individual researcher whose research interests are Cloud Computing, Internet of Things, Computer Security, Network Security and Blockchain.
He is a member of professional societies like IEEE, ACM, CSI and ISCA. He published several research papers which are indexed by SCIE, WoS, Scopus, Springer and others.
Leave a Reply