Professional Documents
Culture Documents
Date
MOues-fon
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
)Mutual exclusion?
beld o a non sharakle mode thot ?S
LeLeodependent,
Pago No.
Data
Roquegt
by
Pa
ReOUce Request
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
&pefarmance
Aduani
) lous schedalnqouebeac
2)EEfcien+ alloCation of CU ne
u)Custorîzable
paioitizatian
s) reemption
isodu}
Sanatue
Sysiter poaes
queue 2
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
b. Assu rm e. arne
0p ton RUalqoithm
43
Ht5
2 2
3
22 3
Totol ns ofprge
2sOponal page eplaement.algeathm
2 2
Total no oF page
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
DCcupfespace
s fee Spare
Afte Compccton
Main emoni
Occupiesl apacs
OCcupie &pace
Spaie
fee Space
Page No.
Date
det
Copy 1 byte ho oneplace to anoth er
-gsecS
Busst ime
P
Pa
P
Py
Dale
Bust me
Py 4
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
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
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
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
directory
file
index block
ABC 19
e 10110
12 18J14
1671D 19 21
25
24J2s28er
28J2930J31
Advantages
1
This method is faster than contiguous and linked
allocation.
2.
Block creates the set of pointer at one location.