Chapter 14: Mass-Storage Systems - PowerPoint PPT Presentation

1 / 101
About This Presentation
Title:

Chapter 14: Mass-Storage Systems

Description:

Disk are made of thin metallic platters with a read/write head flying over it. ... per disk (tracks per platter): 1000. Platters: 4-20. Rotational speed: 7200 ... – PowerPoint PPT presentation

Number of Views:176
Avg rating:3.0/5.0
Slides: 102
Provided by: luce169
Category:

less

Transcript and Presenter's Notes

Title: Chapter 14: Mass-Storage Systems


1
Chapter 14 Mass-Storage Systems
2
Chapter 14 Mass-Storage Systems
  • Overview of Mass Storage Structure
  • Disk Structure
  • Disk Scheduling
  • Disk Management
  • Swap-Space Management
  • RAID Structure
  • Tertiary Storage Devices
  • Operating System Issues
  • Performance Issues

3
Objectives
  • Describe the physical structure of secondary and
    tertiary storage devices and the resulting
    effects on the uses of the devices
  • Explain the performance characteristics of
    mass-storage devices
  • Discuss operating-system services provided for
    mass storage, including RAID and HSM

4
Overview of Mass Storage Structure
  • Magnetic tape
  • early secondary-storage medium
  • Relatively permanent and holds large quantities
    of data
  • Access time slow
  • Random access 1000 times slower than disk
  • Mainly used for backup, storage of
    infrequently-used data, transfer medium between
    systems
  • Kept in spool and wound or rewound past
    read-write head
  • Once data under head, transfer rates comparable
    to disk
  • 20-200GB typical storage
  • Common technologies are 4mm, 8mm, 19mm, LTO-2 and
    SDLT

5
Overview of Mass Storage Structure
  • Magnetic disks provide bulk of secondary storage
    of modern computers
  • Drives rotate up to 7200 times per minute
  • Transfer rate is rate at which data flow between
    drive and computer
  • Positioning time (random-access time) is time to
    move disk arm to desired cylinder (seek time) and
    time for desired sector to rotate under the disk
    head (rotational latency)
  • Head crash results from disk head making contact
    with the disk surface
  • Disks can be removable
  • Drive attached to computer via I/O bus
  • Busses vary, including EIDE, ATA, SATA, USB,
    Fibre Channel, SCSI
  • Host controller in computer uses bus to talk to
    disk controller built into drive or storage array

6
Moving-head Disk Machanism
7
Physical Disk Structure
  • Disk are made of thin metallic platters with a
    read/write head flying over it.
  • To read from disk, we must specify
  • cylinder
  • surface
  • sector
  • transfer size
  • memory address
  • Transfer time includes seek, latency, and
    transfer time

ReadWrite heads
Platters
Spindle
Track
Sector
Rot Delay
Seek Time
8
Disk Structure
  • Disk drives are addressed as large 1-dimensional
    arrays of logical blocks, where the logical block
    is the smallest unit of transfer.
  • The 1-dimensional array of logical blocks is
    mapped into the sectors of the disk sequentially.
  • Sector 0 is the first sector of the first track
    on the outermost cylinder.
  • Mapping proceeds in order through that track,
    then the rest of the tracks in that cylinder, and
    then through the rest of the cylinders from
    outermost to innermost.

9
Some Typical Numbers
  • Sector size 512 bytes
  • Sectors per track 32
  • Cylinders per disk (tracks per platter) 1000
  • Platters 4-20
  • Rotational speed 7200 RPM
  • Storage size 100 750 GB
  • Seek time 5-100ms
  • Latency 010ms(average 4ms)
  • Transfer rate 100/300 Mbytes/sec

