100% found this document useful (1 vote)
626 views

Unix Architecture

The document discusses the architecture of Unix operating systems. It describes the key components of Unix including the kernel, shell, and system calls. The kernel manages processes, memory, files, and hardware interactions. It provides services to programs through system calls. The shell acts as the interface between the user and kernel, allowing commands to be run and their output redirected.

Uploaded by

Ankit Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
626 views

Unix Architecture

The document discusses the architecture of Unix operating systems. It describes the key components of Unix including the kernel, shell, and system calls. The kernel manages processes, memory, files, and hardware interactions. It provides services to programs through system calls. The shell acts as the interface between the user and kernel, allowing commands to be run and their output redirected.

Uploaded by

Ankit Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

7/10/2017 Unix Architecture

(/search) 1 (/messages) (/users/udit-32/notifications)


(http://www.tcs.com)
Chapter 1: Introduction To Unix and Basic Commands

Unix - All Chapters (/communities/unix-c-oracle-lounge-0/course/unix-2)


Home (/communities/unix-c-oracle-lounge-0) See Leaderboard (/communities/unix-c-oracle-lounge-0/aspire_dashboard)

Index
1.1.Overview of Unix (/communities/unix-c-oracle-lounge-0/content/overview-of-unix)

1.2.Unix Architecture (/communities/unix-c-oracle-lounge-0/content/unix-architecture-0)

1.3.Connecting to Unix Server (/communities/unix-c-oracle-lounge-0/content/connecting-to-unix-server)

1.4.Use of WinSCP (/communities/unix-c-oracle-lounge-0/content/use-of-winscp)

1.5.Unix File System (/communities/unix-c-oracle-lounge-0/content/unix-file-system-0)

1.6.Unix Command Usage (/communities/unix-c-oracle-lounge-0/content/unix-command-usage-0)

Go to Doubts

1.2. Unix Architecture


Unix is a time-sharing, multi-tasking, multi-user OS with elegant, powerful file system, a command interpreter (shell), and a set of utilities (tools/commands, over
200 programs) Developed by Ken Thompson and Ritchie originally in assembly, and later in C, thus making it portable to other machines. Supports C, Fortran,
Basic, Pascal, COBOL, Lisp, Prolog, Java, Ada compilers. Unix is an OS for Programmers as shell provides the programming facility. It provides a in-built security
mechanism through the user name and password, combined with the access rights associated with files .

Features of Unix Operating System

Multi-user and Multitasking


Everything is a file
Configuration data stored in text
Small, single purpose programs
Ability to chain programs together to perform complex task
Facility of background processing

Architecture of the UNIX System

Shell and kernel together make UNIX system work.

The Unix Kernel

Kernel is a collection of programs mostly written in C, that runs directly on the hardware - so parts of kernel must be customized to each systems hardware features.

The kernel of UNIX is the main component of the operating system.

It allocates time and memory to programs and handles the filestore and communications in response to system calls.
Interacts directly with the hardware through device drivers.
Provides sets of services to programs, insulating these programs from the underlying hardware.
Manages memory, controls access, maintains file system, handles interrupts, allocates resources of the computer.

Programs interact with the kernel through system calls. Kernel is directly loaded into memory when the system is booted. The basic services of the the kernal is the
Low level jobs like:

System Initialization
Process/Memory/File/I-O Management
Programming Interface
Communication Facilities

https://campuscommune.tcs.com/communities/unix-c-oracle-lounge-0/content/unix-architecture-0 1/4
7/10/2017 Unix Architecture
The kernel accomplishes all these tasks by providing an interface between the other programs running under its control and the physical hardware of the computer;
this interface, the system call interface, effectively insulates the other programs on the UNIX system from the complexities of the computer. For example, when a
running program needs access to a file, it cannot simply open the file; instead it issues a system call which asks the kernel to open the file. The kernel takes over
and handles the request, then notifies the program whether the request succeeded or failed. To read data in from the file takes another system call; the kernel
determines whether or not the request is valid, and if it is, the kernel reads the required block of data and passes it back to the program. Unlike some other operating
systems, UNIX system programs do not have access to the physical hardware of the computer. All they see are the kernel services, provided by the system call
interface.

Kernel Mode

In Unix or Linux there are two distinct modes of operation of the central processing unit(CPU)

Kernal or System Mode


User mode

The kernal in unix is the core of the operating system. As it has control over everything that occurs in the syatem, is considered as trusted software . When the CPU
is in kernel mode, it is assumed to be executing trusted software and thus it can execute any instructions and reference any locations in memory. All other programs
are considered as untrusted software and when the CPU is in user mode , it runs the untrusted software. All user mode software must request use of the kernel by
means of a system call in order to perform privileged instructions, such as process creation or input/output operations.

System calls

In the simplest form we can define a system call as a request for the operating system to do something on behalf of the user's program. The system calls are
functions used in the kernel itself.
UNIX system calls are used to manage the file system, control processes, and to provide interprocess communication.

System calls can be categorised as:

File structure related calls - The file structure related system calls available in the UNIX system let us create, open, and close files, read and write files,
randomly access files, alias and remove files, get information about files, check the accessibility of files, change protections, owner, and group of files, and
control devices.

For example create, open,read, write,lseek,dup etc.

Process Related calls - The UNIX system provides several system calls to create and end program, to send and receive software interrupts, to allocate
memory, and to do other useful jobs for a process.

For example fork,exec,wait,exit etc.

Inter process related calls

For example pipe,msgget,msgsnd etc.

The Unix Shell

https://campuscommune.tcs.com/communities/unix-c-oracle-lounge-0/content/unix-architecture-0 2/4
7/10/2017 Unix Architecture
The shell acts as an interface between the user and the kernel and is the interpreter of UNIX to decipher and execute commands. (user interface to the kernel for
isolating the user from the knowledge of kernel functions.). It maintains interactive dialogue with the user and is capable of Input/Output redirection. Shell can do
background processing so that time-consuming, non-interactive tasks can proceed side by side. With the help of pipe, shell makes it possible to connect more than
one commands. Shell includes programming language features which can be used to build shell scripts for performing complex operations.

Types of Shells

Bourne Shell - Original command interpreter developed at AT&T by Stephen R. Bourne; fastest official shell distributed with Unix systems (executable
filename sh)
C Shell - developed by William Joy and others at UCB; gets its name from C due to syntax resemblance with language C (executable file name csh)
Korn Shell - developed by David Korn, combines best features of both shells, not popular (executable file name ksh)
Restricted Shell - restricted version of Bourne shell, typically used for guest logins and in secure installations (executable file name).

External link

http://nptel.ac.in/courses/Webcourse-contents/IISc-BANG/Operating%20Systems/pdf/Lecture_Notes/Mod%2014_LN.pdf (http://nptel.ac.in/courses/Webcourse-
contents/IISc-BANG/Operating%20Systems/pdf/Lecture_Notes/Mod%2014_LN.pdf)
http://nptel.ac.in/courses/Webcourse-contents/IISc-BANG/Operating%20Systems/pdf/PPTs/Mod_14.pdf (http://nptel.ac.in/courses/Webcourse-contents/IISc-
BANG/Operating%20Systems/pdf/PPTs/Mod_14.pdf)

Related Videos:

(/communities/unix-c-oracle-lounge-0/content/overview-of-unix)
Previous

(/communities/unix-c-oracle-lounge-0/content/overview-of-unix)
(/communities/unix-c-oracle-lounge-0/content/connecting-to-unix-server) (/communities/unix-c-oracle-lounge-0/content/connecting-to-unix-server) Next

Ask a Doubt:

Misuse of 'Ask a Doubt' Section will be dealt as per the Terms & Conditions of Campus Commune

Note: Please do not use the doubts section for any quiz/quiz-content related queries.
Use the helpline (/feedbacks/new) () located above in top right corner for problems/queries related to quizzes.

Styles Format

Characters (including HTML): 0

Submit

Open Doubts Closed Doubts My Doubts

There are no doubts yet

https://campuscommune.tcs.com/communities/unix-c-oracle-lounge-0/content/unix-architecture-0 3/4
7/10/2017 Unix Architecture

https://campuscommune.tcs.com/communities/unix-c-oracle-lounge-0/content/unix-architecture-0 4/4

You might also like