0% found this document useful (0 votes)
20 views50 pages

Os Module 5 Chapter 3

The document provides an overview of secondary storage structures, including disk organization, disk attachment methods, and storage area networks. It discusses various disk scheduling algorithms such as FCFS, SSTF, SCAN, C-SCAN, and GLOOK, highlighting their functionalities and performance implications. Additionally, it covers the importance of efficient disk access and management in operating systems.

Uploaded by

nischal3202
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)
20 views50 pages

Os Module 5 Chapter 3

The document provides an overview of secondary storage structures, including disk organization, disk attachment methods, and storage area networks. It discusses various disk scheduling algorithms such as FCFS, SSTF, SCAN, C-SCAN, and GLOOK, highlighting their functionalities and performance implications. Additionally, it covers the importance of efficient disk access and management in operating systems.

Uploaded by

nischal3202
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
You are on page 1/ 50

Module-5 Secondary Storage

Structure

Disk
storage Structure
Disk drives are addressed as a
larget-dim
of
array
is the
logical blocks Where
unit of
the
logical
transfer
block
smallest

We can use low level


formatting to
create

logical blocks on the


divides the
physical
disk into
media i e
. .
.

this process physical


that the hardware & firmware
logical blocks
know how to access

The physicaldisc is organized into concentric


circles called tracks and these tracks are
into
grouped together cylinder .

The
mapping
sectors
is done
sequentially onto the

9) Sector O is the first sector of the first track


on the outermost
cylinder
b) The subsequent mapped onto
logic blocks are

the remaining sectors in that track


followed the rest of the tracks in
that
by
cylinder
and then
through
the rest of
the from outermost to innermost
cylinders
2) Since there be
bad sectors the disk,
must be
may on
their
they
use
marked as
shouldn't be made
unusable and

d) The no of sectors per track is not constant


·

because the discs spin with constant


velocity hence it divides the track
angular
to sectors of constant width
i

. e .
outer tracks can
angular
accomodate more .
Disk Attachment
a) Host-Attached Storage
Host-attached storage devices that
storages are
are
directly connected to a
computer and
can be accessed via the 110 ports
to the 1/0 buses
talking
Small
Computer System Interface (SCSI) is
a bus that can have upto 16 devices connected
to it.

Rolesin SCSI communication

a) SCSI initiator >


typically the host that
-

requests to the devices


operation storage
6) SCSI
target > devices that receive commands
-

and perform the operations


Each SCSI
target can have up to 8 logical
units (disks attached to device controller

Fibre Channel (FC) is a


high speed serial
architecture which unlike bus architecture
switched Fabric multiple
,
can be a

connection beton
allowing
devices and
paths and
uses a 24 bit address space allowing
for a
large no of unique addresses
which helps in building large storage area networks
Here , the I/O is directed to Bus ID , device ID,

LUNClogical unit (

Storage Array
Astorage arrayisa specialpicof har a
a

for
Instead of
using single discs a
computer ,
we can combine
multiple discs intoa an

array which can be


managed by
storage array
.
It
usually has (Hardware Components)

a) controllers
connectivity
6) Ports for host
software (Non-volatile
Memory controlling
RAM and software)
and


) a few to thousands of discs

Features (Functionalities & capabilities


> RAID
-

Not spares
>
-

Not
swap
>
-

> And other features found on the file


system
-

such as clones , thin provisioning


snapshots
, ,
replication duplication
,
Area Network
6)
Storage
Area Network is common in
Storage and rather than
large storage
environments
relying on A

single storage
network that
device, SAN is a dedicated
connects one or more storage
which contain discs and the
arrays
controllers that them .
manage
The are connected to one or more
storage
arrays
Fibre Channel (FC) switches . Hosts are
also connected to these Fibre switches

How is
storage made available
?
storage is made available
from
via LUN (LogicaltoUnit
Numbering) Masking specific arrays
specific servers.

FC switches it is
Since
they use ,
easy to add or

host and allocate it


remove
storage , add new

storage
Network-AttachedStorage
NAS is that is
a
storage system connected to
network IP network) rather than
(typically
a an

being directly attached to computer through


a

a local bus dedicated


or interface
storage .

when we attach to NAS device were not just


a ,

with but rather we are


dealing raw disc blocks
inter actin with a complete file
g the NAS device.
system
managed by
for this remote
commonly used protocols used
file
system include
a) NFS b) CIFS (Common Internet File

system)
NAS
system typically use remote
handle file
procedure
calls (RPC)
over
to
the network , between host
system operation
& server

