Documente Academic
Documente Profesional
Documente Cultură
Transmission
Audio Capture Compression Processing
Transmission
A/V Playback
3
Outline
Media Server Requirements Media Server Layered Architecture Disk scheduling algorithms
quanta must be presented using the same timing sequence with which they were captured
quality: 1280x720 pixels/frame; 24 bits/pixel -> 81 Mbytes per second NTCS quality: 640x480 pixels/frame; 24 bits/pixel ->27MBytes per seconds
7
Over 4 B videos are viewed a day 60 hours of video are uploaded every minute Over 800 million unique users visit YouTube each month 70% of YouTube traffic comes from outside US In 2011, YouTube had more than 1 trillion views (140 views for every person on Earth)
Source: http://www.youtube.com/t/press_statistics
9
approach buffer the whole stream approach prefetch just short video part
Problem:?? Problem:
Possible
Problem: ?? Problems: ??
Possible
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
12
Storage/Disk Management
Timely disk scheduling algorithms and sufficient buffers to avoid jitter Possible Admission control
13
Storage Management
Time
Rotational
Time during which transfer cannot proceed until the right block or sector rotates under read/write head
Data
Transfer Time
Time needed for data to copy from disk into main memory
14
15
Continuous Placement Simple to implement, but subject to fragmentation Enormous copying overhead during insert/delete to maintain continuity When reading file, only one seek required to position the disk head at the start of data
Non-contiguous Placement Avoids fragmentation Avoid copying overhead When reading file, seek operation incurs for each block , hence intrafile seek
16
If
more than one block is required to prevent starvation prior to next read, deal with intrafile seek
17
Non-continuous Placement
18
Constrained Placement
For constrained latency to yield full benefit, scheduling algorithm must retrieve immediately all blocks for a given stream before switching to another stream
19
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
Data Interleaving On Multiple Disks (Disks are not Synchronized) Striping data across Multiple disks
21
cost of seek time Achieve high throughput Provide fair disk access
deadline of all time-critical tasks Keep necessary buffer requirements low Serve many streams concurrently Find balance between time constraints and efficiency
22
Source: Reddy et al, Disk Scheduling in a Multimedia I/O System, ACM TOMCCAP 2005 23
good scheduling policy for periodic requests disk block request with earliest
Policy:
Schedule
deadline Excessive seek time high overhead Pure EDF must be adapted or combined with file system strategies 24
EDF Example
Note: Consider that block number Implicitly encapsulates the disk track number
25
Add
Policy:
SCAN-EDF
chooses the earliest deadline If requests with same deadline, then choose request according to scan direction
26
Implementation of SCAN-EDF
Notation:
be deadline of disk block request i Ni be track (block) position on disk Nmax be maximum number of disk tracks
Di
Deadline Modification:
Di
+ f(Ni) f(Ni) converts track number of i into a small perturbation of deadline Perturbation small enough so that
28
29
Ni N N i ; N N i N m ax, f ( N i ) N m ax
(b)
N m ax N i N i ;1 N i N , f ( N i ) N m ax
30
N m ax N Ni (b) N i ;1 N i N : f ( N i ) N m ax
31
Policy:
Each
Request consists of (Deadline, Block Number ) Disk Block Requests served in cycles In one cycle, requests divided into groups according to similar deadlines Within group use SCAN As we retrieve blocks, we may need smoothing buffers to ensure continuity
32
33
Mixed Scheduling
(uses SSTF Shortest Seek Time First)
Example of SSTF
34
Mixed Scheduling
SSTF (Shortest Seek Time First) + Balanced Strategy
35
Conclusion
Media Server Architecture Storage Management
Data/file
Disk Scheduling important component in the timely delivery of streams Admission should be done if one cares not to over subscribe
36