Storing and Serving Multimedia

Download Report

Transcript Storing and Serving Multimedia

Storing and Serving Multimedia
What is a Media Server?
• A scalable storage manager
• Allocates multimedia data optimally among disk
•
•
•
•
•
resources
Performs memory and disk-based I/O optimization
Supports real-time and non-real-time clients
Supports presentation of continuous-media data
Supports mixed workloads – schedules the
retrieval of blocks
Performs admission control
Task 1
How should multimedia data be placed on
a disk?
Constrained Allocation
• Intuition: presentations are sequential, so place
sequential segments of a MM object as closely as
possible
• MM object X[i] = {X[i,1], X[i,2] …X[i,n]}
• | Track(X[i,j+1]) - Track(X[i,j]) |  d
• Problem?
Scheme Bidirectional
• Disk has R equal regions
• Max length of seek= 2/R X disk radius
• What combination of R and segment size S will maximize
throughput N without violating continuity and memory
availability?
data display
Time between two I/O requests = T, T  S/DR
rate
For N requests, total time T = TregionTR + T regionSeek
data transfer rate
Time to transfer N segments TregionTR = N  (S/TR)
Worst seek = d = CYL/R tracks  (CYL/R) with overhead
TregionSeek = N  (CYL/R)
N  (S/TR + (CYL/R) )  S/DR
(d)=a1+b1d, often
piecewise continuous
What is wrong with this model?
•
•
•
•
•
•
•
Scheme Bidirectional
• T is never constant
• The i-th I/O request has to wait till the (i-1)th request has
been serviced + seek time + transfer time
• Time between two consecutive requests:
• T + i  (CYL/R)
• Solution
• Increase the segment by DR  i  (CYL/R) for the i-th
request
• For N requests
• What is the worst initial latency under this model?
Other Allocation Schemes
• Unidirectional allocation
• Initial Latency
• Sequential allocation
•
•
•
•
Idea: pick up whatever segments in on-disk sequential order
Expected seek distance: CYL/(R X N)
Concurrent
Worst case: 2(N-1) accesses between segments X[i,j]
and X[i,j+1]
presentations
Solution
• Put X[i,1] into a buffer (size S) and start playback only after the
region k containing X[i,1] is fully read
• If X[i,2] occurs at the start of region k+1, put in a cushion buffer, else
if occurs at the end of region k+1play back from disk.
• Memory constraint: 2  N  S  Mem
Other Allocation Schemes
• Arrival Time Problem: X[i] comes just when the disk passes
over X[i,1]
• Wait period: R region scans + time to read region k
• Group Sweeping Scheme (GSS)
•
•
•
•
Divide N requests into G groups
Service N/G requests as a chunk
When is this beneficial?
How does initial latency of the scheme compare with others?
• Effects of Replication
• Memory cost?
• Disk cost?
• Latency?
Service Models
• Random Access
• Maximize the number of clients that can be served
concurrently at any time with a low response time
• Minimize latency
• Enhanced Pay-per-view (EPPV)
• Increase the number of clients that can be serviced
concurrently beyond the available disk and memory
bandwidth, while guaranteeing a constraint on the
response time