Wednesday 28 August 2013

Discuss the architecture of UNIX operating system with appropriate diagram.



The kernel of UNIX is the hub of the operating system: it allocates time and memory to programs and handles the file store and communications in response to system calls.
As an illustration of the way that the shell and the kernel work together, suppose a user types rm my file (which has the effect of removing the file my file). The shell searches the file store for the file containing the program rm, and then requests the kernel, through system calls, to execute the program rm on my file. When the process rm my file has finished running, the shell then returns the UNIX prompt % to the user, indicating that it is waiting for further commands.
Amongst the functions performed by the kernel are:
·        managing the machine's memory and allocating it to each process.
·        scheduling the work done by the CPU so that the work of each user is carried out as efficiently as is possible.
·        organising the transfer of data from one part of the machine to another.
·        accepting instructions from the shell and carrying them out.
·        Enforcing the access permissions that are in force on the file system
The shell:
The shell acts as an interface between the user and the kernel. When a user logs in, the login program checks the username and password, and then starts another program called the shell. The shell is a command line interpreter (CLI). 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).
The user can customise his/her 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 any one of these shells if they are available on your system. And you can switch between the different shells once you have found out if they are available.
·        Bourne shell (sh)
·        C shell (csh)
·        TC shell (tcsh)
·        Korn shell (ksh)

·        Bourne Again SHell (bash)

No comments:

Post a Comment