Search...

Monday, November 10, 2014

Overview of UNIX architecture

Unix architecture

Unix OS divide into 2 parts : 

  1. Kernel
  2. Shell
Kernel:  Kernel is the heart of the Operating system.
  •  Unix kernel is loaded first when Unix system is booted.
  • It manages hardware and executing processes. 
  • It controls the allocation & deallocation of memory to processes.
  • Kernel act as a intermediate between user and a hardware.
  • User interact with kernel through system calls.
  • Kernel is written in C program.
  • It also manages files, data transfer b/w files and memory
Block diagram of Kernel is given below:


In the above given diagram you see 3 levels are given:
 User, Kernel and Hardware.

In user level, Kernel act as a mediator between User and a hardware & user interacts with the kernel through system calls.

 System calls are just like normal C functions. System calls are used for controlling processes. There are various system calls:

  • open()
  • close()
  • chmod()
  • fork()
  • exec()
  • wait() etc.
In kernel level you see that there are 2 sides on the right side there is Process subsystem & on left side, File subsystem.

File subsystem manages controlling & accessing of files. The file system access a file data using buffering mechanism, that control data flow between kernel & secondary devices.

Device drivers controls the operations of peripheral device.There are 2 types Character & block.

Now move to right side that is process subsystem it is only responsible for synchronization, process scheduling & memory management.
It reads executable files before execution.

Hardware control is used to control the interruption for communicating with machines.


Shell: Computer does not have any inherent capability of translating commands that require command interpreter. Job that is handle by the outer part of  OS is known as shell. Shell act as an interface between user & a kernel. Even though their is only 1 kernel running on a system but there could be several shells in action for each user.

These are of different types:

  1. Bourne Shell (bsh): Developed by Steve Bourne. It is most popular & associated with every Unix OS.
  2. C-Shell (csh): It is developed by Bill Joy. It provides two advantage: We can write our own command by writing a program ans secondly, previously typed command can be recalled. 
  3. Korn Shell (ksh): Developed by David Korn and it not so widely used but most powerful and super set of Bourne shell.
  4. Bourne Again Shell (bash): Today it is heavily used & most popular one.




No comments:

Post a Comment