You are on page 1of 22

Concepts of Operating System

OBJE C TIV E

To introduce Operating System concepts with Linux


environment, and to learn Shell Programming.

2
Course Content
Introduction to O S
Introduction to Li nux
Shel l P ro g ra m m i n g
Process m a n a g e m e n t
Signals
https://www.cdac.in/index.aspx?id=DAC&courseid=0# T h re a d s
Memor y m a n a g e m e n t
Virtual Memor y
Deadlock
S e m a p h o re

Inter p ro c e s s co m m u n i cat i o n

3
Text Books

O p e r a t i n g S ys te m s Principles b y A b r a h a m Silberschatz, Peter G alvin & G r e g

G a g n e / Wiley

h ttp s :/ / o s- b ook. com / OS 9/ in d e x. h tml

Unix C o n c e p t s a n d A p p l i c a t i o n s b y S u mitab h a D a s / McG raw Hill

References:

• Modern operating Systems by Andrew Tanenbaum & Herbert Bos/ Pearson

• Principles of Operating Systems by Naresh Chauhan / Oxford University Press

• Beginning Linux Programming by Neil Matthew & Richard Stones / Wrox

• Operating System : A Design-Oriented Approach by Charles Crowley / McGraw Hil

4
Introduction to OS
Introduction to O S
▪ What i s O S Introduction to Linux
▪ H ow i s i t di f f e r e nt f r om ot he r appl i c ati on s of t w are ; Shell Programming
Process management
▪ Why i s i t har dw ar e de pe nde nt
Signals
▪ Di f f e r e nt c om pone nt s of O S
Threads
▪ Bas i c c om pute r or gani zat i on r e qui r e d f or O S Memory management
▪ E xam ples of w e l l know n O S i nc l udi ng m obi l e O S , e m be dde d Virtual Memory
s ys t e m O S , R e al T i m e O S , de s kt op O S s e r v e r m ac hi ne O S e t c . Deadlock
▪ H ow ar e t he s e di f f e r e nt f r om e ac h ot he r and w hy Semaphore
Inter process
▪ Func t i ons of O S
communication
▪ U s e r and K e r ne l s pac e and m ode

▪ I nt e r r upts and s ys t e m c al l s

5
W hat is Operating S ystem

A n o p e r a t i n g s ys t e m is software that m a n a g e s a c o m p ut e r ’ s har dw ar e.

It al s o p r o v i d e s a b a s i s for a p p l i c a t i o n p r o g r a m s a n d acts as an i nt e r m e di ar y

b e t w e e n the c o m p u t e r user a n d the c o m p u t e r har dw ar e.

6
Different components

A c o m p u t e r s ys t e m c a n b e d i v i d e d r o u g h l y into four c o m p o n e n t s :
the har dw are , the o p e r a t i n g s ys t e m, the a p p l i c a t i o n p r o g r a m s , a n d a u s e r

T h e hardware—the central p r o c e s s i n g unit ( C PU ) , the m e m or y , a n d the


i nput /output (I/O) de vi ces —pr ov ides the b a s i c c o m p u t i n g r e s o u r c e s for
the system .

T h e a p p l i c a t i o n programs—a software or p r o g r a m that is d e s i g n e d to


complete a s p e c i f i c task of us ers . E g : wor d p r o c e s s o r s , s p r e a d s h e e t s ,
and web browsers

T h e o p e r a t i n g s ys t e m - is a S y s t e m software p r o v i d e s a pl atf or m for r u n n i n g a n d


operating other software, namely application software. c ont rols the
har dw ar e a n d c o o r d i na t e s its use among the v ar ious a pp l i c a t i o n
p r o g r a m s for the v ar i ous us e r s

7
How is it different from other application software
Application software Os

A system computer program that manages hardware


A computer program which is intended to perform
and software resources and provides common
some task classified along.
services for computer program

it boots up when the user wants and run until the


It runs when the user desires to run the application.
user switches off the machine.

It’s examples are Photoshop, VLC player etc. It’s examples are Microsoft Windows, Linux, MAC

Users interact with application software while using


Users never interact with system software as it
specific applications.
functions in the background.

It is developed by using c++, c, assembly languages. It is developed by using virtual basic, c++, c, java.

8
B asic com puter organization required for O S Computer organization is
concerned with the way the
hardware components

RAM operate and the way they are


connected together to form the
computer system.

Input Output
processor The central processing unit
devices devices
(CPU) that processes data

The memory that holds the


programs and data to be
processed, and
Hard disk I/O (input/output) devices as
peripherals that
communicate with the
outside world.

9
Types Of Os

Multitasking OS

Multi tasking refers to execution of multiple tasks.

Time-Sharing Operating Systems

Time-sharing operating system e na bl e s p e o pl e l oc a t e d at a different


terminal(shell) to use a single computer system at the same time.

T h e pr o c e s s o r t i m e ( C PU ) w h i c h i s s h a r e d a m o n g m u l t i pl e u s e r s i s t e r m e d a s
time sharing.

Mobile OS

Mobile operating systems are those OS which is especially that

are designed to power smartphones, tablets etc.

10
Types Of Os

Real Time Os

