1 Storage and Retrieval of Multimedia Data n Disks u Track: Each disk platter consists of a number of concentric tracks u Cylinder: The set of all track.

Slides:



Advertisements
Similar presentations
Disk Storage SystemsCSCE430/830 Disk Storage Systems CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng Zhu (U. Maine) Fall,
Advertisements

I/O Management and Disk Scheduling
Faculty of Information Technology Department of Computer Science Computer Organization Chapter 7 External Memory Mohammad Sharaf.
Magnetic Disk Magnetic disks are the foundation of external memory on virtually all computer systems. A disk is a circular platter constructed of.
CS 6560: Operating Systems Design
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Disks and RAID.
Continuous Media 1 Differs significantly from textual and numeric data because of two fundamental characteristics: –Real-time storage and retrieval –High.
Faculty of Information Technology Department of Computer Science Computer Organization and Assembly Language Chapter 6 External Memory.
OPERATING SYSTEMS CS3530 Summer 2014 OPERATING SYSTEMS CS3530 Summer 2014 Input/Output System Chapter 9.
Storage. The Memory Hierarchy fastest, but small under a microsecond, random access, perhaps 2Gb Typically magnetic disks, magneto­ optical (erasable),
Disk Access Model. Using Secondary Storage Effectively In most studies of algorithms, one assumes the “RAM model”: –Data is in main memory, –Access to.
Other Disk Details. 2 Disk Formatting After manufacturing disk has no information –Is stack of platters coated with magnetizable metal oxide Before use,
Lecture 17 I/O Optimization. Disk Organization Tracks: concentric rings around disk surface Sectors: arc of track, minimum unit of transfer Cylinder:
1 Chapter 6 Storage and Multimedia: The Facts and More.
Computer Organization and Architecture External Memory.
1 Storage Hierarchy Cache Main Memory Virtual Memory File System Tertiary Storage Programs DBMS Capacity & Cost Secondary Storage.
CS 333 Introduction to Operating Systems Class 16 – Secondary Storage Management Jonathan Walpole Computer Science Portland State University.
Disks CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Secondary Storage CSCI 444/544 Operating Systems Fall 2008.
CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.
Secondary Storage Management Hank Levy. 8/7/20152 Secondary Storage • Secondary Storage is usually: –anything outside of “primary memory” –storage that.
Operating Systems COMP 4850/CISG 5550 Disks, Part II Dr. James Money.
Introduction to Database Systems 1 The Storage Hierarchy and Magnetic Disks Storage Technology: Topic 1.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
Layers of a DBMS Query optimization Execution engine Files and access methods Buffer management Disk space management Query Processor Query execution plan.
MM File Management Karrie Karahlaios and Brian P. Bailey Spring 2007.
CS4432: Database Systems II Data Storage (Better Block Organization) 1.
Device Management. So far… We have covered CPU and memory management Computing is not interesting without I/Os Device management: the OS component that.
CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Storage Systems.
1 Recitation 8 Disk & File System. 2 Disk Scheduling Disks are at least four orders of magnitude slower than main memory –The performance of disk I/O.
L/O/G/O External Memory Chapter 3 (C) CS.216 Computer Architecture and Organization.
Lecture 11: DMBS Internals
Physical Storage and File Organization COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI.
Lecture 9 of Advanced Databases Storage and File Structure (Part II) Instructor: Mr.Ahmed Al Astal.
Topic: Disks – file system devices. Rotational Media Sector Track Cylinder Head Platter Arm Access time = seek time + rotational delay + transfer time.
Disk Structure Disk drives are addressed as large one- dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.
CE Operating Systems Lecture 20 Disk I/O. Overview of lecture In this lecture we will look at: Disk Structure Disk Scheduling Disk Management Swap-Space.
I/O Management and Disk Structure Introduction to Operating Systems: Module 14.
Disks Chapter 5 Thursday, April 5, Today’s Schedule Input/Output – Disks (Chapter 5.4)  Magnetic vs. Optical Disks  RAID levels and functions.
External Storage Primary Storage : Main Memory (RAM). Secondary Storage: Peripheral Devices –Disk Drives –Tape Drives Secondary storage is CHEAP. Secondary.
2.1 Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General.
CPSC 404, Laks V.S. Lakshmanan1 External Sorting Chapter 13: Ramakrishnan & Gherke and Chapter 2.3: Garcia-Molina et al.
11.1Database System Concepts. 11.2Database System Concepts Now Something Different 1st part of the course: Application Oriented 2nd part of the course:
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
File Structures. 2 Chapter - Objectives Disk Storage Devices Files of Records Operations on Files Unordered Files Ordered Files Hashed Files Dynamic and.
Auxiliary Memory Magnetic Disk:
DMBS Internals I February 24 th, What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the.
Device Management Mark Stanovich Operating Systems COP 4610.
Chapter 9 I/O System. 2 Input/Output System I/O Major objectives are: Take an application I/O request and send it to the physical device. Then, take whatever.
CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara Nahrstedt Spring 2009.
COSC 6340: Disks 1 Disks and Files DBMS stores information on (“hard”) disks. This has major implications for DBMS design! » READ: transfer data from disk.
Part IV I/O System Chapter 12: Mass Storage Structure.
Paper by: Chris Ruemmler and John Wikes Presentation by: Timothy Goldberg, Daniel Sink, Erin Collins, and Tony Luaders.
Data Storage and Querying in Various Storage Devices.
Magnetic Disks Have cylinders, sectors platters, tracks, heads virtual and real disk blocks (x cylinders, y heads, z sectors per track) Relatively slow,
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems DISK I/0.
Chapter 10: Mass-Storage Systems
Sarah Diesburg Operating Systems CS 3430
Chapter 2: Computer-System Structures
External Memory.
Lecture 16: Data Storage Wednesday, November 6, 2006.
Disks and RAID.
CS 554: Advanced Database System Notes 02: Hardware
Oracle SQL*Loader
Lecture 11: DMBS Internals
Disks and scheduling algorithms
Persistence: hard disk drive
Mass-Storage Systems.
Andy Wang Operating Systems COP 4610 / CGS 5765
Presentation transcript:

