Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Disk Scheduling
- Deterministic Approach Admission Control
Broadcast (No-VoD) Pay-per-view (PPV) Quasi VoD (Q-VoD): Users are grouped
based on a threshold of interests. Some VCR functions can be done by switching between groups.
Speed and efficiency are not the main characteristics of a real-time system. The playback of a video sequence is only acceptable when it is presented neither too quickly nor too slowly.
Timing and logical dependencies among different related tasks, processed at the same time, also must be considered. Audio data sometimes must be synchronized with video data.
Real-Time Scheduling
To fulfill the timing requirements of continuous media, the operating system must use real-time scheduling technique. The scheduler must consider the entire end-to-end data path. The CPU is just one of the resources. Other components include main memory, storage, I/O devices and networks.
4
Order of Requests
45 12 40
42 45 12
50 42 45
16 50 42
30 16 50
16 50
42 45
12 40
22 20
Or
Advantages: Intrinsically fair Simple Disadvantages: Not optimal with respect to head movement. high average seek time.
6
Order of requests
45 12 40
42 45 40
50 42 45
16 50 45
30 50
45 42
. ..
40 12
22 20
Advantage: optimal in terms of seek time. Disadvantage: request targets in the middle of the disk are preferred over those in the innermost and outermost disk areas.
...
45 12 40 40
42 45 12 42
50 45 12
d Hea
Note: Middle tracks still get a better service then edge tracks. 8
Order of requests
45 12 40 40
42 45 12 42
50 45 12 45
16 50 12 50
30 16 12 12
24 30 16 16
...
Order of requests
2 42 1 45 1 12 2 40 1 22
.. .
R e q u e s t s w it h : d e a d lin e b lo c k n u m b e r
Employment of EDF in the strict sense results in poor throughput and excessive seek time.
10
SCAN-EDF : Algorithm
All requests are forced to have release times that are multiples of the period p.
Like in EDF, the request with the earliest deadline is always served first. Among requests with the same deadline, the specific one that is first according to the scan IMPLEMENTATION direction is served first.
If Note: The function f prioritizesi tasks of the same Di is the deadline of task i and N is the track position,deadline according to their positions on disk. the deadline can be modified to be Di+f(Ni).
11
SCAN-EDF: Example
Nmax = 100 and f(Ni) = Ni / Nmax
t
3 .2 4 2 4 3 .3 0 3 0 2 .1 6 1 6 3 .5 0 5 0 2 .1 6 1 6 3 .5 0 5 0 2 .4 2 4 2 1 .4 5 4 5 1 .1 2 1 2 2 .4 0 4 0 1 .2 2 2 2 22 12 2 .4 0 4 0 1 .2 2 2 2 45 2 .4 0 4 0 1 .4 5 4 5 40 2 .4 2 4 2 2 .4 0 4 0 16 3 .5 0 5 0 2 .4 2 4 2 42 3 .3 0 3 0 3 .5 0 5 0 2 .4 2 4 2
Order of requests
2 .4 2 4 2 1 .4 2 4 5 1 .1 2 1 2 2 .4 0 4 0 1 .2 2 2 2
d e a d li n e 2
d e a d li n e 1
Note: The simple function f does not take into consideration of the current direction of the head movement.
12
SCAN-EDF: Advantage
EDF: Not optimal with respect to disk movement. SCAN: Not taking deadline into account. SCAN-EDF: Having the benefits of both EDF and SCAN.
13
Admission Control
R e q u e s ts
A d m is s io n C o n t r o lle r
Video files
M UX
3 . . .
. . .
S c h e d u le r
n c o n c u rre n t s tre a m s
An admission controller determines whether a new client can be admitted for service without disturbing the clients being served. Once the client is admitted, its requirements must be satisfied during the course of service. After a new client is admitted, the scheduler schedules the client of when and how it is served.
14
Admission Criterion
Service time is the total time spent retrieving media blocks of currently served clients for one round. Round duration is the minimum playback duration among the currently served clients for a round. The admission criterion is:
Service _ time Round _ duration
R e q u e s ts
A d m is s io n C o n t r o lle r
V id e o file s
M U X
. . . . . .
S c h e d u le r
n c o n c u rre n t s tre a m s
15
16
- The continuity requirements of each client are not violated during the entire course of their playback.
- The media server is underutilized since the average time for retrieving a block is usually much lower than the worst case value.
18
Predicted_avg_retrieval_time
k Round_duration i i=1
19
Statistical Approach
Advantage:
The server resources are better utilized. As a result, throughput is significantly increased.
Disadvantages:
It does not provide absolute guarantee to the clients since the algorithm employs prediction.
There are overflow rounds. Several techniques can be applied to distribute the media loss among clients.
Disk Stripping
An effective way to distribute the workload evenly across n disks is to stripe video files across the disks in a round-robin fashion.
The entire aggregate bandwidth of disks is available to show the most popular movies.
Unpopular movies do not render the disks that store them underutilized. Multiple concurrent streams of a video to be supported without having to replicate the video.
21
Data Stream
Transmitted information is divided into individual units (packets). Transmission of a sequence of individual packets forms a data stream.
Examples:
Synchronous Transmission Mode: defines a maximum end-to-end delay for each packet of a data stream.
Needs a large temporary storage for packets arriving too early.
Iso-chronous Transmission Mode: defines, besides a maximum end-toend delay for each packet of a data stream, a minimum end-to-end delay.
The necessary storage of video data at the receiver can be significantly reduced. 23
Network-I/O Bottleneck
Traditional Data Processing
D a ta b a s e s e rv e r
D a ta F il t e r in g
D a ta b a s e
C o m m u n ic a ti o n n e tw o r k
N e tw o r k I / O S to r a g e I/ O ( b o ttle n e c k )
Multimedia Computing
C o m m u n i c a ti o n n e tw o r k
V id e o s e rv e r
V id e o f i le s
N e tw o r k I / O ( b o tt l e n e c k ) S to r a g e I / O
24
Types of Media
Discrete media (static media): Time is not part of the semantics of the media.
They may be displayed according to a wide variety of timing of even sequencing, and remain meaningful. Examples: text, graphics and images.
Continuous media (dynamic media): Time or more exactly time-dependency between information items, is part of the information itself.
If the timing is changed, or the sequencing of the items modified, the meaning is altered. Examples: sound or motion video.
Multimedia refers to a collection of media types used together. It implies that at least one media type is not text.
25
Video Streaming
At the video server
Each video i is associated with
Popularity (pi) between [0..1] Size (si) Playback rate (ri) such as 1.5Mbps for MPEG-1 video Data controller arranges data into packets and sends them out.
At the client
The client software must ensure that (i) the buffer is not empty; and (ii) the buffer is not overwritten. Negotiation must be done prior to the time the data is sent.
Receiver receives data from the remote server. The receiver acts as a producer
27
C o m m u n ic a ti o n n e tw o r k
V id e o s e rv e r
V id e o f i le s
N e tw o r k I / O ( b o tt l e n e c k ) S to r a g e I / O
Problems: Scalability
The bottleneck is due to the limitation of the server I/O bandwidth (min(disk I/O, com I/O)) and congestion of the network path to the server.
28
Performance Metrics
Goal: Minimize
Average service delay: Time since the
request is submitted to time the video playback can begin)
Unfairness (U)
U=
d
i =1
d av
m 1
m: number of videos
Average server load per request Average network load per request
29
30
Interactive Models[Shin98]
F a st F orw ard S to p R e w in d
2
1
P ause
1 P
3
1
P la y / R e s u m e
1 -P 9 P
F a st S e a rch
7
P 1
A b ort
S lo w M o t io n
Typically, these interactive requests are sent through a TCP connection (control channel). Video data is transmitted using UDP(User Datagram Protocol-connectionless broadcasting) packets (data channel).
31
Important Statistics
Zipf Distribution: If the videos are sorted
according to their access frequency, the access frequency of the video i (fi) is
c fi = i
Zipf factor ( ), = 0.729 is typical for video rental Poisson Distribution : exponential distribution, such as the number of telephone calls at a business or the number of accidents at an intersection
32
Utilize multicast
Adv: Reduce server I/O comm. bottleneck New problems: Challenge to support interactive services.
Utilize distributed public cooperative caches Adv: Reduce server I/O bottleneck,
reduce network load. Disadv: Expensive due to maintenance
34