10
Disk Attachment
  • Host-attached storage accessed through I/O ports
    talking to I/O busses
  • SCSI itself is a bus, up to 16 devices on one
    cable, SCSI initiator requests operation and SCSI
    targets perform tasks
  • Each target can have up to 8 logical units (disks
    attached to device controller
  • FC is high-speed serial architecture
  • Can be switched fabric with 24-bit address space
    the basis of storage area networks (SANs) in
    which many hosts attach to many storage units
  • Can be arbitrated loop (FC-AL) of 126 devices

11
Network-Attached Storage
  • Network-attached storage (NAS) is storage made
    available over a network rather than over a local
    connection (such as a bus)
  • NFS and CIFS are common protocols
  • Implemented via remote procedure calls (RPCs)
    between host and storage
  • New iSCSI protocol uses IP network to carry the
    SCSI protocol

12
Storage Area Network
  • Common in large storage environments (and
    becoming more common)
  • Multiple hosts attached to multiple storage
    arrays - flexible

13
NAS vs SAN
  • A SAN is a dedicated storage area network that is
    interconnected through a Fiber Channel protocol
  • SAN uses either 1-gigabit or 2-gigabit Fiber
    Channel switches and Fiber Channel host bus
    adaptors.
  • Devices such as file servers connect directly to
    the SAN through the Fiber Channel protocol.
  • NAS connects directly to the network using TCP/IP
    over Ethernet.
  • In most cases, no changes to the existing network
    infrastructure need to be made in order to
    install a NAS solution.
  • The network-attached storage device is attached
    to the local area network (typically, an
    Ethernet) and assigned an IP address just like
    any other network device.

14
NAS vs SAN
  • Storage solutions vendors try to be all things
    to all people,
  • SAN and NAS technologies are beginning to
    converge and blur the line even more.
  • CROSSOVER FEATURESFeatures that were once only
    available in SAN solutions are now starting to
    become available in NAS products,
  • Ex. iSCSI allows parts of SAN infrastructures to
    act as NAS filers.
  • iSCSI (Internet small computer system interface)
    is an Internet protocol-based storage networking
    standard for linking data storage facilities.
  • By carrying SCSI commands over IP networks,
    iSCSI is used to facilitate data transfers over
    intranets and to manage storage over long
    distances, loaning SAN a few of the NAS
    capabilities.

15
NAS vs SAN
  • SANs are highly redundant through the
    implementation of multipathing and the ability to
    create fully redundant fiber meshes so there is
    no single point of failure.
  • SANs feature block-level transfers instead of NAS
    file-level transfers. This is critical if you
    have database applications that read and write
    data at the block level.
  • SAN products run on Fiber Channel protocol and
    are entirely isolated from the IP network, so
    there is no contention over the TCP/IP offload
    engine (which optimizes throughput).
  • NAS products run over your existing TCP/IP
    network, and, as such, are prone to latency and
    broadcast storms, and compete for bandwidth with
    users and other network devices.

16

NAS vs SAN
  • You can leverage an existing SAN to act like a
    NAS with an iSCSI switch, which saves money.
  • With a SAN, there is higher security because SAN
    uses zoning and logical unit number (LUN)
    security. NAS security is typically implemented
    at the file-system level through traditional
    operating system access-control lists.
  • There is more flexibility for redundant array of
    independent disks (RAID) levels. While NAS
    products do support standard RAID levels, such as
    0,1,5, you typically do not get the flexibility
    to mix RAID levels within the same device.

17
NAS vs SAN
  • LOWER COSTS WITH NASFile servers see SAN
    attached volumes as locally attached disks,
    whereas a NAS presents them as remote network
    file system (NFS) or new technology file system
    (NTFS) file shares.
  • NTFS is the file system that the operating system
    uses for storing and retrieving files on a hard
    disk.
  • NFS is a client/server application that lets a
    computer user view and optionally store and
    update files on a remote computer as though they
    were on the users own computer.
  • Some applications do not support remote drives
    and can only use a volume that is local to the
    OS.
  • NAS is cheaper than SAN. The initial investment
    in a SAN is expensive due to the high cost of
    Fiber Channel switches and host bus adaptors.

18
NAS vs SAN
  • If you need just simple file storage, NAS is the
    way to go.
  • A NAS product simply plugs into your existing IP
    network as any other device and looks like a
    normal file share on the network.
  • So, a NAS can be dropped right into your
    existing IP network without any additional costs
    or infrastructure changes.
  • Ethernet is a stable and mature protocol and any
    IT administrator already knows Ethernet and
    TCP/IP,
  • there are no steep learning curves compared with
    learning and understanding the Fiber Channel
    protocol.
  • After carefully weighing all the benefits,
    ProfitLine chose to go with a Hitachi 9200 SAN
    infrastructure with Compaq/HP Proliant Servers
    because of its better support for databases and
    higher security.
  • Since ProfitLine is processing tens of thousands
    of invoices monthly on behalf of its clients, and
    the number is only going up with the addition of
    new clients, we needed the more powerful and
    scalable SAN technology.

19
Disk Scheduling
  • The operating system is responsible for using
    hardware efficiently
  • For the disk drives, this means having a fast
    access time and disk bandwidth.
  • Access time has two major components
  • Seek time is the time for the disk are to move
    the heads to the cylinder containing the desired
    sector.
  • Rotational latency is the additional time waiting
    for the disk to rotate the desired sector to the
    disk head.
  • Minimize seek time
  • Seek time ? seek distance
  • Disk bandwidth is the total number of bytes
    transferred, divided by the total time between
    the first request for service and the completion
    of the last transfer.

20
Disk Structure
  • There is no structure to a disk except cylinders
    and sectors, anything else is up to the OS.
  • The OS imposes some structure on disks.
  • Each disk contains
  • 1. data e.g., user files
  • 2. meta-data OS info describing the disk
    structure
  • For example, the free list is a data structure
    indicating which disk blocks are free. It is
    stored on disk (usually) as a bit map each bit
    corresponds to one disk block.
  • The OS may keep the free list bit map in memory
    and write it back to disk from time to time.

21
??? ????
  • ??? ????? ???
  • ?? ???? FCFS ??
  • Seek ???? ? ??
  • latency ???? ???? ??
  • PC? ?? n-way disk interleaving ??
  • Disk ???? ??? ???? ??
  • ???
  • ?? ?? ??
  • ??? ????? ??

22
Disk Scheduling
  • Because disks are slow and seeks are long and
    depend on distance, we can schedule disk
    accesses, e.g.
  • FCFS (do nothing)
  • ok when load is low
  • long waiting times for long request queue
  • SSTF (shortest seek time first)
  • always minimize arm movement. maximize
    throughput.
  • favors middle blocks
  • SCAN (elevator) -- continue in same direction
    until done, then reverse direction and service
    in that order
  • C-SCAN -- like scan, but go back to 0 at end
  • In general, unless there are request queues, it
    doesnt matter
  • explains why some single user systems do badly
    under heavy load.
  • The OS (or database system) may locate files
    strategically for performance reasons.

23
Disk Scheduling (Cont.)
  • Several algorithms exist to schedule the
    servicing of disk I/O requests.
  • We illustrate them with a request queue (0-199).
  • 98, 183, 37, 122, 14, 124, 65, 67
  • Head pointer 53

24
??? ???? - Seek ???
  • FCFS (First-Come-First-Served) ????
  • ??? ???? ???? ??
  • Disk ??(load)? ?? ? ??

25
FCFS
Illustration shows total head movement of 640
cylinders.
26
??? ???? - Seek ???
  • SSTF(Shortest Seek Time First) ????
  • Seek Distance? ?? ??? ?? ??
  • ??? track? ?? ??? ?? Starvation??
  • ?? ??? ??? ?

27
SSTF
  • Selects the request with the minimum seek time
    from the current head position.
  • SSTF scheduling is a form of SJF scheduling may
    cause starvation of some requests.
  • Illustration shows total head movement of 236
    cylinders.

28
SSTF (Cont.)
29
??? ???? - Seek ???
  • SCAN???? (Elevator Algorithm)
  • Head? ?? ???? ?? ?? ??? ??? ??
  • ???? ?? ???? ????

30
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.
  • Sometimes called the elevator algorithm.
  • Illustration shows total head movement of 208
    cylinders.

31
SCAN (Cont.)
32
??? ???? - Seek ???
  • C-SCAN
  • SCAN? ?? -gt Head? ?? ????? ??

33
C-SCAN
  • Provides a more uniform wait time than 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.
  • Treats the cylinders as a circular list that
    wraps around from the last cylinder to the first
    one.

34
C-SCAN (Cont.)
35
C-LOOK
  • Version of C-SCAN
  • Arm only goes as far as the last request in each
    direction, then reverses direction immediately,
    without first going all the way to the end of the
    disk.

36
C-LOOK (Cont.)
37
??? ???? - Seek ???
  • N?? SCAN????
  • ?? ???? ??? ??? ? ???? ??? ??
  • ???? ??? ??? ?????? ??? ??

38
??? ???? - Seek ???
  • ???? ??
  • ?? ?? ???? ??
  • seek latency ???
  • C-scan with rotational optimization? ?? ??

39
Basic disk scheduling policies
40
Selecting a Disk-Scheduling Algorithm
  • SSTF is common and has a natural appeal
  • SCAN and C-SCAN perform better for systems that
    place a heavy load on the disk.
  • Performance depends on the number and types of
    requests.
  • Requests for disk service can be influenced by
    the file-allocation method.
  • The disk-scheduling algorithm should be written
    as a separate module of the operating system,
    allowing it to be replaced with a different
    algorithm if necessary.
  • Either SSTF or LOOK is a reasonable choice for
    the default algorithm.

41
??? ???? - ?? ???
  • ???? ?? ???? ?? ???? ?? ??
  • SLTF(Shortest-latency-time-first)
  • ? ??? ?? SLTF? ???
  • Sector queueing???? ??

42
??? ????- ??? ????
  • ?? ??? ????? ????
  • ???? ????? ??? ??
  • ????? ?? ?? ???? ?? ??? ??? ?? ??? ????? ???
    ????? ????
  • ?? ?????? ??
  • ?? ????? ??? ???? ??? ??? ??? ????? ??
  • ??? ????? ??? ??? ?? ????? ??? ???? ???
  • ?????? ?? ??? ???? ?????? ??? ???, ??? ???? ???
    ??? ????? ????

43
??? ????- ??? ????
  • ?? ??? ?? ???
  • ??? ??? ?? ??? ? ???? ?
  • ?) ????? ???? ?? ??? ?? ??
  • ??? ??? ?? ?? RPS(Rotational positional
    sensing)??
  • RPS rotational delay?? ??? free?
  • ???(nonuniform) ?? ??
  • ?? ?? ??? ??? ??? ???? ?? ??? ??
  • ???? ??? ??? ??
  • ??? ????? ? ?? ??

