140 likes | 283 Views
Continuous Media 1. Differs significantly from textual and numeric data because of two fundamental characteristics: Real-time storage and retrieval High data transfer rate and large storage space. Continuous Media 2.
E N D
Continuous Media 1 • Differs significantly from textual and numeric data because of two fundamental characteristics: • Real-time storage and retrieval • High data transfer rate and large storage space
Continuous Media 2 • Recording -- server continuously stores data produced by an input device to prevent buffer overruns at the device • Playback -- server retrieves data from the disk at a rate that prevents an output device from starving
Single Stream Playback • A sequence of periodic tasks with deadlines • Tasks correspond to retrievals of media blocks from disk • Deadlines correspond to the scheduled playback times • Though just-in-time playback is conceivable, retrieval will be bursty • Media blocks need to be buffered when retrieval gets ahead of playback
Challenge • To supply stream buffers with enough data to ensure that the playback processes do not starve • buffer entire stream before initiating playback • requires a large buffer and introduces lengthy latency • serve the stream periodically minimizing buffer space requirement and the initial latency
Multistream Retrieval • Disk data transfer rates are significantly higher than a single stream’s playback rate • Retrieval requests from several streams simultaneously • Many of these streams may be accessing the same file, but different parts of the file at the same time • Continuous playback requirements of ALL streams must be met • Scheduling disk requests such that no individual stream starves and limiting the number of streams scheduled at a given time
Disk Scheduling • Traditional algorithms -- First come, first served; Shortest seek time first; SCAN • to reduce seek time and rotational latencies, to achieve high throughput, to provide fair access • Real-time scheduling of tasks with deadlines -- EDF • schedules the media block with the earliest deadline • excessive seek time and rotational latency and poor server resource utilization
Disk Scheduling for CM Data • SCAN-EDF -- serves the requests with earliest deadline first, but when several requests have the same deadline, their respective blocks are accessed with the SCAN algorithm • To improve the effectiveness of SCAN-EDF, increase the number of requests with the same deadline, for example one can enforce that all requests have deadlines that are multiples of a period
Round Scheduling for CM Data • Process requests in rounds to exploit the nature of CM playback • Each round still requires a disk scheduling algorithm • Round-robin -- request order within a round is fixed and maximum latency between successive retrieval times is bounded by a round’s duration • SCAN -- request order depends on data placement and maximum latency between successive retrieval times is bounded by twice the round’s duration
Round Length and Latency Trade-offs • Round-robin -- initial latency shorter but round lengths are longer • SCAN -- initial latency longer but round lengths are shorter • Grouped Sweeping Scheme (GSS) • partitions each round into groups • groups are served in fixed order • SCAN is used within each group
Production versus Consumption • During a round, the amount of data retrieved for a stream is at least equal to the amount consumed by the stream’s playback • Data production never lags behind consumption (buffer conserving property) • Buffer conservation as a sufficient condition for preventing starvation • Maximum duration of a round, maximum consumption rate, same number of media blocks or proportional number of media blocks
Admission Control • In admitting new streams, a multimedia server employs admission control tests to determine whether a new stream can be served without affecting the playback requirements of the streams that are already in service • Deterministic -- worst case scenarios and all deadlines are guaranteed to be met • Statistical -- Deadlines are guaranteed to be met with a certain probability • Background (or Best-effort) -- No guarantees are given and are served only if there is excess available capacity
Data Placement • Retrieval Blocks • Contiguous Placement • a single seek is enough (but fragmentation is problem) • Scattered Placement • many intrafile seeks (can be alleviated using large block sizes and to read one block in each round) • Constrained Placement • intrafile seeks may be unavoidable if multiple blocks are needed in each round • reduce the seeks to a reasonable bound by bounding the separation of successive blocks
Data Striping and Data Interleaving • RAID Scheme -- data is striped across each disk • achieves intrafile and interfile parallelism • Disk arrays are a good solution to the high bandwidth requirements of multimedia services • Data interleaving allows blocks of a media file to be stored on different disks as successive file blocks
Multimedia File Systems • File system oriented • multimedia object as a large file and typical file system operations such as open, close, read are supported • Stream oriented • multimedia data continuously “streamed” to the client with operations such as play, pause, resume supported • File retrieval structures -- linked lists, FAT, indexes