Beruflich Dokumente
Kultur Dokumente
Unit 1
Faculty : Vinay
Email : vinay.m@christuniversity.in
1
INDEX
Evolution of UNIX
Features of Unix
Unix Kernel
Architecture of Unix
System Concepts
3
History of Unix
4
History of Unix
5
History of Unix
6
Variations of UNIX include AIX, a version
based workstations
Macintosh
Corporation
computer;
collaborators worldwide.
7
UNIX Flavors
Later when they came to know the problem with NT they realized
that UNIX was better.
9
The Connection Between Unix and C
At the time the first Unix was written, most operating systems
developers believed that an operating system must be written in
an assembly language so that it could function effectively and gain
access to the hardware. Not only was Unix innovative as an operating
system, it was ground-breaking in that it was written in a language
(C) that was not an assembly language.
Many Unix programs follow C's syntax. Unix system calls are
regarded as C functions.
It’s the kernel’s job to keep each process and user separate and to
regulate access to system hardware, including cpu, memory, disk and
other I/O devices.
11
Why Use UNIX ?
12
Why use Unix
13
An Overview of UNIX Operating system
14
Overview of Unix OS
The operating system controls all of the commands
from all of the keyboards and all of the data being
generated, and permits each user to believe he or she
is the only person working on the computer.
15
Overview of Unix OS
While initially designed for medium-sized
minicomputers, the operating system was soon moved to
larger, more powerful mainframe computers.
As personal computers grew in popularity, versions of
UNIX found their way into these boxes, and a number of
companies produce UNIX-based machines for the
scientific and programming communities.
16
The Uniqueness of UNIX
The features that made UNIX a hit from the start are:
Multitasking capability
Multi-user capability
Portability
UNIX programs
17
Uniqueness of UNIX
Multitasking
18
Uniqueness of UNIX
Multi-Users
19
Uniqueness of UNIX
System portability
20
[ 6 Marks ]
Features of UNIX
PORTABILITY :
Utilities :
UNIX has over 200 utility programs for various
functions. New utilities can be built effortlessly by combining
existing utilities.
23
Features of UNIX
Background Processing :
UNIX has a facility by which the user can start a process
and then proceed to work on other processes while the
system runs the first process in background and the second
process in the foreground. Background processing helps the
user in effective utilization of time.
Maturity :
UNIX is a time-based operating system. It offers a “bug-
free environment” and a “high level reliability”.
25
UNIX System Structure [ 10 Marks ]
26
4. Utility Programs
27
[ 10 Marks ]
Oth
ll
she
er A
User
p
pl n
Kernel
Compilers
so f
sh
User
tw a
ll
Hardware
re's
UN
sh
IX
e
co
ll
ll
she
m
m
an
d
ls
s
oo
e tt
rn
I nte
28
Any Command cannot be executed unless it obtains the clearance
of the Shell .
The shell , is actually the interface between the user and the
kernel that effectively insulates the user from knowledge of
kernel functions.
29
Kernel
Core of the Unix system
Interacts directly with the hardware
Insulates other parts of UNIX from hardware
Performs all low level functions
Parts of the kernel deals with I/O devices , called device drivers
All programs and applications interact with the kernel
30
[ 10 Marks ]
UNIX Architecture / kernel
The KERNEL
Kernel does not directly deal with the user. Instead it starts a separate
program called shell , which actually interacts with the user and
interprets the command
31
Functions Performed by Kernel
Memory management
Process scheduling
System Accounting
32
[ 10 Marks ]
UNIX Architecture / kernel
33
34
KERNEL LEVEL
File subsystem : this takes care of where to store , how to retrieve, and the
related job with files (data)
The techniques used in UNIX for this IPC are pipes, messages, shared
memory and semaphores.
35
36
The SHELL
The Shell is a utility program that comes with the UNIX system.
However, it plays a very important role. It acts as the command
interpreter for the kernel and is the interface between the user and
the kernel.
37
[ 5 Marks ]
Background Processing :
Time-consuming, non-interactive tasks can proceed while the user continues with other
processing. Therefore, the system can perform many different tasks at the same time
on behalf of a single-user.
Input/Output Redirection :
Programs designed to interact with user can easily be instructed to take their input from
another source, such as a file, and send their output to another destination, such as
printer.
38
Pipes:
Programs that perform simple functions can easily be connected to perform more
complex functions , minimizing the need to develop new programs.
Shell Scripts :
A frequently used sequence of shell commands can be stored in a file. The name
of the file can later be used to execute the stored sequence with a single command.
Shell Variables :
The user can control the behavior of the shell, as well as other programs and
utilities, by storing data in variables.
User interaction with the shell takes the form of a dialogue. First the
shell asks the user for input, then the user types a command, and
finally the shell causes the command to be carried out.
When shell is ready for command input, the shell displays a prompt
on the terminal screen, usually a dollar sign ( $ ).
The shell itself does not carry out most of the commands that are
typed to it. Instead , the shell examines each command and starts
the appropriate UNIX utility program that carries out the requested action.
The standard UNIX system comes with over two hundred utility programs.
(one of these utilities is sh - the shell itself)
40
Using the UNIX Shell
User
Login Interacts
with Utility
Shell ask
for a Shell ask
command for next
command
User
Types User
Command Types
Control D
Shell
Executes
utility to Logout
carry out
command
41
[2 or 6 Marks ]
42
[ 6 Marks ]
Characteristics.
43
bash ( -Shell ) part of Free Software Foundations (FSF)
excellent suite of Unix tools. It matches the Korn shell feature.
Which is owned by AT & T, bash is freely available. It also
maintains a high degree of compatibility with the Bourne shell
and can run that shell’s script without any modifications
44
System call
UNIX system and application programs call on the kernel to perform services for them.
Each system call instructs the kernel to perform one particular service on behalf of the
program making the call.
For example , each time an application program wants to read a line of user input from
a terminal , the program calls the kernel, which obtains the requested data and passes
it on to the program.
System calls are the interface between UNIX-based applications programs and the
UNIX kernel. These calls are the only way that application programs and the kernel
interact directly in a UNIX based system.
45
Anatomy of a System Call
User Program
( Requests Services )
Call Return
Request services Service complete
- Type - Status
- Details - Data
- Data
UNIX System Kernel
(Provides Services)
46
The UNIX kernel supports over sixty different system calls. These calls are identical
on every UNIX system. No matter what hardware differences exists down below or
whether the system is an IBM PC or a mainframe , the system calls are the same.
Thus the system calls form a standard interface for the UNIX system.
47
Some System call
48
File Structure
• Hierarchical Structure
49
The File system consist of all types of files and resembles an
inverted tree structure
UNIX treats Input / Output devices as files . UNIX stores all files
as stream of bytes.
50