44
Disk Caching
  • The idea is that data you (or someone) accessed
    recently is likely to be data that you (or
    someone) needs again.

Excel
PPT
The FileSystem
The Buffer Cache
The Disk Driver
45
Disk Locality Works Quite Well
  • Most studies have shown that a disk cache on
    the order of 2-4 megabytes captures 90 of the
    read traffic for many kinds of applications
  • your mileage will definitely vary
  • but the impact can be enormous
  • 90 hit rate
  • hit time of .1 ms
  • miss time of 10ms
  • average access time
  • (.9 .1) (.1 10) 1.09 ms
  • No cache increases disk access time by almost
    1000.

90
H I T R a t e
a reasonable operating range.
50
1MB 2MB 4MB 8MB 16MB
46
The Buffer Cache
  • The buffer cache has only a finite number of
    blocks in it.
  • On a cache miss, one block must be discarded in
    favor of the fresh block that is being brought
    in.
  • Typical systems operate in an LRU order
  • the least recently used block is the one that
    should be discarded next.
  • favors busier portions of the filesystem
  • can hurt the quiet client.
  • Some workloads LRU is really bad for
  • sequential scans
  • video, audio
  • random access
  • large database

47
Read Ahead
  • Many file systems will implement read ahead
    whereby the file system will try to predict what
    the application is going to need next, go to
    disk, and read it in.
  • The goal is to beat the application to the punch.
  • For sequentially accessed files, this can be a
    big win.
  • as long as reads are spaced in time, the OS can
    schedule the next IO during the current gap.
  • enabling read ahead can give applications a 100
    speedup.
  • suppose that it takes 10ms to read a block.
  • the application requests the next block in
    sequence every 10 ms.
  • with read ahead, wait time is 0 ms per block and
    execution time is
  • 10 number of blocks read.
  • without read ahead, wait time is 20 ms per block
    and execution time is
  • 20 number of blocks read.

