lecture09.ppt

1,141 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,141
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
31
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • 1
  • 2
  • 4
  • 4
  • 12
  • 8
  • 9
  • 13
  • 15
  • 16
  • 17
  • 18
  • 26
  • 28
  • 30
  • lecture09.ppt

    1. 1. Multimedia Storage Chapter 8
    2. 2. Magnetic Media <ul><li>Magnetic disks are: </li></ul><ul><li>Suitable for dynamic data that requires frequent changes. </li></ul><ul><li>Good access time and high transfer rate. </li></ul><ul><li>Used for data that must be kept online during data capturing and processing. </li></ul><ul><li>Suitable for video-on-demand applications where large amounts of time dependent information must be transferred at high bit rates. </li></ul>
    3. 3. RAID <ul><li>Redundant Arrays of Inexpensive Disks . (developed at UC Berkeley in 1987) </li></ul><ul><li>Use parallelism between multiple disks to improve aggregate I/O performance </li></ul><ul><li>Something like parallelism from multiple CPUs </li></ul><ul><li>Data is distributed across several physical disks </li></ul><ul><li>As an alternative to single large expensive disk (SLED) in traditional mainframe systems </li></ul><ul><li>Several levels of RAID, seeking to optimize among </li></ul><ul><ul><li>Performance </li></ul></ul><ul><ul><li>Availability </li></ul></ul><ul><ul><li>Cost </li></ul></ul>
    4. 4. RAID (2) <ul><li>Advantages: </li></ul><ul><ul><li>high data transfer rate for large data accesses. </li></ul></ul><ul><ul><li>high I/O rates (short queuing time) on small data accesses. </li></ul></ul><ul><ul><li>uniform load balancing across all of the disks. </li></ul></ul><ul><li>Disadvantages: </li></ul><ul><ul><li>Large disk arrays are highly vulnerable to disk failures => Need to add redundancy for better availability => write overhead! </li></ul></ul>
    5. 5. Data Striping <ul><li>distribute data transparently over multiple disks to make them appear as a single, fast, large disk. </li></ul><ul><li>multiple I/Os can be served in parallel => better performance </li></ul><ul><ul><li>parallel independent requests => shorter queuing time </li></ul></ul><ul><ul><li>parallel accesses of a single request => higher transfer rate </li></ul></ul>
    6. 6. Data Striping (2) <ul><li>granularity of data interleaving: </li></ul><ul><ul><li>fine: distributes the data so that all of the array’s disks cooperate in servicing every request => high I/O transfer rate. Typical stripe size = 1 bit / 1 byte / 512 bytes. </li></ul></ul><ul><ul><li>1 bit stripe size speed up every single disk access </li></ul></ul><ul><ul><li>512 bytes stripe size sometimes may not have any sped up e.g small disk access of 100 bytes. So the disk access time is still bounded by the slowest disk in the group. </li></ul></ul>
    7. 7. Redundancy <ul><li>redundancy is needed to tolerate disk failures </li></ul><ul><li>data and parity distribution </li></ul><ul><ul><li>how redundant information is computed? </li></ul></ul><ul><ul><li>where shall the redundant information reside? </li></ul></ul><ul><li>Hamming error correction </li></ul><ul><li>XOR </li></ul>
    8. 8. RAID: Level 0 ( Nonredundant ) <ul><li>Data striping only. </li></ul><ul><li>Stripe size: segment e.g. 512 bytes </li></ul><ul><li>No data protection redundancy. </li></ul><ul><li>No need to write redundant information => best write performance. </li></ul><ul><li>Read performance ok. </li></ul><ul><li>Any disk failure => data loss. </li></ul><ul><li>Used in supercomputing environments where performance and capacity, rather than reliability, are the primary concerns. </li></ul>
    9. 9. RAID: Level 1 ( Disk Mirroring ) <ul><li>Use twice as many disks as level 0. </li></ul><ul><li>Data is duplicated, called mirroring, or shadowing. </li></ul><ul><li>Read is faster, but write is slightly slower (why?) </li></ul><ul><li>If a disk fails, its mirror copy can still serve. </li></ul><ul><li>Used in database application where availability and transaction rate are more important than storage efficiency. </li></ul>redundant data (mirror) Controller channel channel
    10. 10. RAID 1 (2) <ul><li>Compare the following 3 RAID-1 configurations. </li></ul>3a 3b 3c 2a 1c 2b 0a 2c 0b 1a 0c 1b 0 1 0 1 2 3 2 3 0 1 2 3 3 0 1 2 Simple Shadowing Declustering Chained Declustering 0 1 2 3
    11. 11. RAID: Level 2 ( Error Correction ) <ul><li>Uses Hamming code </li></ul><ul><li>Bit interleaving (bit-level data striping) </li></ul><ul><li>For n disks, about log(n) of them store redundant data. (More space efficient than mirroring). </li></ul><ul><li>If a disk fails, multiple redundant disks need to be read to identify the bad one. However, only one redundant disk needs be read to recover the lost data. </li></ul><ul><li>No practical use. </li></ul>
    12. 12. A Hamming Code Example <ul><li>Suppose we want to encode 4 bit information </li></ul><ul><li>We distribute the bit at the following four red locations x 1 x 2 x 3 x 4 x 5 x 6 x 7 </li></ul><ul><li>The blue bits are redundant bits for error detection and correction. </li></ul><ul><li>Next, we calculate the following 3 equations to find x 1 , x 2 , x 4 </li></ul><ul><li>This code can detect and correct 1 bit error </li></ul>
    13. 13. A Hamming Code Example (2) <ul><li>Example encoding: </li></ul>
    14. 14. A Hamming Code Example (3) <ul><li>Suppose there is 1 bit error at x 6 </li></ul><ul><li>e.g. original: 0 1 0 0 1 0 1 received: 0 1 0 0 1 1 1 </li></ul><ul><li>To detect and correct error we calculate </li></ul><ul><li>Notation r is used to indicate it is the current data which contains error. </li></ul><ul><li>Obviously, if all b are 0, there is no error, otherwise, there is error </li></ul><ul><li>Believe or not, the error must be located at position b 2 b 1 b 0 </li></ul>e.g.
    15. 15. RAID: Level 3 ( Bit-Interleaved Parity ) <ul><li>Hamming code can detect 1 bit error, but require 3 redundant bits to tell which bit is wrong. </li></ul><ul><li>However, useless in disk application, because we always know which disk fails. </li></ul><ul><li>If 1-bit recovery is needed, simple XOR parity is enough. </li></ul><ul><li>Bit-interleaving. </li></ul>
    16. 16. RAID: Level 4 ( Block-Interleaved Parity ) <ul><li>Note that a single parity disk is enough to recover data lost due to single disk failure. </li></ul><ul><li>Block level interleaving </li></ul><ul><li>Small read => access one data disk; large read => access many data disks; small write => 4 I/O (read the data disk, compute the difference between the old and new images, update the data disk, update the parity disk; </li></ul><ul><li>Read is fast. How about write? </li></ul><ul><li>If one disk is dedicated for parity, bottleneck at parity disk due to writing. </li></ul><ul><li>Easy to implement, high transfer rate. </li></ul>
    17. 17. Enhancing RAID-4 <ul><li>Problems with RAID-4? </li></ul>B D A C B D A C B D A C B D A C Bp Dp Ap Cp Parity Disk B D A C B Dp A C B D A Cp Bp D A C B D Ap C Striped Parity B E A Dp Bp F A C C F A Ep B F Ap D Cp E B D D Fp C E Declustered Parity
    18. 18. Distributing Parity <ul><li>Parity disk </li></ul><ul><ul><li>simplify the mapping of logical addresses to disk addresses. </li></ul></ul><ul><ul><li>every write must update the associated bits on the single parity disk. (Fine for fine-grained data striping, bad for coarse.) </li></ul></ul><ul><li>Striped parity </li></ul><ul><ul><li>can perform parallel parity update </li></ul></ul><ul><li>Declustered parity </li></ul><ul><ul><li>logically equivalent to combining several smaller arrays protected by striped parity into a large one. </li></ul></ul>
    19. 19. RAID: Level 5 ( Block-Interleaved Distributed-Parity ) <ul><li>Eliminates the parity disk bottleneck by distributing the parity uniformly over all of the disks. </li></ul><ul><li>Improves read performance by allowing all disks be used to serve read requests. </li></ul><ul><li>Best for small reads, large reads, large writes. </li></ul>
    20. 20. RAID: Level 6 ( P+Q Redundancy ) <ul><li>Uses 2 redundant disks to protect up to two disk failures. </li></ul><ul><li>Compute 2 different parities instead of 1. </li></ul><ul><li>Similar read performance as with Level 5, but write is slightly worse </li></ul>
    21. 21. Optical Media <ul><li>Well accepted because: </li></ul><ul><ul><li>High storage capacity </li></ul></ul><ul><ul><li>Random access to data </li></ul></ul><ul><ul><li>Life span of more than 30 years (c.f. << 20 years for magnetic media) </li></ul></ul><ul><ul><li>Removable and portable </li></ul></ul>
    22. 22. History of Optical Media <ul><li>Optical videodisk was invented by Friebus in 1929. Prototype using laser to record and read was demonstrated by Phillips and MCA in 1972. </li></ul><ul><li>Videodisks developed by Philips has been commercially available since 1978. </li></ul><ul><li>Then compact disk technology for digital audio (CD-DA) came out in early 1980s. </li></ul><ul><li>The use of optical disks for digital data storage came with the introduction and improvement of CD-ROM during the 1980s. </li></ul>
    23. 23. <ul><li>Optical storage media use the intensity of reflected laser light as an information source. </li></ul>Optical Disk Technology
    24. 24. <ul><li>An optical disk consists of 3 layers: </li></ul><ul><ul><li>Protective layer (only 0.002mm thick on the label side). </li></ul></ul><ul><ul><li>Reflective layer (aluminum coating). </li></ul></ul><ul><ul><li>Substrate layer (transparent). </li></ul></ul>Optical Disk Technology (2) <ul><li>In the factory, depressions are cut on the disk surface, forming “lands” and “pits” (0.12um different in heights). </li></ul>
    25. 25. Optical Disk Technology (3) <ul><li>Simple thresholding yields the H and L readback. </li></ul><ul><li>Do you know: </li></ul><ul><ul><li>that data are read from the disk “inside-out?” </li></ul></ul><ul><ul><li>that a CD should be cleaned radially? </li></ul></ul>
    26. 26. Advantages of Optical Media <ul><li>Continuous data stream . Data stored in spiral or concentric tracks. For the spiral track storage, data can be easily played back in a continuous data stream. </li></ul><ul><li>High density . Distance between tracks is 1.6um, each track is 0.6um wide, i.e., 1 bit per sq.um or 1Mb per sq.mm. Floppy disk has 96 tracks per inch, optical disk has 16000 tracks per inch. </li></ul><ul><li>Long life . Magnetization can decrease over time. ‘Lands’ and ‘pits’ not changed unless physically damaged. </li></ul><ul><li>Low wearing . Laser source in head can be positioned at 1mm from disk surface. Does not have to be as close to the surface as with magnetic disks. It reduces friction and increases life span. </li></ul>
    27. 27. Digital Optical Disks <ul><li>Audio CD was developed by Philips and Sony in 1982. </li></ul><ul><li>Basic technology extended to 550 MB CD-ROM in 1985. </li></ul><ul><li>When used for multimedia, storage capacity is inadequate for motion video, and data rate limited to 1.5Mbps. </li></ul><ul><li>CD-ROM/XA and CD-I announced in 1986 and 87 to support applications of text, images, audio and FSFM video. </li></ul><ul><li>Recent developments include WORM (write once read many), MO (magneto optical), CD Recordable disks, and DVD . </li></ul>
    28. 28. Digital Optical Disk (2) <ul><li>Why CD is slower than hard disk? </li></ul><ul><li>CD is originally designed for squeezing as much music data into the disk as possible. The density of data is same in inner and outer tracks. => The disk has to rotate slower when reading the outer track => Variable speed is slow to adjust for random access (as in computer-based multimedia application) </li></ul><ul><li>Optical disk head is heavier than magnetic heads. More inertia takes longer seek time for head movements. </li></ul>
    29. 29. Uses of Optical Disks
    30. 30. CD-DA (Compact Disk Digital Audio) <ul><li>1982 by Philips and Sony. </li></ul><ul><li>12cm diameter, 1.2 mm thick optical disk, stores/plays in CLV. Spiral tracks of about 20,000 windings in total. </li></ul><ul><li>Data are recorded such that pit-to-land and land-to-pit transitions are coding ‘1’s. ‘0’s are coded as no transition. </li></ul><ul><li>Pits and lands are not directly used to represent digital information. How can you represent “11”? </li></ul><ul><li>Redundancy added to break up consecutive ‘1’s and ‘0’s. </li></ul>
    31. 31. CD-DA <ul><li>Data rate: 44.1KHz sampling, 16-bit quantization, 175KBytes/sec. </li></ul><ul><li>Capacity: 747MB, up to 74 min high-quality sound. </li></ul><ul><li>Capability of random access to tracks and index points. </li></ul><ul><li>Error rate: as low as 10^(-8). However, still not low enough for computer data. </li></ul>
    32. 32. 8 to 14 Modulation (EFM) <ul><li>Pits and lands may not follow too closely one after another on a CD-DA. Rule 1: between any 2 ‘1’s, there are at least 2 ‘0’s. </li></ul><ul><li>For synchronization, pit or land sequences are not allowed to be too long. Rule 2: at most 10 ‘0’s can follow one after another. </li></ul><ul><li>Solution: Map every 8 bit pattern into a 14 bit pattern that satisfies the 2 rules. Among the 2^14 patterns, 267 of them are valid => just fit. Also, between consecutive 14-bit sequences, 3 merging bits are added to enforce the rules. </li></ul>
    33. 33. 8 to 14 Modulation (Example)
    34. 34. Low Level Data Encoding <ul><li>Thus, an eight-bit byte of actual data is encoded into a total of 17 channel bits . </li></ul><ul><li>For synchronization and error correction, every 24 bytes of data is packaged into a frame : </li></ul><ul><ul><ul><li>sync pattern (24 + 3 bits) </li></ul></ul></ul><ul><ul><ul><li>control byte (17 bits) </li></ul></ul></ul><ul><ul><ul><li>12 data bytes (12 * 17 bits) </li></ul></ul></ul><ul><ul><ul><li>4 error correction bytes (4 * 17 bits) </li></ul></ul></ul><ul><ul><ul><li>12 data bytes (12 * 17 bits) </li></ul></ul></ul><ul><ul><ul><li>4 error correction bytes (4 * 17 bits) </li></ul></ul></ul><ul><ul><ul><li>Total: 588 channel bits for 192 actual data bits. </li></ul></ul></ul>
    35. 35. First Level Error Correction <ul><li>Cross Interleave Reed-Solomon Coding. </li></ul><ul><li>Recall that each frame contains 24 data bytes and 8 error correction bytes. </li></ul><ul><li>The first 4 correction bytes cover the frame’s data. The other 4 correction bytes cover data over 7 frames. </li></ul><ul><li>When a frame is read, the first 4 correction bytes are checked. If not ok, the decoder decodes the data bytes after subsequent correction codes are read. </li></ul><ul><li>7 frames = 7.7 mm track length. Try radially scratch your CD with a cutter and see if it still works. </li></ul>
    36. 36. CD-ROM (Compact Disk Read Only) <ul><li>1985 by Philips and Sony. </li></ul><ul><li>Tracks are divided into audio and data types. Disk containing both types are called Mixed Mode Disk . </li></ul><ul><li>It operates in 2 modes: mode 1 is for computer data, and mode 2 is for media data. </li></ul><ul><li>Mode 1 </li></ul><ul><ul><li>Error rate requires better than 10^(-8) for computer data. Mode 1 achieves 10^(-12) error rate by using a second level error correction.. </li></ul></ul>Sync 12 User Data 2048 Blanks 8 ECC 276 Header 4 EDC 4 2352 bytes
    37. 37. <ul><ul><li>Random access to subtrack units called blocks (2352 bytes). (For CD-DA, random access is on track level only.) </li></ul></ul><ul><ul><li>Mode 1 for computer data. A capacity of 333,000 blocks to be played in 74 min, i.e. 660MB storage with data rate of 150KBps. Each block consists of 32 frames (@588 bits each). </li></ul></ul><ul><li>Mode 2 </li></ul><ul><ul><li>Mode 2 holds data of any media. </li></ul></ul><ul><ul><li>Additional error correction not crucial, so not used. </li></ul></ul><ul><ul><li>Disk has capacity of 750MB and a data rate of 175KBps. </li></ul></ul>CD-ROM (2) Sync 12 User Data 2336 Header 4 2352 bytes
    38. 38. CD-ROM (3) <ul><li>CD-ROM is a very economic medium for publication and distribution. </li></ul><ul><li>Limitations of CD-ROM: </li></ul><ul><ul><li>Random access to a CD track can be anywhere from 200ms up to 1 sec in access time. </li></ul></ul><ul><ul><li>Continuous media stored sequentially in CD-ROM tracks. Although important for multimedia applications, simultaneous playback of audio and other data is not possible. </li></ul></ul>
    39. 39. CD-ROM/XA (Extended Architecture) <ul><li>1989, established by Microsoft, Philips and Sony. </li></ul><ul><li>Based on CD-ROM and CD-I. </li></ul><ul><li>Goal: concurrent output of several media. Within 1 track, blocks of different media can be stored. It allows interleaved storage and retrieval of multimedia data. </li></ul><ul><li>A sub-header is added to each block to describe the block. </li></ul><ul><li>CD-ROM/XA uses CD-ROM mode 2 to define actual blocks. Two forms: </li></ul>
    40. 40. CD-ROM/XA (2) <ul><ul><li>Form 1 provides more error detection/correction at the expense of redundancy. 2048 bytes (of 2352) are for user data. Form 2 allows 13% more storage for user data, but at the expense of the error correction. </li></ul></ul>Sync 12 User Data 2324 Subheader 8 EDC 4 Header 4 2352 bytes Sync 12 User Data 2048 Subheader 8 ECC 276 Header 4 EDC 4 2352 bytes
    41. 41. CD-R (Compact Disk Recordable) <ul><li>CD-R allows tracks to be recorded once. </li></ul><ul><li>4 layers: protective, reflective, absorption, and substrate. </li></ul>Polycarbonate Lacquer Aluminum Polycarbonate Lacquer Dye Gold Traditional CD-ROM “ Molded” by stamper CD-R Media Burned by high power laser beam Don’t leave out in sunlight
    42. 42. CD-R(2) <ul><li>Land and pit reflections realized by irreversible thermal effect (above 250C) on the absorption layer. </li></ul><ul><li>Playable on CD players. </li></ul>
    43. 43. CD-R (3) <ul><li>Recording sessions </li></ul><ul><ul><li>A CD has 3 areas: lead-in, actual data, lead-out. </li></ul></ul><ul><ul><ul><li>Lead-in includes the table of contents: directory, indices to individual tracks. </li></ul></ul></ul><ul><ul><ul><li>Data area include all tracks where actual data is stored. </li></ul></ul></ul><ul><ul><ul><li>Lead-out marks the end of the data area. </li></ul></ul></ul><ul><ul><li>Multiple sessions of lead-in, data, lead-out can be written separately over time. </li></ul></ul><ul><ul><ul><li>During 1 write activity, all data for a session are written with their table of contents, after which the session can be played on any CD player. </li></ul></ul></ul>Information Information Lead-out Lead-in Lead-in Lead-out Session 1 Session 2 ...
    44. 44. CD-MO (Compact Disk Magneto Optical) <ul><li>Specification published by Philips and Sony in 1991. </li></ul><ul><li>Working principle is different from other CD technologies. (Incompatible with other CD formats.) </li></ul><ul><ul><li>Based on the polarization of light by magnetic field. </li></ul></ul><ul><ul><li>Disk surface is light reflecting magnetic substrate. </li></ul></ul><ul><ul><li>During writing, surface is heated to above 150C, and magnetic field polarizes individual dipoles. </li></ul></ul><ul><ul><li>During reading, surface is irradiated with a laser beam, polarization of laser light changed according to the magnetization. </li></ul></ul>
    45. 45. Digital Versatile Disk (DVD) <ul><li>Also called Digital Video Disk . </li></ul><ul><li>Capacity: 4.7 to 17 GB (25 CDs). </li></ul><ul><li>Q: Is it a good idea to replace VHS tapes by DVD disks in video rental stores? </li></ul><ul><li>Digital video can be stored and distributed more cheaply, also it allows interactivity. </li></ul><ul><li>Can be used to store up to 133 minutes (8-9 hrs for high capacity ones) of studio quality video and multi-channel surround-sound audio, or 30 hours of CD-quality audio. </li></ul>
    46. 46. DVD (2) <ul><li>DVD achieves a greater capacity by </li></ul><ul><ul><li>minimum pit length is reduced from 0.834 micron (CD) to 0.4 micron (DVD). </li></ul></ul><ul><ul><li>inter-track space is reduced from 1.6 micron (CD) to 0.74 micron (DVD). </li></ul></ul>
    47. 47. DVD (3) <ul><ul><li>To read the condensed pits, DVD uses a laser of shorter wavelength (635-650 nm; for CD it is 780 nm). </li></ul></ul><ul><ul><li>Reducing the pit size and track distance increases the disc’s capacity to 4.7GB. </li></ul></ul><ul><ul><li>Dual layering. A semireflective layer (3.8GB) on top of a fully reflective layer (4.7GB) => 8.5GB total. </li></ul></ul><ul><ul><li>Double side. Two substrates bonded back-to-back. Each side could have one layer or two layers => capacity ranges from 9.4GB to 17GB. </li></ul></ul>
    48. 48. Some DVD drives can also read CDs

    ×