You are on page 1of 5

A Hard Real-Time Tasks Model for the VBR Video Server 

Jae-Dong Lee
Department of Computer Science and Engineering
Kyungnam University, Korea
jdlee@eros.kyungnam.ac.kr

Abstract modeling the video server must supply data to


client(stream) at constant rate because it is assumed that a
At the design of the video server to service video data as stream consumes multimedia data at constant rate. But,
real-time, we must consider network bandwidth, buffer media data are encoded with VBR compression techniques
space and disk bandwidth. As buffer space and disk such as JPEG or MPEG standard, that is, the consumption
bandwidth affect each other tightly, they should be rate of streams varies at any time. Thus, CBR data
considered at the same time. In this paper, we propose the modeling makes system utilization low. There are earlier
hard real-time tasks’ model for the streams on the video works on the buffer management using VBR data
server. The stream on the server can be considered as the modeling but the use to retrieve data from the disk by
hard real-time task in that the server must guarantee the CBR-based, so it cannot make system effective[3, 4, 5, 6].
continuity of streams like the hard real-time system must At the design of the video server to service video data
guarantee the deadline of tasks. The management of as real-time, we must consider network bandwidth, buffer
streams in the server is induced from the scheduling of space and disk bandwidth. As buffer space and disk
real-time tasks. We propose hard read-time tasks models bandwidth affect each other tightly, they should be
for the video server and the scheduling algorithms for considered at the same time.
real-time tasks. The real-time scheduling algorithms are In this paper, we propose hard real-time tasks model for
used for admission control of streams, scheduling of disk, the streams on the video server. The stream on the server
and management of buffers in video server. We design the can be considered as the hard real-time tasks in that the
effective video server using the real-time tasks model. We server must guarantee the continuity of streams and the
evaluate the performance of our suggested video server hard real-time system guarantee the deadline of tasks. The
via a proper simulation. We show that our mechanism can management of streams in the server is induced from the
service more streams with a few buffers simultaneously. scheduling of real-time tasks. We propose hard read-time
tasks model for the video server and the scheduling
algorithms for real-time tasks. The real-time scheduling
algorithms are used for admission control of streams,
1. Introduction
scheduling of disk, and the management of buffer in video
server. We design the effective video server using the real-
The multimedia systems like VOD(Video on Demand)
time tasks model.
need much system resources and must be real-time system.
We evaluate the performance of our suggested video
As video and audio data require continuous real-time flow,
server via a proper simulation. We show that our
multimedia systems must guarantee the continuity of
mechanism can service more streams with a few buffers
streams.
simultaneously.
Typically, clients for a video service request video data
with a specified consumption rate. The video data is
retrieved from a video server and transported across a high 2. Hard Real-Time Task Model
bandwidth network to the clients’ display device to
playback video. In this section we describe a hard real-time task model
In this paper we propose a method for managing in order to design an efficient VBR video server. Each
streams with consideration of VBR(Variable Bit Rate) stream in the video server can be considered as a hard real-
characteristics. The previous works are based on time task in the hard real-time task model. Video data are
CBR(Constant Bit Rate) mainly [1, 2]. Using CBR data retrieved from disk on the video server in a cyclic fashion.
Data retrieved from disk are stored at buffer and are
playbacked at the client. Considering the behavior of video
This work was supported by Korea Research Foundation, 1998
server we can model the server as the following hard real- considering VBR characteristics the amount of consumed
time tasks model. data in a round may be different at every round.
We assume that the size of buffer in a server is Bmax and
ith round (i+1)th round (i+2)th round the processing speed of server is R. That is, when a task is
executed during t second the amount of produced data is
server
R*t. Each task has the following characteristics.

i) A task is nonpreemptive in each round.


S1S2 …. Sn S1S2 …..Sn S1 S2 …… Sn
ii) Let the execution time in jth (0 j li) round of ..
task Si be tij. The amount of data produced in jth
Figure 1: The processing of tasks(stream s) in each round is R*tij and the data are stored at buffer. After
round li+1 consecutive round the execution of Si is
finished.
iii) Let the amount of consumed data of Si at kth
..
(1 k Li) round be Cik and let Ci = ∑ C ik
Li

C lient Then, Ci is the total amount of datak = 1consumed for


B u ffer Si.
Disk
VBR Video
C lient iv) Hard s −1
real-times requirement For any s (1 s Li) ..
∑ t ij * R − ∑ C ij ≥ 0 ….. (Condition-1)
server C lient j=0 j =1