48
Caching works for reads, what about writes?
  • On write, it is necessary to ensure that the data
    makes it through the buffer cache and onto the
    disk.
  • Consequently, writes, even with caching, can be
    slow.
  • Systems do several things to compensate for this
  • write-behind
  • maintain a queue of uncommitted blocks
  • periodically flush the queue to disk
  • unreliable
  • battery backed up RAM
  • as with write-behind, but maintain the queue in
    battery backed up memory
  • expensive
  • log structured filed system
  • always write the next block on disk the one past
    where the last block was written
  • complicated

49
? ???
  • RAM?? ???? ?????? ??
  • ??? ??? ??? ?? ??? ?? ??? ???? ????? ??, ?? ?? ??
    ?? ??? ??? ????
  • ??? ??? ??
  • ??
  • ??
  • ???? volatile

50
RAM Disk
  • Dedicate a large chunk of memory to act as a file
    system.
  • Note that most disks now have a small amount of
    built in RAM already on them.
  • Extremely simple and at times effective.
  • Not so good for reliability
  • used to maintain temporary, or expendable
    files.
  • Considering hit rates of caches, not clear that
    this is a great win.
  • FLASH RAM is one kind of RAM disk that does not
    have a problem with power outage.
  • faster than disk, slower than memory
  • 10K writes, and you throw it away.