A r e al - t i m e o p e r a t i n g s y s t e m ( R T O S ) i s a n o p e r a t i n g s y s t e m w i t h t w o k e y Air bag
deployment
f e a t ur e s : pr e d i c t a b i l i t y a nd d e t e r m i n i s m . I n a n R T O S , r e pe a t e d t a s k s a r e depends on
the rapid
p e r f o r m e d w i t h i n a t i g h t t i m e bo u n da r y . R e al - t i m e s y s t e m s a r e u s e d w h e n response time
t h e r e a r e t i m e r e q u i r e m e n t s t h at a r e v e r y s t r i c t l i k e m i s s i l e s ys t e m s , a i r of a real-time
embedded
traffic control systems, robots, etc. system
with Hard
RTOS
Hard RTOS

T h e s e o pe r a t i n g s ys t e m s g ua r a n t e e t ha t c r i t i c al t as k s b e c om pl e t e d w i t h i n a
range of time.

Soft RTOS

T h i s o p e r a t i n g s y s t e m p r ov i d e s s om e r e l ax a t i o n i n t h e t i m e l i m i t . F o r e x a m pl e
Multimedia systems, digital audio systems etc.
11
Different types of Os

EMBEDDED OS
An embedded system can be thought of as a computer hardware system having software embedded in it.
An embedded system can be an independent system or it can be a part of a large system.
An embedded system is a microcontroller or microprocessor based system which is designed to perform a specific task.
microwave ovens, washing machines and dishwashers,télévision sets, Vidéo Game consoles, set-top boxes, atms etc,Smart Tv

DESKTOP OS

The desktop OS is the environment where the user controls a personal computer .Ubuntu ,Windows 10

It is an operating system designed for usage on servers. It is utilized to give services to a large number of clients.
It is a very advanced operating system that can serve several clients simultaneously.

12
Important functions of an Operating System

Process M a n a g e m e n t

Memory M a n a g e m e n t

File Management

Device Management

Protection a n d Security

13
P rocess M anagem ent

In multiprogramming environment, the OS decides which process gets the processor when and for how
much time.
This function is called process scheduling.
An Operating System does the following activities for processor management −
• Keeps tracks of processor and status of process. The program responsible for this task is known as traffic
controller.
• Allocates the processor (CPU) to a process.
• De-allocates processor when a process is no longer required.
• Providing mechanisms for process communication

14
M emory M anagement

• The operating system handles the responsibility of storing any data, system programs, and user
programs in memory. This function of the operating system is called memory management.

Memory ma na gement activities

• Keeping track of which parts of memory are currently being used and by whom

Deciding which processes to move into and out of memory

• Allocating and deallocating memory space as needed

15
File Management

• A file system is normally organized into directories for easy navigation and usage. These

di rect ori es may cont ai n f i l es and ot her di rect i ons.

• An Operat i ng Syst em does t he f ol l owi ng act i vi t i es f or f i l e management −

• Keeps track of information, location, uses, status etc.

• Deci des who get s t he resources.

• Al l ocat es t he resources.

• De-allocates the resources.

16
D evice M anagement

• An Operating System manages device communication via their respective drivers. It


does the following activities for device management −

• Keeps tracks of all devices. Program responsible for this task is known as the I/O
controller.

• Decides which process gets the device when and for how much time.

• Allocates the device in the efficient way.

• De-allocates devices.

17
P rotection and S ecurity

• The operating system uses password protection to protect user data and similar other

techniques. it also prevents unauthorized access to programs and user data.

• Monitors overall system health to help improve performance. records the response time between service requests

and system response to having a complete view of the system health. This can help improve performance by

providing important information needed to troubleshoot problems

• The operating system uses password protection to protect user data and similar other techniques. it also prevents

unauthorized access to programs and user data.

18
User space and Kernel space

When the computer system is run by user applications like creating a text document or
using any application program, then the system is in user space

The system starts in kernel mode when it boots and after the operating
system is loaded, it executes applications in user mode.

19
D ual mode of operation
Kernel mode
User mode
The operating system puts the CPU in user mode when a user The operating system puts the CPU in kernel mode when it is
program is in execution executing in the kernel
When system runs a user application like creating a text At system boot time, the hardware starts in kernel mode.
document or using any application program, then the system is in on as well.
user mode. The operating system is then loaded and starts user applications
in user mode.
When CPU is in user mode, the programs don't have direct
access to memory and hardware resources. The CPU can execute certain instruction only when it is in the
kernel mode. These instruction are called privilege
instruction
To provide protection to the hardware, we have privileged
system will be in a safe state even if a program in user mode
instructions which execute only in kernel mode
crashes.

If a program crashes in kernel mode, the entire system will be


halted.

20
System Calls

A system call is a method for a computer program to request a service from the kernel of
the operating system on which it is running.

W h e n a p r o g r a m in user m o d e r e qui r es a c c e s s to R A M or a har dw ar e re s our c e , it must ask


the ker nel to p r o v i d e a c c e s s to that re sour c e . This is d o n e via s o m e t h i n g c a l l e d a s ys t e m
call.

S ys t e m calls are the only entry poi nt s into

the ke r ne l system .

21
System Calls

S y s tem calls are m a d e by the us e r level p r o g r a m s in the

fo l l o w i n g situations:

C re a t i n g , o p e n i n g , c l o s i n g a n d d e l e t i n g files in the file

system.

C r e a t i n g a n d m a n a g i n g new p r o c e s s e s .

C r e a t i n g a co n n e c t i o n in the network, s e n d i n g a n d

re c e i v i n g p a c ket s .

R e q u e s t i n g a c c e s s to a ha rdwa re d ev i c e , like a m o u s e or a

printer.

22

You might also like