That is, the amount of data produced by a task is not


less than that consumed by the task. The amount of data


C lient produced by Si at 0th round is not less than that consumed
(a) by Si at 1th cycle. The amount of data produced by Si until
Client
..
kth(0 k li) round is not less than that consumed by Si
until kth round.
Buffer
li

Disk
Client v) ∑ t ij = C i / R
C om m un j=0
VBR
Video server -ication Client vi) C
max
i
= max C ik
1 ≤ k ≤ Li
Server
When the current round is jth round of Si , let t(Si) = t ij ,

i i
and
Client B ( S i ) = ∑ t ik * R − ∑ C ik
k=0 k =1
. .
(b)
t(Si) means time to need for execution of Si and B(Si)
means the buffer size to need for Si at the current round.
Figure 2: VBR video server
Thus, for all rounds the following requirements must be
satisfied.
We assume that there are n tasks (streams) in the server
and tasks are represented with S1, S2, .... Sn. Each task is .T
i) t(S1)+t(S2)+…. +t(Sn) ….(condition-2)

ii) B(S )+B(S )+…+B(S ).B


processed during several consecutive rounds and the
number of rounds for procession of task is dependent on 1 2 n max ….(condition-3)
the scheduling algorithm. A server processes tasks in a
cyclic fashion (Figure 1). The processing order of tasks For each stream(task) Si ,let the maximum buffer size
may be changed in each round. A round length is T1) and n for Si during all rounds B imax be . Then the
tasks are processed during T. Data are produced at following condition must be satisfied during all rounds.
execution of task and the amount of produced data is
iii) + B2 + B3 + .. + Bn ≤ Bmax ….(condition-4)
max max max max
proportional to the execution time. The data produced are B 1
stored at buffer and are consumed by client or
communication server like Figure 2. We assume that 3. H ard real-tim e task scheduling algorithm s
1) Let T’ be T plus (the delay time for disk access) in order to consider We need task scheduling algorithms under the
the seek time and latency time of disk. Then, we can think that T’ is a suggested model in section2 in order to design the video
cycle length and T is the time for actual execution of tasks
server. In this section we propose the CBR-based
algorithm and VBR-based algorithm, the problems in two ii) + + ..... + + ≤
max max max max
B 1 B 2 B n B n +1 B max
algorithms. We suggest the algorithm to recover the
= 2*C ,1 ≤ i ≤ n + 1
max max
problems. The algorithm for our suggested real-time tasks , where B i i

model must satisfy condition 1, 2, and 4 in section 2.


This algorithm makes the maximum buffer needed for a
3.1 Fixed Execution time Algorithm (FEA) task minimize, but it has all task be executed during Li
rounds and makes the idle time of server be large because
This is a scheduling algorithm that is CBR-based tasks are scheduled by assuming that the execution time of
algorithm for video server. This algorithm schedules tasks task at a round is an execution time at a round in worst
to have equal execution time at all rounds. To satisfy case. Thus, the processing time of server is wasted very
condition-1, for all j( 1 j Li)
max
.. much. The server must save the Cij for a round and
calculate tij at each round.
tij must be C i / R . Let ti be tij. At that time, the
li li
3.3 Hybrid Algorithm
B = R*∑ t −∑ C
max
ij ij
i
j=0 j =1

maximum buffer size needed for Si is following: An algorithm described in section 3.1 requires buffer
B imax is increased according to the degree of change excessively and that in section 3.2 wastes server’s
of Cij . B max is very large as compared with other processing time very much and must save many
algorithms. i information of tasks and must calculate execution time of
Assume that S1, S2, … , Sn are currently scheduled. To tasks at each round. In this section we propose a new
schedule Sn+1 the requirements which Sn+1 can be algorithm which is mixed two algorithms above and
scheduled at next round are following: complements problems.
i) n + 1 t i ≤ T In this algorithm the execution time function ti(x) of

task Si is determined previously, and a scheduling
.
i=1
n +1
ii) ∑ B max
≤ algorithm schedules tasks with function ti(x). Let ti(x), 1
.
i=1
i B max

x li, be the execution time of Si at xth round. In order to