51
? ???
  • ??? ?? ??
  • ?? ??? ??? ?? ?? ?? ??? ??(WORM)
  • ??? ?? ??? ??? ???? ??
  • ??? ???? ??
  • ?? ???? ?? ? ???? 1021 ?? ??? ??

52
CD-ROMS, WORMS ? ??-??? ???
  • ??? ?(600MB)
  • ??? ?? ??? ??? ??
  • ??? ???? ??
  • CD-ROM ? ??? ?? ??? ??
  • ??? ??? ??? ???? ?? ??
  • WORM? ??
  • ?? ?? ? ?? ????? ?? ?
  • local seek? ?? ????? ???? ?? ???? ????? ?? ??.

53
?? ?? ??
  • ISAM ? ????? ?? ??? ?? ?? ??
  • ??? ??? ???? ???? ?? ?? ? ??(seek) ??
  • master index
  • cylinder index
  • ?? ???

54
??? ??
  • Delayed write write? ??? ??(??)? ??
  • sync system call ?? ??? ???? ???? ??

55
?? ?? ?? ??
  • ???? ???(fragmentation)?
  • ?? OS? ??? ??? ???? ??
  • ?? ??? ????? ????? ???
  • ?? ????? ???? ?? ????? ???? ?? ??
  • ?? ??? ?? ???? ???? ?? ??? ??(read-only? ??)
  • ?? ??? ????? ?? ???? ???? ?? ?? ????? ???? ??? ??

56
?? ?? ?? ??
  • ??? ??? ?? ? ???? ?? ???? ???? ???? ???? ?? ??
  • ???? ????? ???? ??
  • ?? ??? ?? ?? ??? ?? ??? ??
  • ??? ?? ?? ??
  • ????, latency ??, ???? ??
  • ??? ?? ??

57
Disk Management
  • Low-level formatting, or physical formatting
    Dividing a disk into sectors that the disk
    controller can read and write.
  • To use a disk to hold files, the operating system
    still needs to record its own data structures on
    the disk.
  • Partition the disk into one or more groups of
    cylinders.
  • Logical formatting or making a file system.
  • Boot block initializes system.
  • The bootstrap is stored in ROM.
  • Bootstrap loader program.
  • Methods such as sector sparing used to handle bad
    blocks.

58
Booting from a Disk in Windows 2000
59
Swap-Space Management
  • Swap-space Virtual memory uses disk space as an
    extension of main memory.
  • Swap-space can be carved out of the normal file
    system,or, more commonly, it can be in a separate
    disk partition.
  • Swap-space management
  • 4.3BSD allocates swap space when process starts
    holds text segment (the program) and data
    segment.
  • Kernel uses swap maps to track swap-space use.
  • Solaris 2 allocates swap space only when a page
    is forced out of physical memory, not when the
    virtual memory page is first created.

60
Data Structures for Swapping on Linux Systems
61
RAID
  • Caching, RAM disks deal with the latency issue.
  • DISKS can also be used in PARALLEL
  • This is the idea behind RAIDs
  • Redundant Array of Inexpensive Disks
  • Many RAID levels (Raid0-5)

Data bits
0
But we have an increased reliability problem. If
any one disk fails, all 8 are effectively useless.
1
0
1
1
1
0
1
Parity bits
A redundant array of inexpensive disks.
An array of inexpensive disks (Can read 8 tracks
at once)
62
RAID (cont)
  • Several improvements in disk-use techniques
    involve the use of multiple disks working
    cooperatively.
  • Disk striping uses a group of disks as one
    storage unit.
  • RAID schemes improve performance and improve the
    reliability of the storage system by storing
    redundant data.
  • Mirroring or shadowing keeps duplicate of each
    disk.
  • Block interleaved parity uses much less
    redundancy.

