CS 414 Multimedia Systems Design Lecture 27 Media

  • Slides: 24
Download presentation
CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 1) Klara

CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 1) Klara Nahrstedt Spring 2010 CS 414 - Spring 2010

Outline Buffer Management Strategies for Multimedia Systems n Introduction to Media Servers n ¨

Outline Buffer Management Strategies for Multimedia Systems n Introduction to Media Servers n ¨ Disk Layout ¨ Disk/Storage Management n Multimedia Data Placement Strategies on Disk CS 414 - Spring 2010

Buffering Strategies in Client. Server Systems Read encoded frames from VOD Disk Packetization Protocol

Buffering Strategies in Client. Server Systems Read encoded frames from VOD Disk Packetization Protocol Stack Processing VOD Server network VOD Client playout Decoder CS 414 - Spring 2010 De-Packetization Protocol Stack Processing

Client/Server Video-on-Demand System CS 414 - Spring 2010

Client/Server Video-on-Demand System CS 414 - Spring 2010

Buffering Strategies at VOD Client n Minbuf - minimum buffering strategy ¨ Minbuf minimizes

Buffering Strategies at VOD Client n Minbuf - minimum buffering strategy ¨ Minbuf minimizes buffering requirements at VOD client, but makes more demands on network (throughput and delay guarantees) n Maxbuf – maximum buffering strategy ¨ Maxbuf buffers more than one unit of information and eases Qo. S guarantees demands on network ¨ Buffering only up to a limit (Bufmax) CS 414 - Spring 2010

