You are on page 1of 16

| Page No.

Date

MOues-fon

plaîo any. 4 Sphedulfnq Cea


CPU lization
In mutti proqrommify the
oblec+fve $S to keep (puds bL3 as psk. l

TEoughput Lt s thea olpoocegeg Fher


Completea pe Unît
measuare bF bgt done in he Sysiem

T+s the sum

Submissiooi ot aTeQuegt Qntî the rst

ADene Vtual Meaos


Stual memg Rsl the Gerns e pa-rotion o
logtco memtny Som phys?c a memg
bte stase +he Suotan USe of louie
releateo Commondi
Proce&S

Sunlox ba TakiD
ba [3ob-number
Page No.
Data

Use
- The bg Commond moveg a54spende
Solb to the back.guund.
T5s allo s the 9oto Continue
Uonino n the bockgound oki le yo.
(ontinue to us e the tenmina

Syntox kL Pd

kin-SgaalNome-SignalNumbe i
Procegs1

se: - k L Coamand Ss usecl to kilL the

for kfilgna he acsse


KCommand Sends TER MTN ATe
Stqnalto aitthe acess ID tht
eg
Sfil 3946

uhat 8 deadlock GNe (onditiong oP esdkce


Deodlock
Paoe No.
Date

is holdìng a oesource4 otina Gnctbo


megouce 0cqured by Sorn e roces.

Cand tons deadlock

)Mutual exclusion?
beld o a non sharakle mode thot ?S

he nutual erclusion Corcition


must hold fos inonshorable resource
Shamable.nesauces
mutualy clus? ve accoss thus Connbt be

2) Hold and cpolt?

esource that is holdnq ot astone reSOUe


Oth Sooethot
held bthe
by
9Ab preempti onc
Rasoumes qrontlal to the vequtstim
Docess(Onnot
T5eeêgoue e Shglld be releageo by
S4seL thot ?s holdinq

The caaula oit Cona?lon


Raudes the holdLDat CondSon So the R

LeLeodependent,
Pago No.
Data

Roquegt

by
Pa

ReOUce Request

COndton fot deadloak


sDeRne tem Suoappinq
A s reSdesn the memony oher
is meady to eelute o Continue proces

Agair

as sioapping

atoeile ddSosaorn
dfogaen
9Mulfleue quêu SchedalSn
CPU Schaculfiag LOisa
algeithm that dii des 4h
inmciple ueues eoh

99S)reemptio
Oh h
s allbuoeal nmosSchedul
mean
Can preempalous
binher
hecPUs allocatéol to the highen
orìoitpocaSs
(hAed foar each queue
depending on he
Page No.
Date

neqeirements o the Pocassosiohot


queu e.
)The goalomulilevel queue gphodulf na

&pefarmance

Aduani
) lous schedalnqouebeac
2)EEfcien+ alloCation of CU ne

u)Custorîzable
paioitizatian
s) reemption

isodu}

Sanatue

Sysiter poaes
queue 2

atch pocess uouey


ueue
Teadygtat th fobacis ent
ecol then pocesse be
cis blo
theqnesto poceis the
depend
On Schedulfna
qs CP
eduliog GgMuAlesat
Queue
Cegi Student
o
loest
pocas Bcteh
pocois eiting
Inderative
ses oLes Ctive dnterc
rocess System
kighest
Data
No. PagT
stauctuzeacineoto Tes
xeCtonmy level )1AD
diectng Leel Single )
ing Quegtion- () the pe As
EAploia
burst Cpo,
Store Lood
burst Ilb
le to
wte
adex
ncrement Store
.
le orn reach
Store aol
tore ad lo
Cycie birst Io Cycle burst PU
(Pags No.
Data

1 ber ponng Stgrn enloioD.


Gesrian lation.
)
9Page. is alusays of Segman tis oF Voabis

0The Sizeo paae The cize of Ssn9nt