63
Different RAID levels
  • Raid 0 Striping
  • reduce disk queue length, good for random access.
    no reliability
  • Raid 1 Mirroring
  • write data to both disks, expensive
  • Raid 2 ECC
  • stripe at bit level, multiple parity bits to
    determine failed bit. expensive (eg, 10 data
    disks require 4 ECC disks), read/write 1 bit,
    means read/write all in a parity stripe!
  • Raid 3 PARITY only.
  • disks say they break. Only need to reconstruct.
    Byte stripe. Single parity drive. All disks
    involved in a single read. Bottleneck writes.
  • Raid 4 PARITY w/larger stripe size
  • can do multiple reads in parallel. Single parity
    drive. Bottleneck writes.
  • Raid 5 Floating parity
  • assign parity bits for different stripes to
    different disks. Still have write bottleneck, but
    distributed. One write requires a read/write.

64
RAID Levels
65
Data mapping for RAID Level 0 Array
Physical Disk 0
Physical Disk 1
Physical Disk 2
Physical Disk 3
strip 0
strip 1
strip 2
strip 3
strip 4
strip 5
strip 6
strip 7
strip 8
strip 9
strip 10
strip11
strip 12
strip 13
strip 14
strip 15
66
RAID Level 0 Array
  • ??? ??? ?? ?? ??? ?? ??? ???? ?? ????? ???? ???
  • ?? ???? ?? ?? ?? ??? ??? ?? ???? I/O? ??? ? ??

67
RAID 1 (mirrored)
68
RAID 1 (mirrored)
  • ?? ???? ?? ???
  • ? ?? ??? ?? ?? ??? ??
  • ??? ???? ??
  • ?? ??? ??? ??? ?? ??
  • ?? ? ???? ?? ???? ??? ? ?? ??? ??
  • OLTP(On Line Transaction System)? ??

69
RAID 2 (redundancy through Hamming code)
f2(b)
f1(b)
f0(b)
b2
b1
b0
b2
(7, 4) system 7 number of total data
bits(includes parity bits) 4 number of actual
data bits(excludes parity bits) (c, d), p c-d ?
? d p 1 lt 2p ???? ?
70
RAID 2 (redundancy through Hamming code)
  • ???? ?? ??? ???? ? ? Hamming code ??
  • ? ?? ??? ?? ??
  • ?? ??? ?? ?? ??
  • ?? ?? ??? ?? ?? ??? ??

71
RAID 3 (byte-interleaved parity)
P(b)
b2
b1
b0
b2
72
RAID 3 (byte-interleaved parity)
  • ??? ??? ???? 1?? ?? parity disk
  • ??? ???? ?? ??? ?? ??? ?? ??
  • ??/??? ??? ? ????? ?? ??? ??? ??
  • ?? ??? ??? ? ????? ??? ??

73
RAID 4 (block-level parity)
block 0
block 1
block 2
block 3
P(0-3)
block 4
block 5
block 6
block 7
P(4-7)
block 9
block 10
block 11
block 8
P(8-11)
block 13
block 15
block 12
block 14
P(12-15)
74
RAID 4 (block-level parity)
  • RAID 3? ?? ??? ???? ?? ????? ??? ???
  • ?? ??? ???? 1?? ?? parity disk
  • ?? ? ? ?? ??? ??? ??

75
RAID 5 (block-level distributed parity)
block 0
block 1
block 2
block 3
P(0-3)
block 5
block 4
block 6
P(4-7)
block 7
block 9
block 10
block 11
P(8-11)
block 8
block 12
P(12-15)
block 13
block 14
block 15
P(16-19)
block 16
block 17
block 18
block 19
76
RAID 5 (block-level distributed parity)
  • RAID 4?? ??? ???? ??? ?
  • ???? ? ???? ??

77
  • RAID 6
  • ??? ???? ??? ?? ???? ???? ???? ???? RAID ??
  • ???? ???? ??? ?? 2??? ???? ??
  • ? ?? ???? ?? Orthogonal ?? ??? ? ?? ???? ?? ????
    ??? ?? ??

78
RAID (0 1) and (1 0)
79
RAID (0 1) and (1 0)
80
Why is RAID 10 better than RAID 01?
  • RAID 01 configuration where multiple disks are
    striped together into sets (sets A B in the
    diagram, each set being as large as the resulting
    final volume), and then two or more sets are
    mirrored together.
  • RAID 10 configuration where two or more drives
    are mirrored together (mirrors 1-4 in the
    diagram), and then the mirrors (as many as are
    needed to result in the desired amount of space)
    are striped together.
  • In either case (01 or 10), the loss of a single
    drive does not result in failure of the RAID
    system.
  • The difference comes in the chance that the loss
    of a second drive from the system will result in
    the failure of the whole system.
  • In RAID 01, you have to lose one drive from each
    disk set (one drive from set A and one drive from
    set B) to result in the failure of the whole
    system..
  • In RAID 10, you have to lose all drives in a
    mirror. This would be both drives in any numbered
    pair in the diagram.

