Basics Of UNIX
Basics of UNIX:
UNICS (UNIX): Unified Information and Computing Systems
UNIX was developed in 1970 by AT&T.
Advantages:
1. Open Source
2. Virus free OS
3. Secure
4. multi tasking/multi tasking/ networking capabilities/ graphical represenation/ easy to program (programming).
Everything in UNIX is in the form of a file.
Chain of programs can be executed simultaneously.
Operating System: Definition: Operating System is a collection of programs that acts as an interface between the user and computer by coordinating the operations of hardware and software.
Kernel: it acts as an interface between the hardware and the software. it loads the OS into the memory by initializing the hardware.
Shell: it acts as an interface between the user and the OS. Input given by the user is fed to the kernel by the shell which converts human readable language into machine readable language and thus help kernel in executing it.
A process is an instance of a running program.
Tools supported by UNIX are application oriented packages like:
- Word processors
- Compilers
- Graphics
- Internet tools
- Finance accounting
- Spread sheets etc.
A File System is a collection of blocks. These blocks are grouped into 4 categories:
Boot block: also called the zero block or the master block. It occupies the first block of the file system. It contains a boot strap program that is read and loaded into the memory to load the AIX OS.
Super block: contains information about the file system:
- Name of the file system
- Size of the file system
- Size of list blocks
- Number of free list blocks
- Size of disk in blocks
- Number of free data blocks
When a file is created, kernel will read the super block. Kernel makes copy of the super block in memory when allocating list block and data block.
Now two copies of super block are available, one in memory and other in hard disk.
Copy in memory is latest and most updated.
Changes made to this copy are saved and synchronized later with hard disk super block.
List block: also known as i-node block. Each file / folder created in file system has an i-node number linked to it. Kernel refers to this node by an index in the list block. Each file with an i-node number has an entry in the i-node table. I-node table stores the following information:
- Type of file
- Owner of file
- Group of file
- Permissions
- Number of links
- File access and modification time
- Size of file
Data block: end user’s data is stored in the data block.
Points To Remember:
- Named Pipe: a special file helps in communicating between 2 or more processes via a file that acts as a pipe. It’s a temporary file that lasts as long as the process lasts. The data is processed in FIFO (fix in fix out) format.
- Socket pipe: a Socket is an API that provides a mechanism for communicating between 2 or more processes not running on the same machine.
- To use a socket in a program, first you need to create it and then configure it.
Source: Basics of UNIX by P Sudarshan