As mentioned above this algorithm is simple. Also, as it satisfy condition-1 and minimize the buffer needed, the
makes each task have equal execution time during all following conditions must be satisfied.
cycles, the execution of task is finished early. Thus, the
s s +1
utilization of server can be increased because it can c1) R * ∑ t i ( k ) −
schedule waiting tasks to the idle time of server. But the k =0
∑C
k =1
ik ≥ 0 ,1 ≤ s ≤ Li −1
performance of server with the limited buffer is poor c2) ti(x) is an uniformly nondecreasing function.
because of excessive buffer requests.
c3) Determine ti(x) to minimize the following
3.2 Minimum Buffer Algorithm (MBA) equation :
,1 ≤ s ≤ Li − 1
s s +1
max ( R * ∑ ti ( k ) − ∑ C ik )
This is a scheduling algorithm that is VBR-based s k =0 k =1

algorithm for video server. This makes the buffer needed c1) is a condition for continuity of streams, c2) is a
minimize as it produces the data at each round as much as condition to reduce server’s idle time at each round and
tasks will be consumed at next round. c3) is a condition to reduce buffer size to need.
As tij is Cij/R , the execution time of task at each round Assume that S1, S2, … Sn are currently scheduled. To
is changed . B imax = 2 * C imax is sufficient for correct schedule Sn+1 the following conditions must be satisfied.
execution of Si. To schedule a new task into current
schedule of tasks, tij is assumed to at all rounds.
max
1) t1(r(S1)) + t2(r(S2))+…+ tn(r(Sn)) + tn+1 ≤ T
/ i
In other words, using this algorithm C makes the idle time of , where r(Si) is the current round number of
server be large. Even though the server is idle other task task Si which means the number of round
cannot be scheduled. If it schedule a task in an idle time for which Si was executed .
condition-1 may be violated. The scheduled tasks must be 2)
max
+
max
+ ..... +
max
+ B n +1 ≤
max

executed during Li rounds. B 1 B 2


max
B n B max
, where B i
is the value of
That is, li= Li. Assume that S1, S2, … Sn are currently s s +1
max ( R * ∑ ti ( k ) − ∑ C ik ) in c3).
scheduled. To schedule Sn+1 the following conditions must s k =0 k =1
be satisfied.
i) t 1 + t 2 + ..... + t n + t n + 1 ≤ T
max max max max

3.3.1 Linear Function Algorithm (LFA)


t i = C i / R ,1 ≤ i ≤ n + 1
max max
, where
It is difficult to find ti(x) function to satisfy c1), c2) and
c3). In this paper, we assume ti(x) is linear function and ž’©šž¦ž “¦——–£Y|“ª¥–Z
Ÿ––•–•

find ti(x) by enumeration method. As ti(x) is linear and caaaaa

nonincreasing function, we let ti(x) is ax+b and the value biaaaa

of a is negative. The value of b is obtained with ti(0), that bgaaaa wvr


~sr
beaaaa
is, b=Ci/R. }wr
bcaaaa
We can choose the value of a to satisfy c1) and c3) by
baaaaa
enumeration method.
iaaaa

gaaaa

4. Simulation eaaaa

caaaa

4.1 Simulation model a


ga gaa dgaa gaaa
¥ ¥’ ¡’ª“’”œ ¥šž–Y¤–”Z

To analyze the performance of algorithms we obtain the Figure 3: The maximum buffer size for a stream
buffer size needed and the number of streams serviced
simultaneously in each round by simulation with following ¥™ – Ÿ ¦ ž “ – £   — „ ¥£– ’ ž ¤

ef
parameters.
• The length of a round, T, is 1 second.
ea

• The consumption rate of a stream is uniformly


df

da
distributed between 20Kbyte/sec and 128K
cf
byte/sec.
• The maximum disk reading rate is
ca

bf
2000Kbyte/sec.
• The total playback time of a stream is four
ba w vr
~ sr

f }w r

case: 60 sec, 600 sec, 3600 sec and 6000 sec.


• We experiment at the cases that the buffer size
a
bg dc ge bci cfg fbc bace
~ ’ © “ ¦ ——– £Y ~ “ ª¥–Z

in server is 16, 32, 64, 128, 256, 512 and 1024


(a) total playback time = 60 sec
Mbyte.
• For each simulation run, 100 streams are ¥™– Ÿ ¦ž “–£  — „ ¥£–’ ž ¤

serviced. The results of simulation are average ea

of five trials. df

wvr
~sr
da
}wr

4.2 Simulation result cf

