cs 414 - spring 2009 cs 414 – multimedia systems design lecture 27 – media server (part 2)...

20
CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara Nahrstedt Spring 2009

Upload: lucas-higgins

Post on 20-Jan-2018

213 views

Category:

Documents


0 download

DESCRIPTION

Client/Server Video-on-Demand System CS Spring 2009

TRANSCRIPT

Page 1: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

CS 414 - Spring 2009

CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2)

Klara NahrstedtSpring 2009

Page 2: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Administrative MP3 is out – deadline April 6, 5-7pm in

216 SC Sign-up sheet for demonstrations will be

provided on Monday, April 6, during the class.

CS 414 - Spring 2009

Page 3: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Client/Server Video-on-Demand System

CS 414 - Spring 2009

Page 4: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Media Server Architecture

CS 414 - Spring 2008

Storage device

Disk controller

Storage management

File System

Memory Management

Content Directory

Network Attachment

Incoming requestDelivered data

Page 5: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Outline Disk/Storage Management

Multimedia Data Placement Strategies on Disk Multiple Disks and Multimedia

RAID Data Striping Group Creation

Disk Management Data Interleaving Disk Scheduling

EDF ; SCAN-EDF

CS 414 - Spring 2009

Page 6: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Scattered Non-continuous Placement

CS 414 - Spring 2009

Page 7: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Constrained Placement Approach: separation between successive file blocks is

bounded Bound on separation – not enforced for each pair of

successive blocks, but only on average over finite sequence of blocks

Attractive for small block sizes Implementation – expensive

For constrained latency to yield full benefit, scheduling algorithm must retrieve immediately all blocks for a given stream before switching to another stream

CS 414 - Spring 2009

Page 8: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Log-Structure Placement This approach writes modified blocks sequentially

in a large contiguous space, instead of requiring seek for each block in stream when writing (recording) Reduction of disk seeks Large performance improvements during recording,

editing video and audio Problem: bad performance during playback Implementation: complex

CS 414 - Spring 2009

Page 9: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Placement of Multiple MM Files on Single Disk Popularity concept among multimedia content -

very important Take popularity into account when placing

movies on disk Model of popularity distribution – Zipf’s Law

Movies are kth ranked if their probability of customer usage is C/k,

C = normalization factor Condition holds: C/1 + C/2 + … C/N = 1,

N is number of customers

CS 414 - Spring 2009

Page 10: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Example Assume N = 5 movies Problem: what is the probability that the next

customer picks 3rd ranked movie? Solution:

Solve C from the equation C/1 + C/2 + C/3 + C/4 + C/5 = 1

C = 0.437Probability to pick 3rd ranked movie is C/3 = 0.437/3

= 0.1456

CS 414 - Spring 2009

Page 11: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Placement Algorithm for Multiple Files on Single Disk Organ-Pipe Algorithms (Grossman and

Silverman 1973)

CS 414 - Spring 2009

Middle of disk (in case of traditional disk layout)

1st rank (most popular movie)

2nd ranked movie3rd 4th

5th 6th

7th 8th

9th

Note: In case of ZBR disk layout , place most popular disks at the outer tracks

Page 12: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Need for Multiple Disks Solutions for Media Server

Limitation of Single Disk: Disk Throughput

Approach: 1 Maintain multiple copies of the same file on different disks Very expensive

Approach 2: Scatter multimedia file across multiple disks

CS 414 - Spring 2008

Page 13: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Approach: Data Striping RAID (Redundant Arrays of

Inexpensive Disks) Addresses both performance and

security (0-6) RAID levels – different

approach at combining performance enhancements with security/fault-tolerance enhancements

Disks spindle synchronously Operate in lock-step parallel mode

Striping improves BW, but does not improve seek or rotational delay

CS 414 - Spring 2008

Page 14: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Data Striping – Group Creation

CS 414 - Spring 2008

Multiple RAID: Creation of Subgroups of disks into independent logical disk arrays; limits # of disks per file

Declustering: Groups are not made up of complete disks ; # of disks for any stripe is fixed and of same size, but disks on which stripe is located differs

Dynamic Declustering: Non - static strip allocation to disks

Page 15: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Storage/Disk Management Disk access – slow and costly Reduce disk access

Use block caches (anticipate future reads or writes)

Reduce disk arm motion Blocks accesses in sequence (continuously) ,

place together on one cylinder Interleaved vs non-interleaved storage

CS 414 - Spring 2008

Page 16: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Data Interleaving

CS 414 - Spring 2008

Data InterleavingOn Multiple Disks(Disks are not Synchronized)

Data InterleavingOn single disk(consecutive blocks are placed on The same cylinderBut in interleaved way

Page 17: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Disk Scheduling Policies Goal of Scheduling in Traditional Disk

Management Reduce cost of seek time Achieve high throughput Provide fair disk access

Goal of Scheduling in Multimedia Disk Management Meet deadline of all time-critical tasks Keep necessary buffer requirements low Serve many streams concurrently Find balance between time constraints and efficiency

CS 414 - Spring 2008

Page 18: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

EDF (Earliest Deadline First) Disk Scheduling Each disk block request is tagged with

deadline Policy:

Schedule disk block request with earliest deadline

Excessive seek time – high overheadPure EDF must be adapted or combined with file

system strategies

CS 414 - Spring 2008

Page 19: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

EDF Example

CS 414 - Spring 2008

Note: Consider that block number Implicitly encapsulates the disk track number

Page 20: CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 27 – Media Server (Part 2) Klara…

Conclusion

Disk Scheduling – important component in the timely delivery of streams

Admission should be done if one cares not to over subscribe

CS 414 - Spring 2008