81
Why is RAID 10 better than RAID 01?
  • Mathematically, the difference is that the chance
    of system failure with two drive failures in a
    RAID 01 system with two sets of drives is (n/2 -
    1)/(n - 1) where n is the total number of drives
    in the system.
  • The chance of system failure in a RAID 10 system
    with two drives per mirror is 1/(n - 1).
  • So, using the 8 drive systems shown in the
    diagrams, the chance that losing a second drive
    would bring down the RAID system is 3/7 with a
    RAID 01 system and 1/7 with a RAID 10 system.
  • The math gets more complicated when you have more
    than two elements to a mirror.

82
Why is RAID 10 better than RAID 01?
  • Another difference between the two RAID
    configurations is performance when the system is
    in a degraded state, i.e. after it has lost one
    or more drives but has not lost the right
    combination of drives to completely fail.
  • In a RAID 01 configuration, the loss of any
    drive in a set causes the failure of that entire
    set and the set is removed from the RAID system.
    Generally (in the two set case) this means you
    are left with a RAID 0 system made up of the
    remaining set of disks. This probably slightly
    improves write performance and slightly degrades
    read performance.
  • In a RAID 10 system, you would see the same
    effect on each mirror that loses a drive, but not
    the whole system. In other words, a RAID 10
    configuration will tend to show similar, but less
    dramatic, changes in performance when in a
    degraded mode than RAID 01. However, the changes
    will likely be slight in any case.
  • One more difference is the speed at which the
    RAID system recovers once the failed disk is
    replaced.
  • RAID 10 only has to re-mirror one drive,
  • whereas RAID 01 has to re-mirror the entire
    failed set. So RAID 10 will recover
    significantly faster.

83
Stable-Storage Implementation
  • Write-ahead log scheme requires stable storage.
  • To implement stable storage
  • Replicate information on more than one
    nonvolatile storage media with independent
    failure modes.
  • Update information in a controlled manner to
    ensure that we can recover the stable data after
    any failure during data transfer or recovery.

84
Tertiary Storage Devices
  • Low cost is the defining characteristic of
    tertiary storage.
  • Generally, tertiary storage is built using
    removable media
  • Common examples of removable media are floppy
    disks and CD-ROMs other types are available.

85
Removable Disks
  • Floppy disk thin flexible disk coated with
    magnetic material, enclosed in a protective
    plastic case.
  • Most floppies hold about 1 MB similar technology
    is used for removable disks that hold more than 1
    GB.
  • Removable magnetic disks can be nearly as fast as
    hard disks, but they are at a greater risk of
    damage from exposure.

86
Removable Disks (Cont.)
  • A magneto-optic disk records data on a rigid
    platter coated with magnetic material.
  • Laser heat is used to amplify a large, weak
    magnetic field to record a bit.
  • Laser light is also used to read data (Kerr
    effect).
  • The magneto-optic head flies much farther from
    the disk surface than a magnetic disk head, and
    the magnetic material is covered with a
    protective layer of plastic or glass resistant
    to head crashes.
  • Optical disks do not use magnetism they employ
    special materials that are altered by laser light.

87
WORM Disks
  • The data on read-write disks can be modified over
    and over.
  • WORM (Write Once, Read Many Times) disks can be
    written only once.
  • Thin aluminum film sandwiched between two glass
    or plastic platters.
  • To write a bit, the drive uses a laser light to
    burn a small hole through the aluminum
    information can be destroyed by not altered.
  • Very durable and reliable.
  • Read Only disks, such ad CD-ROM and DVD, com from
    the factory with the data pre-recorded.

88
Tapes
  • Compared to a disk, a tape is less expensive and
    holds more data, but random access is much
    slower.
  • Tape is an economical medium for purposes that do
    not require fast random access, e.g., backup
    copies of disk data, holding huge volumes of
    data.
  • Large tape installations typically use robotic
    tape changers that move tapes between tape drives
    and storage slots in a tape library.
  • stacker library that holds a few tapes
  • silo library that holds thousands of tapes
  • A disk-resident file can be archived to tape for
    low cost storage the computer can stage it back
    into disk storage for active use.

