You are on page 1of 30

Storage Management and Security

By
Dr. Nileshchandra K. Pickle
Assistant Professor
VIT AP University
Contents

● Storage structure
● Disk Scheduling Algorithms
● Protection Mechanisms
Storage Structure - Disk Structure

● Click below link to see animation of hard disk architecture

Click Here
Storage Structure - Disk Structure
Storage Structure - Disk Structure

Platter Surfaces Tracks Sectors Data

# platters = 8
# surfaces = 2
# tracks = 256
# sectors = 512
# data size per sector = 512KB

Total size of disk


= 8 * 2 * 256 * 512 * 512 KB = 1 TB
# bits required to represent disk size = 40 bits
Disk Access Time

● Seek time - Time taken by read/write head to reach


desired track.
● Rotation time - Time taken for one full rotation.
● Rotational Latency - Time taken to reach desired sector
● Transfer Time - Data to be transferred / Transfer rate
● Transfer rate - # surfaces * capacity of one track * #
rotations in one second
● Disk Access time - seek time + Rotational Time + Transfer
Time
Disk Scheduling Algorithms

● Goal - To minimize seek time i.e. time taken to reach


upto the desired track
1. First Come First Serve
2. Shortest Seek Time First
3. SCAN
4. LOOK
5. CSCAN
6. CLOOK
Disk Scheduling Algorithms - FCFS

● A disk contains 200 tracks numbered from 0-199. Request


queue contains track numbers 82, 170, 43, 140, 24, 16,
190 respectively. Current position of read/write head is
50. Calculate total number of track movements for
read/write head.
Disk Scheduling Algorithms - FCFS
80 170 43 140 24 16 190 Current position of R/W head = 50

|80 -50| = 30
0 50 100 150 199
|170 -80| = 90
|43 -170| = 127
|140 -43| = 97
|24 -140| = 116
|16 -24| = 8
|190 -16| = 174

Total = 642
Disk Scheduling Algorithms - FCFS

● Advantages
1. Simplicity
2. No starvation as FCFS strategy followed
● Disadvantages
1. Not very efficient
2. Average seek time is very high
Disk Scheduling Algorithms - SSTF
80 170 43 140 24 16 190 Current position of R/W head = 50

|43 -50| = 07
0 50 100 150 199
|24 -43| = 19
|16 -24| = 8
|80-16| = 64
|140 - 80| = 60
|170 - 140| = 30
|190 - 170| = 20

Total = 208
Disk Scheduling Algorithms - SSTF
80 170 43 140 24 16 190

● Shortest seek time first (SSTF) algorithm selects the disk


I/O request which requires the least disk arm movement from
its current position regardless of the direction.
● It reduces the total seek time as compared to FCFS.
● It allows the head to move to the closest track in the
service queue
Disk Scheduling Algorithms - SCAN
80 170 43 140 24 16 190

● Move towards largest or smallest (mentioned in question) value


of starting point first
● Visit all tracks while traveling towards largest track number in
between
● Visit till last track in the direction of largest value
● Now move towards other direction and serve all requests in
opposite direction
Disk Scheduling Algorithms - SCAN
80 170 43 140 24 16 190 Current position of R/W head = 50

0 50 100 150 199 |80 -50| = 30


|140 - 80| = 60
|170 - 140| = 30
|190-170| = 20
|199 - 190| = 9
|43 - 199| = 156
|24 - 43| = 19
|16 - 24| = 8

Total = 332
Disk Scheduling Algorithms - SCAN

● Advantages and disadvantages


1. High throughput
2. No starvation
3. SCAN disk scheduling algorithm takes long waiting time
for the cylinders, just visited by the head.
4. we have to move the disk head to the end of the disk
even when we don’t have any request to service.
Disk Scheduling Algorithms - LOOK
80 170 43 140 24 16 190

● LOOK is just like SCAN, only difference is it will not visit


last track if it is not required
Disk Scheduling Algorithms - LOOK
80 170 43 140 24 16 190 Current position of R/W head = 50

0 50 100 150 199 |80 -50| = 30


|140 - 80| = 60
|170 - 140| = 30
|190-170| = 20
|43 - 190| = 147
|24 - 43| = 19
|16 - 24| = 8

Total = 314
Disk Scheduling Algorithms - LOOK

● Advantages and disadvantages


1. High throughput
2. No starvation
3. there is no requirement of disk head to move till the
end to the disk when we do not have any request to be
serviced.
4. In look disk scheduling, there is more overhead to
find the end request.
Disk Scheduling Algorithms - Circular SCAN (C-SCAN)
80 170 43 140 24 16 190

● C-SCAN is just like SCAN, only difference is after visiting last


track in one direction, it will restart from 0th track
Disk Scheduling Algorithms - Circular SCAN (C-SCAN)
80 170 43 140 24 16 190 Current position of R/W head = 50

0 50 100 150 199 |80 -50| = 30


|140 - 80| = 60
|170 - 140| = 30
|190-170| = 20
|199 - 190| = 9
|0 - 199| = 199
|16 - 0| = 16
|24 - 16| = 8
|43 - 24| = 19

Total = 391
Disk Scheduling Algorithms - Circular SCAN (C-SCAN)

● Advantages and disadvantages


1. High throughput
2. No starvation
3. In look disk scheduling, there is more overhead to
find the end request.
4. Once one end of platter is reached we have to start
again from first track
Disk Scheduling Algorithms - Circular LOOK (C-LOOK)
80 170 43 140 24 16 190

● C-LOOK is just like LOOK, only difference is it will not visit


last track if it is not required
Disk Scheduling Algorithms - Circular LOOK (C-LOOK)
80 170 43 140 24 16 190 Current position of R/W head = 50

0 50 100 150 199 |80 -50| = 30


|140 - 80| = 60
|170 - 140| = 30
|190-170| = 20
|16 - 190| = 174

|24 - 16| = 8
|43 - 24| = 19

Total = 341
Disk Scheduling Algorithms - C-LOOK

● Advantages and disadvantages


1. High throughput
2. No starvation
3. there is no requirement of disk head to move till the
end to the disk when we do not have any request to be
serviced.
4. In look disk scheduling, there is more overhead to
find the end request.
Protection and Security

● Computer consists of collection objects, hardware or


software
● Each object has unique name and can be accessed through
well defined set of instructions
● Protection Problem - Ensure that each object is accessed
correctly and only by those processes that are allowed to
do so
Protection and Security

● Security Violation categories


1. Breach confidentiality - Unauthorized reading of data
2. Breach of integrity - Unauthorized writing of data
3. Breach availability - Unauthorized destruction of data
4. Theft of service - Unauthorized use of resources
5. Denial of service - Prevention of legitimate use
Protection and Security

● Principles of Protection
1. Programs, users, system should be given just enough
privileges to perform their tasks
2. Privileges can be static (during life of system or
process)
Protection and Security

● Domain Structure
● Domain is a set of access rights

Domain/O F1 F2 F3 Printer
bjects
Access Matrix
D1 read read

D2 Print

D3 read Execute

D4 read read
write write
Protection and Security

● Security - System is secure if resources used and


accessed as intended - Unachievable
○ Intruders - Attempt to breach security
○ Threat - Potential security violation
○ Attack - Attempt to breach the security

You might also like