Spociffeal by the
hodore
953) page ?s inSible Seqa@nation s.
to

90)for the paging


Compile 8 ocountale

I+ 5 laste n
Seamentaton is sios
SRqmentaton
Pagag
in Snno
Couud egult SeqmentotionCnd

ragmeniatign qmentation
hard to Easy t pplg

efricient moneefiient
Dment toikte to
fro mes rom memon
Page No.
Date

onSider follcwinqpage. Keforence Stang

b. Assu rm e. arne

0p ton RUalqoithm

EIEOpage eplacenent alqoithro

43
Ht5
2 2

3
22 3

Totol ns ofprge
2sOponal page eplaement.algeathm

2 2

Total no oF page

eplacemea Talq thoa


3 LQU page
43
HL2

2 2 2 3
Pago No.)
Dat

12

enalamênhationoîcals the
Situaiog hene th ee
memonm a v l a e b u t t is not

Compaction so techaiqie to (sllec +


a1Lhe ree memen pesent In the fomm
OF aqment nto one locoe chunk of
reememonsh?ch can be use d to
3theo
Com pacti on Con be done onl
ohen the
eloctìondunanfo& done at eeCtion
meCompa ction Con not be done ohen
assembl ime
Befoxe (om
Moin memon
Dceupiea Space

DCcupfespace
s fee Spare

Afte Compccton
Main emoni
Occupiesl apacs
OCcupie &pace
Spaie
fee Space
Page No.
Date

) Reduce ext ernal gmentotion.


2) Make membny dae erpien
3)Me mory becom e Contiqu oug

2)Not aloayS easy to pezfor m(ompscton

det
Copy 1 byte ho oneplace to anoth er

1Btrans e needs 6NS

-gsecS

hence st is spoueol to So.aeersent


tronska
amount ot t g hot
needs Sem e
Secondg

1 3 . f h suAtable eaample descbe how to is e


Si+ mapmethod on Ree spaee monagement
BY QB MsBI Popeg

Calculate averae cocAîng me ith Round

Busst ime
P
Pa
P
Py
Dale

Bust me

Py 4

lhe resutng Round Rabin


scheduleî o
PP73
PP
15 G

alaiing tme Rur


aloiting
OtLt l2+ 15

eAveoqe
&dRsadoantag ey
Enlist different file allocation methods? Explain contiguous
allocation method in detail.
Ans From the user's point of view, a file is an abstract data type. It can be created. Im- listing,
opened, written, read, closed and deleted without any real concern for its 2m for
implementation. The implementation of a file is a problem far the operating diagram, 3m
system. for
The main problem is how to allocate space to these files so that disk space is explanation
effectively utilized and files can be quickly accessed.
Three major methods of allocating disk space are in wide use:
Contiguous
Linked
Indexed
Contiguous Allocation
The contiguous allocation method requires each file to occupy
a set of contiguous addresses on the disk. Disk addresses define
a linear ordering on the disk. Contiguous allocation of a file is
defined by the disk address of the first block and its length. If
the file is 'n' blocks long and starts at location 'b', then it
occupies blocks b, b+l, b+2, - --- - b+n-1. The directory entry
for each file indicates the address of the starting block and the
length of the area allocated for this file.
Contiguous allocation suppots both sequential and direct
25 | 2 6

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/MEC- 27001 -2013 Certified)

accesS.
For direct access to block i of a file, which starts at block 'b',
we can imnediately access block b+i. The difficulty with
contiguous allocation is finding space for a new file.
For direct access to block i' of a file, which starts at block 'b',
we can imnediately access block b+i.
The difficulty with contiguous allocation is finding space for a
new file.
If file to be created ure 'n' blocks long, we must search free
space list for 'n' free contiguous blocks.
Directory
Filo Start Longth
cOunt
1 2 3 cOunt
tr

4 56
8 910 11O
tr
121 13 14 5