89
Operating System Issues
  • Major OS jobs are to manage physical devices and
    to present a virtual machine abstraction to
    applications
  • For hard disks, the OS provides two abstraction
  • Raw device an array of data blocks.
  • File system the OS queues and schedules the
    interleaved requests from several applications.

90
Application Interface
  • Most OSs handle removable disks almost exactly
    like fixed disks a new cartridge is formatted
    and an empty file system is generated on the
    disk.
  • Tapes are presented as a raw storage medium,
    i.e., and application does not not open a file on
    the tape, it opens the whole tape drive as a raw
    device.
  • Usually the tape drive is reserved for the
    exclusive use of that application.
  • Since the OS does not provide file system
    services, the application must decide how to use
    the array of blocks.
  • Since every application makes up its own rules
    for how to organize a tape, a tape full of data
    can generally only be used by the program that
    created it.

91
Tape Drives
  • The basic operations for a tape drive differ from
    those of a disk drive.
  • locate positions the tape to a specific logical
    block, not an entire track (corresponds to seek).
  • The read position operation returns the logical
    block number where the tape head is.
  • The space operation enables relative motion.
  • Tape drives are append-only devices updating a
    block in the middle of the tape also effectively
    erases everything beyond that block.
  • An EOT mark is placed after a block that is
    written.

92
File Naming
  • The issue of naming files on removable media is
    especially difficult when we want to write data
    on a removable cartridge on one computer, and
    then use the cartridge in another computer.
  • Contemporary OSs generally leave the name space
    problem unsolved for removable media, and depend
    on applications and users to figure out how to
    access and interpret the data.
  • Some kinds of removable media (e.g., CDs) are so
    well standardized that all computers use them the
    same way.

93
Hierarchical Storage Management (HSM)
  • A hierarchical storage system extends the storage
    hierarchy beyond primary memory and secondary
    storage to incorporate tertiary storage usually
    implemented as a jukebox of tapes or removable
    disks.
  • Usually incorporate tertiary storage by extending
    the file system.
  • Small and frequently used files remain on disk.
  • Large, old, inactive files are archived to the
    jukebox.
  • HSM is usually found in supercomputing centers
    and other large installations that have enormous
    volumes of data.

94
Speed
  • Two aspects of speed in tertiary storage are
    bandwidth and latency.
  • Bandwidth is measured in bytes per second.
  • Sustained bandwidth average data rate during a
    large transfer of bytes/transfer time.Data
    rate when the data stream is actually flowing.
  • Effective bandwidth average over the entire I/O
    time, including seek or locate, and cartridge
    switching.Drives overall data rate.

95
Speed (Cont.)
  • Access latency amount of time needed to locate
    data.
  • Access time for a disk move the arm to the
    selected cylinder and wait for the rotational
    latency lt 35 milliseconds.
  • Access on tape requires winding the tape reels
    until the selected block reaches the tape head
    tens or hundreds of seconds.
  • Generally say that random access within a tape
    cartridge is about a thousand times slower than
    random access on disk.
  • The low cost of tertiary storage is a result of
    having many cheap cartridges share a few
    expensive drives.
  • A removable library is best devoted to the
    storage of infrequently used data, because the
    library can only satisfy a relatively small
    number of I/O requests per hour.

96
Reliability
  • A fixed disk drive is likely to be more reliable
    than a removable disk or tape drive.
  • An optical cartridge is likely to be more
    reliable than a magnetic disk or tape.
  • A head crash in a fixed hard disk generally
    destroys the data, whereas the failure of a tape
    drive or optical disk drive often leaves the data
    cartridge unharmed.

97
Cost
  • Main memory is much more expensive than disk
    storage
  • The cost per megabyte of hard disk storage is
    competitive with magnetic tape if only one tape
    is used per drive.
  • The cheapest tape drives and the cheapest disk
    drives have had about the same storage capacity
    over the years.
  • Tertiary storage gives a cost savings only when
    the number of cartridges is considerably larger
    than the number of drives.

98
Price per Megabyte of DRAM, From 1981 to 2004
99
Price per Megabyte of Magnetic Hard Disk, From
1981 to 2004
100
Price per Megabyte of a Tape Drive, From 1984-2000
101
End of Chapter 14
Write a Comment
User Comments (0)
About PowerShow.com