ca

4.2.1 Maximum buffer size


bf

Figure 3 shows the maximum buffer size needed for a ba

stream. In MBA algorithm which is based on VBR only f

2 * C imax buffer is needed. On the other hand, much a

bg dc ge bci cfg fbc bace

buffer are needed in FEA algorithm which is based on ~ ’ ©“ ¦——–£Y ~ “ª¥–Z

CBR. LFA algorithm suggested in our paper needs about a (b) total playback time = 600 sec
half of the buffer size needed in FCA.
¥™– Ÿ¦ž“–£  — „¥£–’ž¤

ea
4.2.2 T h e n u m b er of serviced stream s in a rou n d
df
wvr
~sr
Figure 4 shows the average number of serviced streams da
}wr

in a cycle on three algorithms. MBA services only a fixed cf

number of streams regardless of the total playback time of ca

streams and the buffer size in server. On the other hand, in bf

FEA and LFA the number of serviced streams is variant ba

with regard to the total playback time of streams and f

buffer size in server. Our algorithm, LFA, can service a


bg dc ge bci cfg fbc bace
more streams than other algorithms when the playing time ~’©“¦——–£Y~“ª¥–Z

of streams is short or the buffer size in server is large.


(c) total playback time=3600 sec
171, 1996.
[3] J.Gemmel and S.Christodoulakis, “Principles of Delay-
¥™ – Ÿ ¦ ž “ –£  — „ ¥£–’ ž ¤

df
Sensitive Multimedia Data Storage and Retrieval,” ACM
Trans. of Information Systems, Vol. 10, No. 1, pp. 51-90,
da

w vr
1992.
cf ~ sr [4] K.L. Wu and P.S. Yu, “Consumption-Based Buffer
}w r
Management for Maximizing System throughout of a
ca

Multimedia System”, Proc. of IEEE International


bf Conference on Multimedia Computing and Systems,
ba
pp.164-171, 1996.
[5] Y.S. Ryu and K. Koh, “A Dynamic Buffer Management
f
Technique for Minimizing the Necessary Buffer Space in a
a
continuous Media Server”, Proc. of IEEE ICMCS, pp.181-
bg dc ge bc i cf g fb c ba ce
~ ’ ©“ ¦ ——–£Y ~ “ ª¥–Z 185, 1996.
[6] K.O. Lee, and H.Y. Yeom,” An Effective Admission Control
(d) total playback time = 6000 sec Mechanism considering both Disk Bandwidth and Buffer
Size”, Journal of KISS, Vol. 24, No. 8, Aug., pp. 731-740,
Figure 4: The average number of serviced 1997
streams in a round [7] D. E. Wrege, E. W. Knightly, H. Zhang, and J.
Liebeherr,” Deterministic Delay Bounds for VBR
5. Conclusion and Future Works Video in Packed-Switching Networks: Fundamental
Limits and Practical Tradeoffs”, IEEE/ACM Tran. On
In this paper, we propose hard real-time tasks model for Networking, June 1996.
the streams on the VBR video server. The streams on the
server can be considered as the hard real-time tasks in that
the server must guarantee the continuity of streams and the
hard real-time system guarantee the deadline of tasks. The
management of streams in the server is induced from the
scheduling of real-time tasks. We propose hard read-time
tasks model for the video server and the scheduling
algorithms for real-time tasks. The real-time scheduling
algorithms are used for admission control of streams,
scheduling of disk, and the management of buffer in video
server. We design the effective video server using the real-
time tasks model. Also, our model can apply to VBR video
communication[7].
We evaluate the performance of our suggested video
server via a proper simulation. We show that our
mechanism can service more streams with a few buffers
simultaneously.
The future works are followings:
y The work for converting to discrete model.
yThe problem to find the proper function
reflecting VBR video characteristics well.
yThe work for interactive service processing using our
suggested model.

Reference
[1] H.J. Chen and T.D.C. Little, “Storage Allocation Policies for
Time-Dependent Multimedia Data, ” IEEE Trans. on
Knowledge and Data Engineering, Vol. 8, No. 5, pp.855-864,
1996
[2] Ghandeharizadeh, S.H. Kim, and C. Shahabi, “On
Configuring a Single Disk Continuous Media Server,” in
Proc. of ACM SIGMETRICS /ERFORMANCE Conf. On
Measurement and Modeling of Computer Systems, pp.164-

You might also like