Sunday, 22 March 2009

UNIX Overview

What does Unix stand for?

Unix is not an acronym; it is a pun on "Multics". Multics is a large multi-user operating system that was being developed at Bell Labs shortly before Unix was created in the early '70s. Brian Kernighan is credited with the name.





What is Unix?

UNIX is a computer operating system.

An operating system is the program that controls all the other parts of a computer system, both the hardware and the software. It allocates the computer's resources and schedules tasks. It allows you to make use of the facilities provided by the system. Every computer requires an operating system.

UNIX is a multi-user, multi-tasking operating system. Multiple users may have multiple tasks running simultaneously. This is very different than PC operating systems.

UNIX is a machine independent operating system. Not specific to just one type of computer hardware. Designed from the beginning to be independent of the computer hardware.

UNIX is a software development environment. Was born in and designed to function within this type of environment.








Why Unix?

Hardware independence

  • Operating system code is written in C language rather than a specific assembly language .
  • Operating system software can be easily moved from one hardware system to another.
  • UNIX applications can be easily moved to other UNIX machines. Porting is usually as simple as transfer of the source and a recompile.

Productive environment for software development

  • Rich set of tools
  • Versatile command language

UNIX is available at virtually all HPC centers, allowing researchers relative ease in utilizing the facilities at each center.

Distributed processing, multi-tasking, multiuser-capablity

Powerful Flexible Reliable






Unix Components

Kernel

  • The core of the UNIX system. Loaded at system start up (boot). Memory-resident control program.
  • Manages the entire resources of the system, presenting them to you and every other user as a coherent system. Provides service to user applications such as device management, process scheduling, etc.
  • 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. Accomplishing the transfer of data from one part of the machine to another. Interpreting and executing instructions from the shell. Enforcing file access permissions.

Shell

Whenever you login to a Unix system you are placed in a shell program. The shell's prompt is usually visible at the cursor's position on your screen. To get your work done, you enter commands at this prompt.

The shell is a command interpreter; it takes each command and passes it to the operating system kernel to be acted upon. It then displays the results of this operation on your screen.

Several shells are usually available on any UNIX system, each with its own strengths and weaknesses.

Different users may use different shells. Initially, your system adminstrator will supply a default shell, which can be overridden or changed. The most commonly available shells are:

  • Bourne shell (sh)
  • C shell (csh)
  • Korn shell (ksh)
  • TC Shell (tcsh)
  • Bourne Again Shell (bash)

Each shell also includes its own programming language. Command files, called "shell scripts" are used to accomplish a series of tasks.

Utilities

UNIX provides several hundred utility programs, often referred to as commands.

Accomplish universal functions

  • editing
  • file maintenance
  • printing
  • sorting
  • programming
  • support
  • online info
  • etc.

Modular: single functions can be grouped to perform more complex tasks