iSCSI protocol use IP network to


carryscSI
protocol for
remotely attaching to devices
I block.
Disk Scheduling
One of the responsibilities of the
operatingand
system is to use the hardware efficiently
this means for disk drives efficiency means
9) Fast Access Time
b)
High Disk Bandwidth

The access time has two i


major components
.
.
e

i) seek timet
> The it takes for the disc's
period
read/write head to more to the requested
track

ii) rotational to
reached the
latency -> The time required
required sector of the track

We need to minimize the seek time to


improve the overall performance of the

system .

The diskbandwidth is the total number of bytes


transfered , divided by the total time between
the first request for the service and the
of the transfer .
completion
We can
improve both the access timein and the
which
bandwidth
by managing
the order
disk 1/0 are serviced
Whenever a process needs 110 to or from
the disc , it call to the CPU
to
uses
info
a
system
request on

as Whether the task is ip or olp ?


for the transfer
b) What is the disc address ?
1) What is the address for the
memory
transfer ?
d) What are the no- of sectors to transfer ?

If the desired disk drive and controller


are available , the request can be serviced

immediately or else itforis that


placed in a queue
ofpendingrequests
the OS
dis , whicso
.

to schedule
so there
the
are several
of disc
algorithms
servicing 110 requests .
FCFS
Scheduling
The simplest form of which is
fair
disc
scheduling the fastest
intrinsically but
generally not

Consider a discqueue with requests for 110


to blocks on
cytinder
9)8 , 183 , 37 122 , 14
, ,
124 , 65 , 67
queue 98 , 183 , 37 122 ,
= , 14 , 124 , 65 , 67
head starts at 53

01437 53656798122124 183

&

- J
-
·
-
·
-
- >
-
-
Shortest Seek Time First (SSTF)
Shortest Seek Time First selects the request
with the minimum seek time from the current
head position
It result in starvation of a 110 request
may
9)8 , 183 , 37 122 , 14
, ,
124 , 65 , 67
queue 98 , 183 , 37 122 ,
= , 14 , 124 , 65 , 67
head starts at 53

0143753656798122124 183

·
-
&

-
6

6
SCAN
Algorithm
> Disk arm starts at one end of the disc
-

- It moves towards the other end


in its path
,
servicing
requests
> When it reaches the end of the disk the dir
-

is reversed and it requests services while


back
moving
> This movement there
continues as
long as are
-

pending requests

of the in
Because
k
similarity behaviour , it is
a .
. a Elevator
algorithm
9)8 , 183 , 37 122 , 14 , ,
124 , 65 , 67
queue 98 , 183 , 37 122 ,
= , 14 , 124 , 65 , 67
head starts at 53

0143753656798122124783

-
&

- &
CSCAN
Algorithm
> Head moves from one end to the other end of
-

the disc , request as it goes but


servicing
When it reaches the other end it immediately ,

returns to the of the disc , who


beginning
servicing any requests on the return trip

9)8 , 183 , 37 122 , 14


, 124 , 65 , 67
,

queue 98 , 183 , 37 122 ,


= , 14 , 124 , 65 , 67
head starts at 53

0143753656798122124 183

-
·

· 6
GLOOK Algorithm
It is a version of C-SCAN in which the arm only
as far as the last request in each
goes
direction
first
and reverses direction
to the
immediately
ends of
wo
the disk
going all the
way

9)8 , 183 , 37 122 , 14


, ,
124 , 65 , 67
queue 98 , 183 , 37 122 ,
= , 14 , 124 , 65 , 67
head starts at 53

0143753656798122124 183
6

-
&

&

&

-
·
Selecting a Disc
Scheduling Algorithm
SSTF is common and has a natural appeal
SCAN & C-SCAN work better on tems that
sys > Less
place a heavy
load on the disk -

starvation

The I size of request


performance depends on no .

The should be written


as
disc
a scheduling
separate algorith t the os and
be able to be
it should
if needed.
replaced by different
algorithm
Hence , either SSTF or Look is a resonable
default choice
algorith

You might also like