Week 12 Disk Management
Week 12 Disk Management
1
Secendory Storage Management
2
Outline
• Disk Structure
• Disk Scheduling
• Disk Management
• Swap-Space Management
• RAID Structure
• Disk Attachment
• Stable-Storage Implementation
• Tertiary Storage Devices
3
Moving-head Disk Machanism
4
Overview of Mass Storage Structure
5
Disk Structure
6
Disk Scheduling
7
Overview
8
Overview (Cont.)
9
FCFS
• Advantage
– Easy to understand and implement (queue)
– No Starvation (many suffer from convey effect)
– Can be used with less load
• Disadvantage
– Require more Seek time
– More waiting time and response time
– Inefficient
11
SSTF
12
SSTF (Cont.)
• Advantage
– Very efficientt in seek moves
– Increased throughput
Disadvantage
– Overhead to find out closest request
– Request far from head, will starve
– High variance in waiting time and response time
14
SCAN
• The disk arm starts at one end of the disk, and moves
toward the other end, servicing requests until it gets to the
other end of the disk, where the head movement is reversed
and servicing continues.
15
SCAN (Cont.)
Illustration shows
16 total head movement of 236
cylinders.
SCAN (Cont.)
• Advantage
– Simple easy to understand and implement
– No Starvation (bounded waiting time)
Disadvantage
– Unnecessary mobile time till the end of the disk, even there is no request
– Longer waiting time for requesting just visited by head
17
C-SCAN
• The head moves from one end of the disk to the other,
servicing requests as it goes. When it reaches the other
end, however, it immediately returns to the beginning of the
disk, without servicing any requests on the return trip.
18
C-SCAN (Cont.)
19
C-SCAN (Cont.)
• Advantage
– Provide uniform waiting time
– Better response time
• Disadvantage
– More seek movements compare to simple SCAN.
20
LOOK Scheduling
• Look Scheduling
• Similar with Scan scheduling, but the disk arm only goes as
far as the final request in each direction
• For example, a disk queue with requests for I/O to sectors
on cylinders
21
C-LOOK
• Version of C-SCAN
22
C-LOOK (Cont.)
23
Selecting a Disk-Scheduling Algorithm
24
Disk Management
25
Disk Formatting
26
Disk Partition
27
A Typical File-System Organization
28
Boot Block
29
MS-DOS Disk Layout
30
Bad Blocks
• IDE
– MS-DOS format : write a special value into the corresponding FAT
entry for bad blocks
– MS-DOS chkdsk : search and lock bad blocks
31
Bad Blocks – SCSI(Small Computer System Interface)
(Cont.)
32
Bad Blocks – SCSI (Cont.)
33
Read Errors
34
Reliability by Redundancy
36
Key evaluation points for a RAID System
37
RAID levels
38
RAID 0
39
RAID 0
40
RAID 1
41
RAID 2
43
RAID 3
44
RAID 3
45
RAID 4
46
RAID 5
47
RAID 5
48
Advantage of RAID
49
Disadvantage of RAID
50
Swap-space Management
Swap-Space Use
52
Swap-Space Location
• A swap space can reside in one of two locations:
– As a normal file system
• easy, but inefficient (time consuming)
• External fragmentation
– In a separate disk partition
• Swap space storage manager is used to allocate and deallocate
the memory
• Designed to improve speed rather storage
• internal fragmentation
– Mixed scheme
53