Buffering Model ZOi(t) – amount of bits in multimedia object (e. g. , Video

Buffering Model ZOi(t) – amount of bits in multimedia object (e. g. , Video frame) Oi displayed at time t n Cr(t) – amount of bits received at receiver at time t n Two buffer states in each buffering strategy: n ¨ Starvation n if Cr(t) ≤ ZOi(t) If Cr(t) > ZOi(t), no starvation at VOD client ¨ Overflow if Cr(t) ≥ ZOi(t) + Bufmax CS 414 - Spring 2010

Client Buffer Constraints (Received amount of data Cr(t) should always be between ZOi (t)

Client Buffer Constraints (Received amount of data Cr(t) should always be between ZOi (t) and ZOi (t) + Bufmax) CS 414 - Spring 2010

Implications of Minbuf Strategy n n n With minbuf strategy – delivery time of

Implications of Minbuf Strategy n n n With minbuf strategy – delivery time of a unit of information is the display time of previous unit Minimum Throughput (Th) in bits per time unit required is Delivery time instant of the first unit before start of display: CS 414 - Spring 2010

Implication of Maxbuf Strategy n Delivery schedule of VOD server and network may cause

Implication of Maxbuf Strategy n Delivery schedule of VOD server and network may cause that Bufmax bits will be delivered every K seconds, where ¨K n = Bufmax/Th, Th – throughput of network Minimum Throughput required ¨ ∑ZOi – total size in bits of all objects that will be presented in stream: CS 414 - Spring 2010

Implementation Issues n Buffers for Uncompressed Periodic Streams ¨ n Use circular buffers as

Implementation Issues n Buffers for Uncompressed Periodic Streams ¨ n Use circular buffers as prefetch buffers with maxbuf strategy Buffers for compresses periodic streams Use circular buffers, but carefully consider the size of buffer unit (depending on MPJEG or MPEG) with maxbuf strategy ¨ For MPEG may consider dynamic buffer allocation ¨ n Buffers for control information ¨ n Use priority queues or FIFO Buffers for Non-RT data ¨ Use maxbuf strategy with static buffer allocation CS 414 - Spring 2010

Memory Management n n n Virtual memory versus real memory paradigm In VM –

Memory Management n n n Virtual memory versus real memory paradigm In VM – paging introduces unpredictable delays Multimedia timing requirements suggest that no paging is desired, however it might be difficult to do from user space Multimedia applications may want to pin pages into memory which include their time-sensitive code On-Chip Caching is desired ¨ Intel Pentium Processor with MMX technology (SIMD Instruction Set) has on-chip cache of size 32 KB for video processing only CS 414 - Spring 2010

Memory Reservation Concept n Possible ¨ Done in hard real-time applications ¨ Done in

Memory Reservation Concept n Possible ¨ Done in hard real-time applications ¨ Done in some multimedia applications – pin multimedia applications n n Be careful when you pin only the application since if other services are paged, the application will wait anyway Possible architecture ¨ Memory broker and memory controller ¨ Memory broker pins a certain size of memory – global reserve – shared among RT processes CS 414 - Spring 2010

Servers Classification n Media Servers Push Servers – file servers with streaming model ¨

Servers Classification n Media Servers Push Servers – file servers with streaming model ¨ Servers push data towards users ¨ n Traditional File Servers ¨ Pull Servers - FTP servers ¨ Users pull data in one block at a time by repeatedly calling read to get one block after another ¨ RPC (Remote Procedure Calls) CS 414 - Spring 2010

Media Server Requirements n Real-time storage and retrieval ¨ Media quanta must be presented

Media Server Requirements n Real-time storage and retrieval ¨ Media quanta must be presented using the same timing sequence with which they were captured n High-Data Transfer Rate and Large Storage Space ¨ HDTV quality: 1280 x 720 pixels/frame; 24 bits/pixel -> 81 Mbytes per second ¨ NTCS quality: 640 x 480 pixels/frame; 24 bits/pixel ->27 MBytes per seconds CS 414 - Spring 2010

VOD Retrieval Transmission and Receiving Sending Playout Curves Curve at VOD Curve from VOD

VOD Retrieval Transmission and Receiving Sending Playout Curves Curve at VOD Curve from VOD server bytes Client Retrieval curve From disk buffers Playout Curve At VOD Client time CS 414 - Spring 2010

Playback n Single Stream Playback ¨ Possible n Problem: ? ? ¨ Possible n

Playback n Single Stream Playback ¨ Possible n Problem: ? ? ¨ Possible n approach – prefetch just short video part Problem: ¨ ¨ ¨ n approach – buffer the whole stream Prevent starvation Minimize buffer space requirement Minimize initiation latency Multiple Streams Playback ¨ Possible n Problem: ? ? ¨ Possible n approach – dedicate a disk to each stream approach – multiple streams per disk Problems: ? ? CS 414 - Spring 2010

Support for Continuous Media n Proper management of multimedia disk storage ¨ Optimal placement

Support for Continuous Media n Proper management of multimedia disk storage ¨ Optimal placement of data blocks on disk ¨ Usage of multiple disks ¨ Role of tertiary storage Admission control n Special disk scheduling algorithms and sufficient buffers to avoid jitter n CS 414 - Spring 2010

Media Server Architecture Delivered data Incoming request Network Attachment Content Directory Memory Management File

Media Server Architecture Delivered data Incoming request Network Attachment Content Directory Memory Management File System Storage management Disk controller Storage device CS 414 - Spring 2010

Disk Layout Zoned Disk (ZBR – Zone Bit Recording) Traditional Random Access Disk Layout

Disk Layout Zoned Disk (ZBR – Zone Bit Recording) Traditional Random Access Disk Layout Track Sector Advantage: Easy mapping of location Information to head movement and disk rotation Problem: loss of storage space Advantage: Sector size same Rotation speed constant; efficient Usage of space CS 414 - Spring 2010

ZBR Disk Design n n Stores more sectors per track on outer tracks than

ZBR Disk Design n n Stores more sectors per track on outer tracks than on inner tracks Is called also Zone Constant Angular Velocity (ZCAV) Place most popular movies in disk outer zones and aggregate “hot” movies together to take advantage of high bandwidth in outer zones ZBR’s drive controller varies rate at which it reads and writes – faster on outer tracks Products that use ZBR ¨ HD DVD-RW ¨ Most hard drives since 1990 s CS 414 - Spring 2010

Storage Management n Storage access time to read/write disk block is determined by 3

Storage Management n Storage access time to read/write disk block is determined by 3 components ¨ Seek n Time required for the movement of read/write head ¨ Rotational n Time during which transfer cannot proceed until the right block or sector rotates under read/write head ¨ Data n Time (Latency Time) Transfer Time needed for data to copy from disk into main memory CS 414 - Spring 2010

Placement of MM Data Blocks on Single Disk Continuous Placement Scattered Placement Simple to

Placement of MM Data Blocks on Single Disk Continuous Placement Scattered Placement Simple to implement, but subject to fragmentation Avoids fragmentation Enormous copying overhead during insert/delete to maintain continuity Avoid copying overhead When reading file, only one seek required to position the disk head at the start of data When reading file, seek operation incurs for each block , hence intrafile seek CS 414 - Spring 2010

Intra-file Seek Time Intra-file seek – can be avoided in scattered layout if the

Intra-file Seek Time Intra-file seek – can be avoided in scattered layout if the amount read from a stream always evenly divides block n Solution: select sufficient large block and read one block in each round n ¨ If more than one block is required to prevent starvation prior to next read, deal with intra-file seek n Solution: constrained placement or logstructure placement CS 414 - Spring 2010

Conclusion Disk Layout and Number of disks play important role for media servers n

Conclusion Disk Layout and Number of disks play important role for media servers n Data block placement and file placement are crucial for real-time retrieval on media servers n CS 414 - Spring 2010