17 18 19
na
20 21 23[

24 25 26st 27O
28 29 30 31

Advantages of Contiguous File Allocation Method:


1. Supports both sequential and direct access methods.
2. Contiguous allocation is the best form of allocation for
sequential files. Multiple blocks can be brought in at a time to
improve /O performance for sequential processing.
3. It is also easy to retrieve a single block from a file. For
example, ifa file starts at block 'n' and the ith block of the file
is wanted, its location on secondary storage is simply n + i.
4. Reading all blocks belonging to each file is very fast.
5. Provides good performance.

Disadvantages of Contiguous File Allocation Method:


1. Suffers from external fragmentation.
2. Very difficult to find contiguous blocks of space for new files.
3. Also with pre-allocation, it is necessary to declare the size of
the file at the time of creation which many a times is difficult to
estimate.
4. Compaction may be required and it can be very expensive.
e) Deseribe free space management technique. (Any two) 4M
Ans. A file system is responsible to allocate the free blocks to the file
therefore it has to keep track of all the free blocks present in the Any 2
disk.There are mainly four approaches by using which, the free techniques
blocks in the disk are managed. Correct
Explanation
2M each
Bit Vector
2 Linked List

1)Bit Vector:
The free-space list is implemented as a bit map or bit vector.
Each block is represented by I bit. If the block is free, the bit is 1; if
the block is allocated, the bit is 0.
For example,consider a disk where blocks 2, 3, 4, 5,8, 9, 10, 11, 12,
13 are free and the rest of the blocks are allocated.
The free-space bit map would be : 0011110011111100

0 2 3 5 6 7 9 10|1l| 12 13 14 15

0 0 1 | 1 |1 | 1 0 01 1 00
l=Free block
0= Allocated block
The main advantage of this approach is its relative simplicity and its
efficiency in finding the first free block or n consecutive free blocks
on the disk.

2) Linked List
In this approach, the free disk blocks are linked together ie. a free
block contains a pointer to the next free block. The block number of
the very first disk block is stored at a separate location on disk and is
also cached in memnory. In this approach, link all the disk blocks
together, keeping a pointer to the first free block. This block contains
a pointer to the next free disk block, and so on.

Page 16 / 21

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


(Autonomous)
(ISO/IEC - 27001 - 2005 Certified)

WINTER- 2022EXAMINATION
MODEL ANSWER
22516
Subject: Operating System Subject Code:

fre
kathe
3. Indexed allocation
(MSBTE -W-08, W-18)
Q.6.5.12 Explain Indexed allocaton method.
Ref Sec. 6.5(3) W-08, 4 Marks

O. 6.5.13 Descrlbe ndexed alfocation method with


advantage and disadvantage.
Ret. Sec. 6.5(3) W-18, 4Marks

FAT stores the directory entries present with starting


block in it. Both FAT table address and file address
written in the directory can match and file is read.
..A SACHINSHAHVenture
6-1:
Operating System (CO/IF/Sem 5/MSBTE)
The linked allocation cannot perform well if FAT is not
there. This problem is recovered by indexed allocation.
Index allocation brings all pointers together into one
location called as indexed block.
address
If we wish to search ih block of file. we use i"
created,
of index block entry. Initially when the file is
be set to nil.
all the pointers in the indexed block will
entries
When the file is written from its " block, the
willbe made in index block.

directory

file
index block
ABC 19

e 10110
12 18J14
1671D 19 21
25

24J2s28er
28J2930J31

Fig.6.5.5: Indexed allocation


from wasted
Index support direct access. It suffers
than linked
space problem. The pointer head is more
allocation as the block size of indexed block is more.

Advantages
1
This method is faster than contiguous and linked
allocation.

2.
Block creates the set of pointer at one location.

3. It does not suffer from extra fragmentation.


4 Accessing index block is easy.
Disadvantages
1 It suffers because of space wasted.
2 Deciding indexed block size for each file is
complicated process.
3 Storing many addresses i.e. pointers becomes an
overhead.

You might also like