Unix Introduction

Introduction:
Operating system is an interface between hardware and application software's. It serves as the operating system for all types of computers including single-user personal computers and engineering work stations, multi-user micro computers, mini computers and super computers as well as special purpose devices. The number of computers running in variant of UNIX has grown explosively, with approximately twenty million computers and more than hundered million people using these systems. The success of UNIX is due to many factors, including its portability to wide range of machines, its adaptability and simplicity, the wide range of tasks that it can perform, its multi-user and multi tasking nature, and suitability for networking, which has become increasingly important as the internet has blossomed.
UNIX Biography
Unix is a Character User Interface (CUI) system. The origin of UNIX can be traced back to 1965, when a joint venture was undertaken by AT&T, Bell laboratories, the General Electric company and Massachusetts Institute of Technology and software team lead by Ken Thompson, Dennis Ritchie, Rudd Canday and Brain Kernighan worked on MULTICS project, stands Multiplex Information and Computing System/Service. The aim was to develop an operating system that could serve a large community of users and allow them to share the data if need be. MULTICS was developed for two users. Based on the concept in 1969, UNICS stands for Uniplexed Information and Computing System Operating system was developed for hundered users. The first version was armed with a museum computer called PDP-7 and later on PDP-11 which was written in Assembly language. All its assembly code being machine independent, the version was not portable, a key requirement for successful OS.
To remedy this, Ken Thompson created a new language 'B' came from BCPL (Basic combined programming language) and set about the herculean task of rewriting the whole UNICS code in this high level language. 'B' lacked in several aspects necessary for real life programming. Ritchie shifted the inadequacies of B and modified in to a new language which he named as 'C'. In 1973, whole UNICS code was written in 'C' language and named it as UNIX
Hardware Requirements for UNIX
* Minimum 80 MB of Hard disk and 4 MB of RAM
* Any 80286 and above processor
* UNIX requires about 1 MB of RAM for each extra terminal connected
Salient Features of UNIX
Multiuser Capability
Multi user operating system means more than one user shares the same system resources (hard disk, memory, printer, application software etc.,) at the same time.
Multi tasking capability:
Another highlight of UNIX is that it is multi tasking, implying that it is capable of carrying out more than one job at the same time. It allows you to type a program in its editor while it simultaneously executes some other command you might have given earlier, say to sort and copy huge file. The latter job is performed in the background while in the foreground you see editor, or take a directory list or whatever else. Depending on the priority of the task, the operating system appropriately allocates small time slots (of the order of milli second or micro seconds) to each foreground and background task.
Programming Facility:
UNIX o/s provides shell. Shell works like a programming language. It provides commands and keywords. By running these two, user can prepare efficient program
Portability:
One of the main reasons for the universal popularity of Unix is that it can be ported to almost any computer system, with only bare minimum of adoptions to suit the given computer architecture. It works with 80286 processors to super computers
Communication:
Unix provides electronic mail. The communication may be within the network of a single main computer or between two or more such computer networks. The user can easily exchange mail, data and programs through such networks. You may be two feet away or at two thousand miles, you mail will hardly takes any time to reach its destination.
Security:
Unix provides three level of security to protect the data. The first is provided by assigning passwords and login names to individual users ensuring that nobody can come and have access to your work. At the first level, there are read, write and execute permissions to reach a file which decide who can access a particular file, who can modify it and who can execute it. Lastly, there is a file encryption. This utility encodes the file into an unreadable format so that even if some one succeeds in opening it, the secrets are safe.
Open System: 
The source code for the Unix system and not just the executable code have been made available to users and programmers. Because of this many people have been able to adapt the Unix system in different ways. This openness has led to introduction of wide range of new features and versions customized to meet special needs. It has been easy for developers to adapt to Unix, because the computer code for the Unix system is straight forward, modular and compact.
System calls:
Programs interact with the kernal through approximately 100 system calls. System calls tells the kernal to carry out various tasks for the program, such as opening a file, writing a file, obtaining information about a file, execution a program, terminating the process and getting the time of a day. Different implementations of Unix system have compatible system calls, with each call having the same functionality. However, the internal programs that performs the functions of the system call (usually written in C language)
Help facility:  
Unix provides manual pages for Unix commands
Differences of Unix with Windows
Unix
Windows
Unix is a multi user operating sytemWindows is a multi user operating sytem
Multi Tasking operating systemMulti Tasking operating system
To boot the Unix operating system 2 MB RAM is requiredTo boot the Windows operating system 12 MB RAM is required
Unix is process based conceptWindows is process thread based concept
In Unix, for every user requests it creates new processFor number of users request it creates only process
In Unix, for any process is killed it will not effect the other usersIt effects to all users
Can run more than 1,00,000 transactions per minuteMaximum number of transactions in window is 80,000 per minute
There is no limit for number of uers working with the serverLimited number of users
Unix is an open systemWindows is not an open system
Unix is portable operating sytemNo portability
Unix provides programming facilityNo programming facility
It is Character User interfaceIt is Graphical User interface
Unix is not user friendlyIt is user friendly
Unix System Organization:


