The aim in the design of the proposed environment is to supply the
streams with enough data to ensure that the playback processes do not starve.
We consider a new
periodic task-oriented model that
employs a periodic-based service discipline which provides the required
service rate to a continuous media application independent of traffic
characteristics of other applications.
We view every different multimedia stream si as a periodic task
with period Ti. At the media server level, the periodic task
requires
in each period the retrieval of a number of media blocks from disk and
transmits them to the client for presentation.
Ci is the deterministic disk access time that task
requires in every period to retrieve data for the stream.
The period Ti and the computational requirements Ci of every task are
determined by
the desired QoS of the stream that the task represents (i.e. the temporal
and spatial resolutions of the continuous media) as well as system resources
(processor speed, disk access time).
We assume also that a circular buffer of size 2*
is reserved in the buffer cache of both the server and the client site
for every stream of the application.
If we can supply these buffers with enough data then we can ensure
that the presentation of each stream
will have sufficient data to display the corresponding stream continuously.
In order to achieve this goal, the next procedure is followed.
We define the display rate (
)
for each stream si as
the rate at which data are consumed from the buffer of the client for
presentation purposes. The value of this atribute can be calculated
for the video streams using the equation:
display_ratei = spatial_resolutioni(pixels/frame) *
color_resolutioni(bits/pixel) *
temporal_resolutioni(frames/sec)
and for audio streams using the equation:
display_ratei=sample_sizei(bits/sample)*
sample_ratei(samples/sec).
Then, we require the following equalities to hold:
Using the above two equations 1 and 2 we can compute the period Ti and the data retrieval duration Ci of the tasks, provided that the expected quality of presentation, the buffer size allocated for every task and the data transfer rate of the disk are known.
In the proposed model, a scheduling strategy should be supported
at the media server to provide predictable service to a set of multimedia
streams, and this strategy consists the most important part of the
runtime environment.
Several algorithms are suitable to schedule this
set of tasks under these assuptions; the most relevant ones are Earliest Deadline First (EDF) and Rate Monotonic
Scheduling (RMS) [2] algorithms.
The RMS theory provides the following simple
inequality that serves as a sufficient condition to ensure that all tasks
will compute their work by the end of their periods:
| (4) |