0% found this document useful (0 votes)
2 views78 pages

Understanding Operating Systems Functions

Uploaded by

rajvandan21
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
0% found this document useful (0 votes)
2 views78 pages

Understanding Operating Systems Functions

Uploaded by

rajvandan21
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

21

/2
0
day
3/0
2
n e s
wed
Operating SystemOvenien:s
01.

米 Operating system preride interaction hetween user and Gomputer

Booting sequence - starting aGomputer or computer embedded device.

STEPS:
1) Swiching on power supply
2 Loading of os into computer main mamery
(BIOS will load os)
3) keeping all appliation in a state of readincos in case
needed by user

BIOS = - Basic Input Oulput System (ROM (present in Rom))


always on

Firmware (hardware & Software)

Cold boating-@ Switching on poшеr


- ② loading BIOS

Warm Rooting - when system is alrrady running and need to restart

warm booling is faster (bcz os is of alrady loaded)


*
ObjecivesoF operoling system
To make computer system more conrenient
-

To hide hardware details fram users.


provide interface bet" user and computer

Scanned with CamScanner


*
Functions of operating systm:
Security
Gontral an system perfamance
job accaunting
Error detecting
Goordination beth user 4 Gamputer
Memary manager
processar manager
Derice Manager
file manager

*
Evalution oF OS

Serial processing=
1.

Computer start in usingfraly 1940-1950 en.


programmer / user directly intraced with computer hardwar.
That machine are called as Bare machin
e (as they don't hare
08)
Every Computer is pragrammed in its machine language
Uses punch cord, papertape and language translator

* Drawbacks of this system

1. Scheduling
2. Setup liming

Scanned with CamScanner


DATE

2.
Batch processing
it is a technique in which
befare processing starts
an os collecte data 4 program together

Job 1
Balch
Job 2
Operating Batch

System CPU

Jobn
Batch

Operating System does fallowing acivities related to batch pricessing-


1
Os define job which has pragram, cammands,
data in single unit.
it keeps n number oF jobs in memory and execute them
2

२.
jobs are processed in the arder of submission ie First come first serred
4. when jab completes its exewtion ,its memary is released and the.
autput far jab get Gopied into on oulput spool for later printing / processing.

Advantages -

takes much work the operator to the computer.


of

Incrased perfamance as a new job get started aa soon prious get


Finished.

Disadvantages
Deficult to debug pragiam
- jab Gould enter an infinite loop
due to lack of protection, one jab can affect pending jobs.

Scanned with CamScanner


3. Mullipragromming os
sharing the processor when two or mare pragrams reside in mmen
eman
at the time called mulliprogromming
Mulliprogramming incrasa utilization oF CPU.

os does the following achivities relaled to multiprogramming


keeps sevral jobs in memary at a lime
Os
Os picks and begins to execute ane
of the job in memary.
Mos monitor the state oF all act
ive program and system resources
to ensute that CPu is nerer
idle, unless there are no job
s to proce

Advantage-
High and efficient [Link] utilization

Disadvantage-
CPU scheduling is
required
memory management
is required to accommodate ma
ny jobs.
4.
Mullitasking or Time sharing Os
when muliple
between them. jabs are exocuted by CpU simulancoucly by
swikching
Switches occurs Frequently
each
so that user may interact
with
program while it is running

Word

OS
email
CPU

web brow

Scanned with CamScanner


DATE

Os daes following activities related to mulitasking

User give instrudions to


an immediate respanse.
as or to pregram direchly and reccive

handle mulliple aperation /program at a lim


e..
Uses the concept oF CPU schcluling and
mulliprogramming
1
202
0 2/
5/
Fri
day Operoting System Structures

4.
Simple Structure-
small, simple and limited systems.
eg. MS-Dcs - wilten to provide mare functionality in less space.
- it does not break systems into subsystems

Monolithic structures-
2.

File management, memary management, devie management and pracess


management are dirctly contralled within kernel (pragram)
-eg linux

Device drivers are loadd into the running keenel and became part
of kemel.