* Manned in three levels
* Heart of Unix is Kernal
* Kernal interacts with the hardware
* Communication will be carried by 2nd layer which is SHELL. It is a command line interpreter
* Third layer is user applications
* Kernal generally stored in a file Unix
SHELL:
The shell reads the commands and interprets them as requests to execute program. Because the shell plays this role, it is command line interpreter. Besides being a command interpreter, the shell is a programming language. As a programming language, it permits you to control how and when the commands are carried out. Shell acts as an interface between user and the kernal.
Kernel:
The kernel is the part of the operating system that interacts directly with the hardware of a computer, through device drivers that are built ino the kernel. It provides set of services that can be used by programs, insulating these programs from underlying hardware. The major functions of kernel are to manage computer memory, to control access to the computer, to maintain file system, to handle interrupts (signals to terminate execution), to handle errors, to perform input and output services (which allow computers to interact with terminals, storage devices and printers), and to allocate the resources of the computer (such as cpu or i/o devices) among users. Programs interact with the kernel through approximately 100 system calls. System calls tells the kernal to carry out various tasks for the program, such as opening a file, writing a file, obtaining information about a file, execution a program, terminating the process and getting the time of a day.
The Unix File System
A file is a basic structure used to store information on the Unix system. Before we learn any more Unix commands it is essential to understand the Unix file system since Unix treats everything it knows and understands as a file. All the utilities, applications, data in Unix stored as files. Even directory can be called as a file which contains several other files. The Unix file system resembles an upside down tree. Thus the file system begins with a directory called "root". The root directory is denoted as slash (/). Branching from the root there are several other directories called bin, lib, dev, usr, temp, etc., There are three types of files
1. Regular/ordinary files:
As a user, the information that we work with will be stored as an ordinary file. Ordinary files are aggregates of characters that are treated as a unit by the Unix system. An ordinary file can contain normal ASCII characters such as text for manuscripts or programs. Ordinary file can be created, changed or deleted as you wish.
2. Directory files:
Directory is a file that holds other files and contains information about the locations and attributes of these other files. For example, a directory includes a list of all the files and sub directories that contains, as well as their addresses, characteristics, file types (whether they are ordinary files, symbolic links, directories or special files), and other attributes.
3. Special Files:
A special file represents a physical device. It may be a terminal, a communication devices, or storage unit such a disk drive. Special files are of two types, one is block special file - CDROM, printer, floppy which are unreadable format and the other is character special file - STDIN, STDOUT and STDERR which are readable format.
Unix System Organization
/(root): This is the root directory of the entire file system and the root directory of the super user.
/bin: bin stands for binary. This directory contains executable files for most of the Unix commands. Unix commands can be either C programs or shell programs. Shell programs are collection of several Unix commands.
/lib: This directory contains all the library functions provided by Unix for programmers. The programs written under Unix make use of these library functions in the lib directory
/dev: This contains the special files that include terminals, printers and storage devices. These files contain device numbers taht identify devices to the operating system, including:
/usr: This contains other accessible directories. Provides /usr/share/man online manual pages
/tmp: This contains all temporary files used by the Unix system or user
/etc: This contains system administration and configuration databases
/var: This contains the directories of all files that vary among systems. These include files that log system activity, accounting files, mail files that vary from system to system
/home: This contains the home directories and files of all users. If your logname is user1, your default home directory is /home/user.

No comments:

Post a Comment