Download Multimedia Servers - Lecture Slides - Operating Systems | CMPSCI 677 and more Study notes Operating Systems in PDF only on Docsity! Department of Computer Science, UMass Amherst Multimedia Servers • Multimedia: digital audio, video, images,.. • Streaming audio and video – Very different characteristics from textual and numeric files – Need different techniques for managing multimedia data • Video: sequence of images played out at a constant rate • Digital video is often stored in compressed format CMPSCI 677: Operating Systems Lecture 25, Page 1 Department of Computer Science, UMass Amherst Need For Video Compression • Large data rate and storage capacity requirement Satellite 180x180 km2 600 MB/image imagery 30 m2 resolution NTSC video 30 frames/s, 30 MBytes/s 640x480 pixels, 3 bytes/pixel • Compression algorithms exploit: – Spatial redundancy (i.e., correlation between neighboring pixels) – Spectral redundancy (i.e., correlation between different frequency spectrum) – Temporal redundancy (i.e., correlation between successive frames) CMPSCI 677: Operating Systems Lecture 25, Page 2 Department of Computer Science, UMass Amherst MPEG - An Overview • Two categories: intra-frame and inter-frame encoding • Contrasting requirements: delicate balance between intra- and inter-frame encoding – Need for high compression ⇒ only intra-frame encoding is not sufficient – Need for random access ⇒ best satisfied by intra-frame encoding • Overview of the MPEG algorithm: – DCT-based compression for the reduction of spatial redundancy (similar to JPEG) – Block-based motion compensation for exploiting the temporal redundancy ∗ Motion compensation using both causal (predictive coding) and non-causal (interpolative coding) predictors CMPSCI 677: Operating Systems Lecture 25, Page 5 Department of Computer Science, UMass Amherst Exploiting Temporal Redundancy • Three types of frames in MPEG: – I-frames: ∗ Intra-coded frames, provide access points for random access - yield moderate compression – P-frames: ∗ Predicted frames are encoded with reference to a previous I or P frame – B-frames: ∗ Bidirectional frames encoded using the previous and the next I/P frame ∗ Achieves maximum compression Forward Prediction Bidirectional Prediction B B B B B BPI I CMPSCI 677: Operating Systems Lecture 25, Page 6 Department of Computer Science, UMass Amherst Multimedia Storage Servers • Digitally stores heterogeneous data objects (consisting of audio, video, imagery, textual, and numeric data) on extremely high capacity storage devices • Fundamental differences in data type characteristics and requirements – Best-effort service for text vs. real-time for video – Small read/writes for text vs. large read/writes for video – .... CMPSCI 677: Operating Systems Lecture 25, Page 7 Department of Computer Science, UMass Amherst Terminology (Cont’d) • Disk arrays • Striping – Interleave the storage of each media stream among disks – Stripe unit: maximum amount of logically contiguous data that is stored on a single disk – Degree of striping: Number of disks across which a media stream is striped • Redundant and non-redundant disk arrays CMPSCI 677: Operating Systems Lecture 25, Page 10 Department of Computer Science, UMass Amherst Video Storage Server: Fundamentals • Data transfer rate of disks data rate requirement of isolated video streams ⇒ designing single-user video servers is straightforward • Server stores digitized video streams on an array of disks • Clients can request the retrieval of video streams for real-time playback • Two possible server architectures: – Client-pull – Server-push CMPSCI 677: Operating Systems Lecture 25, Page 11 Department of Computer Science, UMass Amherst Client-pull Architecture • Server retrieves data only in response to an explicit request from client • Used in conventional file system to provide best-effort service • Adapting client-pull architecture for video: clients ensure playback continuity by – Determining the playback instant of a frame – Estimating response time for each request – Issuing a read request accordingly • Response time: a function of the system load ⇒ varies widely over time ⇒ estimation is non-trivial CMPSCI 677: Operating Systems Lecture 25, Page 12 Department of Computer Science, UMass Amherst Retrieval Techniques • Streaming media data imposes real-time constraints on retrieval – Need to retrieve 30 frame in each second – Client or server buffering can provide some leeway but still need guarantees • Performance guarantees on retrieval → need to limit the number of clients accessing a server • Employ admission control algorithms CMPSCI 677: Operating Systems Lecture 25, Page 15 Department of Computer Science, UMass Amherst Admission Control • Server push retrieval: retrieve f frames in each periodic round R • Continuous playback requirements: retrieval time of f1, f2, ..fk frames for all k clients should not exceed R • Admission control test – Estimate resoure needs of new client (time to retrieve fi frames) – Verify if total resource needs ≤ capacity (total retrieval time ≤ R) – If so, admit, else deny CMPSCI 677: Operating Systems Lecture 25, Page 16