Features -

structure.(allcompunent that reiceded are embended into


- hoving simple are

kermel

Work for smaller task as it handle milimited resouces

communicate with each oth


er.
Components
-

can

Fast operaing systm


Scanned with CamScanner
DATE

Limitations-

Gode written in this os is difficult to port


it generate mare errors and bugs bez user use same addras
location as the kenel.
adding and remoring Funcione are difficull.
3.
Layered Shrucure
User Interface

Layero
harcdwore

each layer develaped and debugged independently with asumption that


-

all
lower layers hare alrady debugged

Advantage simple construction

Disadvantage - less efficient


difficult to define vanous layers

Scanned with CamScanner


DATE

4. Microkernel Structure-

basic idea remore all non-essential serrices from the ker


nel and
make kernel efficient and small as possible.

-provide basic proceas,memary management,


Serrice.
message passing bekwen other

More secure

easily exapansion

eg- GNX.

Basis for Microkernel Monolithic kemel


Comparison

Basia user service and kemel


Serrice are kept in seperate kept in same address
address

size Smaller in size


larger in size.

Exeution Slow exewtion Fast exewtion

Extendible. easily extendable hard to extead

if semie crashes it deesn't effect


Secunty does

effect on working

Gode more code equired less cude is required


eo ea-QNX, Sumbian Linux etc.
Scanned with CamScanner
DATE

/2 021
6/02 y
a t u rda
S

made available
System calls- praride an interface to serices
by os.
Calls written in C& ctt

*
Types-
>
process Control-
load, execute, end,abort, termination pracess, get/set process attributes.
wait for lime, wait event, signol event, allocote Fre memory

File management
Create File, delete File,open, close , read, wnite,reposition,get/sct File
attibutian

3)
Derice management-
reguest derice,Hlese denice,rad, write , reposition get/ set device
athibuks, lagically attachar detach denice.

47 Information maintenance-
get/set time or date, get/ set system data.
5
Cammunicotian=
Crrate ,delete
communication connection,send, eceire mes
sages
transter status information, attach ar
detach remate derices

Scanned with CamScanner


DATE

Linux kemel and shell-


bath kernel and chell are used to perfarm any operation on system

When user gives his cammand for performing any operakion then
Request will gaes to shell parts / interpreter which translale human
pragram into machine longuage.

And then request will transterred to keinel

kernel heart of aperating system. and enny operaticn is performed by


using kemel.

Some operotion like :


is it checks whether proress is munning or wailing for the user request
ie Control process state.

27 allocate inemory far running procos


3>
process scheduling and swap aut funcdión

47 Virtual memory management

) file management and permissians

pracess scheduling is the actinty of the process manager that handles


the temoral of running pracss from CPU and selection of another procss
on basis of a pacticular strategy

Scanned with CamScanner


DATE

/2 020
/02 y
10
d n e sda
W e

02. Pracess and scheduling of process


Process
program - a pragram in executian laad in file memorg

program is passive entity stored in exeutable file


proccos is active entity.

program becomes process when executable Filc loaded into memory

Execution of pragram started via GUI mouse click. command line


entry of its name

*
parts of process-
1.
program code/ text section
2. cuent activity including program counter
3.
Stack- contain temparary data.
4. parameters, addresses, vanables.
section cantaining glebal variable
5.
Data

Heap containing memory allacate during runtime


6.

max

stack个

↑ Process.

heap
data
text
Θ

Scanned with CamScanner


DATE

pracess state-

New terminated
admitted intemupt exit

rady (running
Scheduler dispatch
I/o or ernt
Ilo or erent wait
Completion waiting

New = process is created


running- executed
woiting- waiting far or some event to occur

ready- waiting to be assigned to a processor


terminated - finished execution

*
Process Contral Block (РCB)
Process state
running 4 waiting
Process number
program counter → location of instructions to next exeute
registers contains all process- centric registers
memory limits
list of oper files

*
process operations = it provides a mechanism for process cration
and termination.

Scanned with CamScanner

You might also like