1 Storage and Retrieval of Multimedia Data n Disks u Track: Each disk platter consists of a number of concentric tracks u Cylinder: The set of all track i from all platters is called a cylinder u Region: Each disk platter is divided into k regions for some fixed k. Each region represents a wedge of the platter with angle 360/k u Sector: The part of the track that intersects a wedge is a sector. There will be n sectors/wedge if we have n tracks n Disk Retrieval u associated with each platter is a disk arm that contains a read-write head u When a disk address is to be accessed, the disk controller performs 2 steps u seek operation (seek time) u rotational operation: Once the head is positioned over the right track, the disk spindle rotates so that the sector with the desired physical address is located directly under the r/w head (rotational latency) u Transfer rate: rate at which data is read/written (transfer time)

2 RAID-0 Architecture n RAID (redundant array of inexpensive disks) n Object is divided into blocks (e.g., Object B (b0 …b4) n We have a set of n disks, labeled 0,1, (n-1) n A k-stripe is a set of k drives for some integer k < n which divides n n When storing a set b 0, b 1, b r-1 of contiguous blocks in terms of k striped layout, we store each block b 0 on disk 0, b 1 on disk 1, b 2 on disk 2,..

3 RAID-0 Architecture n Object B is stored in a 3-striped layout whereas object C in 4-striped Controller b0 b3 c3 b1 c0 b4 c4 b2 c1 c5 c2 c6 n The controller can directly read blocks b0,b1 and b2 in parallel n The transfer rate is almost 3-fold n Major disadvantage is reliability: if a disk crashes, then the system as a whole crashes disk 0 disk 1 disk 2 disk 3

4 RAID-1 Architecture n Uses double the number of disks and the other half is used as mirror disks to eliminate RAID-0 problem n Works on the assumption that there is a low probability that a disk and its mirror crash at the same time n read is done from any one copy n when write occurs, it must be written to two copies n The obvious disadvantage: only 50% utilization of storage (the price paid for reliability)

5 RAID-5 Architecture n RAID 2-4 also exist n RAID-5 is probably the best: it has a simple but elegant strategy to trade-off between efficient storage utilization and reliability n Each cluster of k disks has a parity disk n If k = n, we have only one cluster n The data in the parity disk is derived from all n disks (for those who are interested: exclusive-OR of all disks) n In the event of a disk crash, it is possible to reconstruct the content of the disk from the parity disk n Disadvantage: If the parity disk crashes, or if two or more disks crash at the same time, RAID-5 is not effective

6 Service Algorithms n Given a set of clients each of whom wants to read data from the disk, how do we schedule their reads? n These algorithms must execute very fast (i.e. it cannot take too long to determine order of reads) n Some well known algorithms u First Come First Serve (FCFS) u SCAN u SCAN Earliest Deadline First (SCAN-EDF)

7 First Come First Serve n Each client request has an associated timestamp n Clients are serviced in order of their timestamp n Suppose the disk read head is currently over track i, sector j n FCFS will serve requests in the order r2,r1,r4,r3 n The last 2 columns are completely ignored by FCFS ReqID ReqTime Est.Seek Est.Rot.Delay r r r r

8 SCAN n Suppose the disk read head is currently over track i, sector j n We order requests in the order of the number of tracks to be traversed from track i, moving either outwards first and inwards, or vice versa, but not both n We then service the requests in the order prescribed n Assume each track requires 3 units of time to be traversed n If we assume that all of r1-r4 are in tracks beyond track i (i.e., between track i and the outer rim of the disk) then the service order is r2,r4,r1,r3 ReqID ReqTime Est.Seek Est.Rot.Delay r (8) 3 r2 8 12(4) 5 r (10) 6 r (6) 4

9 SCAN-EDF n EDF stands for “earliest deadline first” n Group all requests in ascending order of their deadline n Each group then is services using SCAN n Assume we have 2 groups G1 (r1,r4) and G2 (r2,r3) n G1 is serviced first using SCAN, i.e, in the order r4,r1 n Next G2 with order r2, r4 n Thus the overall service order is r4,r1,r2,r3 ReqID ReqTime Est.Seek Est.Rot.Delay Deadline r (8) r2 8 12(4) r (10) r (6) 4 100

10 Building disk-based media servers n Must service multiple clients simultaneously n Clients may want, in addition to playback, other interactive operations like rewind, fast forward, pause, etc. n For each client, the server must u provide continuous playback u this requires filling clients buffer at just the “right” rate u If too fast, buffer might get overwritten u If too slow, client might experience service interruption

11 Commercial Systems n Dell and many computer manufacturers n Storage Dimensions (the popular) u recently merged with Artecon ( u provides a range of disk arrays based on RAID architecture u its SuperFlex 5500 system has a capacity of 255GB with peak transfer rates of 80MB/sec u 2 SuperFlex 5500 can be configured/SCSI channel, and 8 such systems can be supported on an single Intel-based server with four SCSI buses to provide capacities around 2TB u hot-swappable n Seagate’s Cheetah System u 36.5GB with transfer rate 80MB/sec n Ciprico u offers several series of RAID arrays u 20, 40, 100MB/sec transfer rates u

12 Retrieving of Multimedia Data from CD-ROMs n CD-ROM driver typically contains one platter n It contains a single spiral track, that is traversed by the read head n Spiral track is divided into equal sized sectors n Unlike a disk drive system where the disk head moves at a constant angular velocity, in a CD-ROM system, the disk head moves at a constant linear velocity across these tracks n Storage: few GBs n Cheaper ($1/disk) n Writable disks are available n Commercial Systems ( u Toshiba, NEC Multispin, IBM

13 Reading from a CD-ROM n Reading is done in rounds n Each round starts with the read head at location 1 n At any given round, we attempt to read a sorted (in ascending order of sector number) set of sectors n Example u Assume a particular CD-ROM contains 100 sectors u The read head is currently at location 58 u A client wishes to read sectors 10,30,50,70,90 u The client has enough buffer to accommodate only 3 sectors u Possibility 1: read sector 70 first, then 90, 10, 30, 50 u Most CD-ROM drivers do not allow this possibility u Possibility 2: Reset the disk head to point 0, and then move the head so that sectors 10,30,50 get buffered. We then consume 10 and buffer 70. Next we consume 30 and buffer 90, next consume 50,70,90

14 Buffer Requirements n Need to ensure 2 properties u Continuity of playback: the client should be able to read data from the buffer without any interruption u Buffer utilization: at no time should the buffer get over-written n Minimal buffer size is a function of u bandwidth of the disk to prefetch buffer u buffer filling time u decompression rate u compression ratio u consumption rate of the client

15 Scheduling Retrieval from CD-ROMs n FCFS u Processes requests according to the arrival time u Total seek time is  abs(s i - s i-1 )/lv, where lv is the linear velocity, S 0 is 1 u Consider serving requests for sectors 25,5,35,15,5,10 and assume lv is 2 sectors/msec u Total seek time = (abs(25-1) + abs(5-25)+ abs(35-5)…)/2 = 54.5msec

16 Scheduling Retrieval from CD-ROMs n SCAN u Collect a set of requests and sort the sectors in the increasing order of seek distance u If the read head is not initially in the start location, then this might lead to a bidirectional sweep u Requests: 25,5,35,15,5,10 u Sorted order: 5,10,15,25,35 u 5 is read only once, unlike FCFS u Assume the read head is at position 1 u Seek time = ((5-1) + (10-5) + …)/lv = 17 msec n SCAN-EDF u request order: u deadline: u Service order: 20,50,10,15,35

17 Retrieval of Multimedia Data from Tapes n 3 basic tape recording mechanisms u serpentine recording u helical recording u transverse recording n Often there is a Robotic tape library and a fixed set of players u the robotic arm reaches into the library, retrieves a requested tape, and inserts it into an available player

18 Serpentine tapes n Tape contains several tracks that are parallel to the length of the tape n Each track has a track number and a linear set of tape blocks n When reading, u the tape is first rolled forward (in the left to right direction) and the read-head of the driver is positioned over track 1 u when we reach the end of track 1, the read-head gets repositioned over track 2, and we read contents of track 2 moving from right to left u in track 3 we read from left to right u The process continues till we reach the end of the tape

19 Reading from serpentine tapes n Suppose the read head is currently positioned over track 4 and we are reading block 90 on this track n Suppose we wish to read block 10 on track 1. n Alternative 1: u The tape must be rewound to the beginning of track 4, then the read head must be switched to track 1 (jumping tracks 2, 3) and finally move the head to block 10 u Many systems do not support such jumps n Alternative 2: u Fast forward tape to the right till the read head is positioned over the last lock of track 4 u Reposition the read head to track 1 u Rewind the tape until the read head is positioned over block 10

20 Helical tape recording n Tracks are diagonal n tape winds around a cylinder in a spiral fashion n read/write heads are embedded on the surface of the cylinder n the axis across which the cylinder rotates is somewhat tilted, relative to the tape n the head pass the linear movement of the tape, different parts of the tape, corresponding to angular, diagonal tracks n When writing a block, u the written block is immediately read u if the read value is different from what is to be written (use checksum), mark this block as a bad sector, rewrite it in the next block,

21 Robotic tape libraries n Relative cost of obtaining the tape from the shelf and loading it in the drive is a very expensive operation n Thus minimizing such accesses is a key requirement n Striping technique (as in RAID) is used u granule size and Stripe width: Both impact retrieval efficiency u e.g, media object of size 200MB, granule size 20MB, stripe width 3 n Commercial systems u Storage Dimensions F SuperFlex tape array system has 168GB capacity F MegaFlex 192GB with 20MB/sec transfer rate u Transitional Technology:20-40GB with transfer rates of 3-6MB/sec u IBM’s MAGSTAR system: 40GB