Posts which you will also like.

Tuesday, October 5, 2010

Unix Architecture Overview

Kernel
Unix is a multitasking, multiuser, operating system, designed from day one to be lean and
effective in dealing with real time processing of information. The operating system
design essentially embodies effective operating system control over resources (hard disk,
tapes, screen, filesystem, etc.), so that as many applications as possible to support over
the system can run concurrently, without problem.
The architecture of Unix is relatively simple. Unix derives most of its functionality via
the Kernel, which is a block of code that supports all interaction with end user
applications, shells, etc.
Process Structure
Unix systems multitask applications in what is generally regarded as "user" mode,
whereas the kernel code itself runs in "kernel" or "privileged" mode. The differences are
important - kernel code is customized, via device drivers, for the hardware platform -
hence, the kernel can take advantage, thru device drivers, of specialized processor
functionality that make the multitasking of applications much smoother.
User mode applications, however, are restricted in their ability to access certain processor
instructions, and furthermore, the system is able to keep tabs on what an application does
with resources such as memory, files, etc., independent of any other application. Such
concepts like memory management, virtual memory, etc., are not new to the Unix world -
they were implemented years ahead of the DOS/Windows environment because Unix
needs them to operate!
Input/Output and Piping
Unix console applications work in a similar fashion as do Windows console application
they both support keyboard oriented input, and text mode output.
Unix supports all standard input/output mechanisms, including C functions like printf(),
gets() and so forth. Just like with a Windows console, these standard sources can be
redirected.
Thus, the output of a given command can be directed to a file or device by using the ‘>’
symbol (greater than) to direct the output from the normal “stdout” destination. The inp
of a given command can be read from a file or device by using the ‘<’ symbol (less than
to pull the input from a file rather than the normal “stdin” destination.
Unix generally supports the ability to select which input or output source you wish to
redirect. Prefacing a digit in front of the input or output redirection symbol does this. 0
indicates stdin, 1 indicates stdout, and 2 indicates stderr (the error destination which
normally isn’t redirected).

No comments:

Post a Comment

Your comment may wait for moderation....

DMCA.com Protected by Copyscape Online Plagiarism Tool