Title: Alina Albu, m.a.albu@tue.nl
1Quality of Service for In-Home Digital Networks
PROGRESS PROJECT EES.5653
2Contents
- Summary work
- Terminal QoS
- Collaboration with MRM project
- Number of context switches estimation method
- Future work
3Summary work
- Literature survey on QoS work
- QoS overview and classification of QoS
improvement techniques internal report - Number of context switches estimation method
- 1st approach statistical approach
- 2nd approach min-max method
- 3rd approach average method
4Terminal QoS
- QoS determined by resource management of the
system in discussion - Terminal resources under investigation
- CPU,
- Memory,
- Bus
5Collaboration with MRM project
- Why MRM?
- QoS related closely to resource management.
- MRM is concerned with resources management
aspects in the context of a terminal. - MRM provides opportunities for inspiration,
validation of my work - Aim MRM
- provide methods and means for an integrated
approach to resource management in multi-resource
systems. - The integrated approach has to meet at least the
following requirements - The resource management infrastructure should be
able to provide resource guarantees to the
building blocks of application functionality. - Individual building blocks should be able to
limit or prevent resource insufficiencies, by
dealing with insufficient resources in a graceful
and predictable way.
6Collaboration with MRM project Rationale
- This leads to the need for developing methods for
estimating the necessary of resources for the
building blocks of application but also for
predicting resources necessary for the composed
execution of these blocks. - Why performance composition? - Just adding clock
cycles of the involved components wont do. - Method for the estimation of the number of
context switches occurring during the execution
of a streaming application. - Current experimentation setting
- HW Trimedia (TM 1300)
- incorporates a media processor for
high-performance multimedia applications that
deal with high-quality video and audio. - SW TSSA
7MRM project - TSSA
- TSSA TriMedia Streaming Software Architecture
8Reasons for context switch occurrence
- Blocking. The execution of a task blocks because
of the following reasons - o Communication with the PC host (ex
FRead) - o Unfavorable status of the queues
- - input full packets queue (IFPQ) is
empty (no input) - - output full packets queue (OFPQ) is
full (task cannot output packets for the
moment) - - output empty packets queue (OEPQ) is
empty (task cannot output packets for the
moment) - Preemption. The execution of a task is preempted
by another task with a higher priority. - Task execution end. The execution of a task with
high priority has ended (no preemption or
blocking) and the resources are allocated to
another task.
9NCS Estimation MethodProperties of streaming
applications executions
- Property1 Running streaming applications, after
an initialization phase, adopt a pattern of
execution that repeats after a specific interval
of time (hyperperiod). The repetitive execution
is caused by the differences in the components
rates of production/consumption of full/empty
packets. - Execution consists of 3 phases initialization,
stable-state, finalization - gt by knowing the NCS occuring during
initialization, finalization and during a
hyperperiod of the steady-state, we obtain the
total NCS - Property2 When one of the components in the
streaming chain is periodic, when other
components depend on it in execution, their tasks
will execute periodic.
10NCS Estimation Method Case study description
11NCS Estimation MethodSteps 1 4
initialization, finalization phases
- Step 1.
- Initialization phase
- End phase 169.261 ms
- Duration 169.261 ms
- Step 2.
- Initialization phase
- NCS_initializationPhase(FRead) 26
- NCS_initializationPhase (VDec) 22
- NCS_initializationPhase (VRendVO) 6
- Step 3.
- Finalization phase
- Beginning phase 4539.029 ms
- Duration 1569.428 ms
- Step 4.
- Finalization phase
- NCS_finalizationPhase(FRead) 8
- NCS_finalizationPhase(VDec) 356
- NCS_finalizationPhase(VRendVO) 94
12NCS Estimation Method Steps 5 6 stable-state
phase, production/consumption rates
- Step 5.
- Stable state
- Beginning phase 169.261 ms
- End phase 4539.029 ms
- Duration4369.768 ms
- Step 6.
- Identify for each component the full packets
production rate (FPPR), the full packets
consumption rate (FPCR), and the empty packets
production rate (EPPR). - Priority FPPR FPCR EPPR T
AT CT CEPT (ms) - FRead 90 2.2
2.524 - Vdec 70 4.6 17.9
4.5 2 - VrendVO 80 16.3
16.3
0.056 32.6 - - measurements of components rates and
computation times in isolation.
13NCS Estimation Method Steps 5 6 stable-state
phase, production/consumption rates
- Step 5.
- Stable state
- Beginning phase 169.261 ms
- End phase 4539.029 ms
- Duration4369.768 ms
- Step 6.
- Identify for each component the full packets
production rate (FPPR), the full packets
consumption rate (FPCR), and the empty packets
production rate (EPPR). - Priority FPPR FPCR EPPR
T AT CT CEPT (ms) - FRead 90 2.2
2.524 - Vdec 70 4.6 17.9
4.5 2 - VrendVO 80 16.3
2FPPR(VO) 16.3
0.056 32.6
14NCS Estimation Method Steps 5 6 stable-state
phase, production/consumption rates
- Step 5.
- Stable state
- Beginning phase 169.261 ms
- End phase 4539.029 ms
- Duration4369.768 ms
- Step 6.
- Identify for each component the full packets
production rate (FPPR), the full packets
consumption rate (FPCR), and the empty packets
production rate (EPPR). - Priority FPPR FPCR EPPR
T AT CT CEPT (ms) - FRead 90 2.2
2.524 - Vdec 70 4.6 17.9
4.5 2 - VrendVO 80 16.3
2FPPR(VO) 2FPPR(VO) 16.3
0.056 32.6
15NCS Estimation Method Steps 5 6 stable-state
phase, production/consumption rates
- Step 5.
- Stable state
- Beginning phase 169.261 ms
- End phase 4539.029 ms
- Duration4369.768 ms
- Step 6.
- Identify for each component the full packets
production rate (FPPR), the full packets
consumption rate (FPCR), and the empty packets
production rate (EPPR). - Priority FPPR FPCR EPPR
T AT CT
CEPT(ms) - FRead 90 2.2
2.524 - Vdec 70 4.6 17.9
4FPPR(VDec)
4.5 2 - VrendVO 80 16.3
2FPPR(VO) 2FPPR(VO) 16.3
0.056 32.6
16NCS Estimation Method Steps 5 6 stable-state
phase, production/consumption rates
- Step 5.
- Stable state
- Beginning phase 169.261 ms
- End phase 4539.029 ms
- Duration4369.768 ms
- Step 6.
- Identify for each component the full packets
production rate (FPPR), the full packets
consumption rate (FPCR), and the empty packets
production rate (EPPR). - Priority FPPR FPCR EPPR
T AT CT
CEPT(ms) - FRead 90 2.2 -
-
2.524 - - Vdec 70 4.6 17.9
4FPPR(VDec)
4.5 2 - VrendVO 80 16.3
2FPPR(VO) 2FPPR(VO) 16.3
0.056 32.6
17NCS Estimation Method Step 7 dependencies
between components
- Step 7
- a - Determine the dependencies in the execution
of the components by taking into consideration
FPPR, FPCR and EPPR for each component. - b - Determining the dependencies in the
execution of the components, leads to determining
the period (T(Ti)) of each task Ti on which the
components Ci are mapped. - VDec
- a - FPPR (VDec) gt FPCR (VRendVO) (gt rate
higher) gt OFPQ (VDec) at stable state is full gt
OEPQ (VDec) is empty gt VDec depends on VRendVO
to produce 1 EP so that VDec can produce 1 FP gt -
- FPPR (VDec) EPPR (VRendVO) 2
FPPR(VrendVO) 2 T(VrendVO) 32.6 ms. - gt
-
- b - Since T(Vdec) FPPR(VDec) gt T(Vdec) 32.6
ms
18NCS Estimation Method Step 7 dependencies
between components
- Step 7
- a - Determine the dependencies in the execution
of the components by taking into consideration
FPPR, FPCR and EPPR for each component. - b - Determining the dependencies in the
execution of the components, leads to determining
the period (T(Ti)) of each task Ti on which the
components Ci are mapped. - FRead
- a FPPR (FRead) gt FPCR (VDec) (gt rate higher)
gt OFPQ (FRead) at stable state is full gt OEPQ
(FRead) is empty gt FRead depends on VDec to
produce 1 EP so that FRead can produce 1 FP gt -
- FPPR (FRead) EPPR (VDec) 4
FPPR(VDec) 4 T(VDec) 42T(VrendVO)
130.4 ms - gt
-
- b - Since T(FRead) FPPR(FRead) gt T(FRead)
130.4 ms
19NCS Estimation Method Step 7 dependencies
between components
- Step 7
- Priority FPPR FPCR EPPR
T AT CT
CEPT(ms) - FRead 90 2.2 -
-
2.524 - - Vdec 70 4.6 17.9
4FPPR(VDec)
4.5 2 - VrendVO 80 16.3
2FPPR(VO) 2FPPR(VO) 16.3
0.056 32.6 -
20NCS Estimation Method Step 7 dependencies
between components
- Step 7
- Priority FPPR FPCR EPPR T
AT CT CEPT (ms) - FRead 90 2.2 -
-
2.524 - - Vdec 70 4.6 17.9
130.4
4.5 2 - VrendVO 80 16.3 32.6
32.6 16.3
0.056 32.6
21NCS Estimation Method Step 7 dependencies
between components
- Step 7
-
- Priority FPPR FPCR EPPR T
AT CT CEPT (ms) - FRead 90 130.4 -
-
2.524 - - Vdec 70 32.6 17.9
130.4
4.5 2 - VrendVO 80 16.3 32.6
32.6 16.3
0.056 32.6
22NCS Estimation Method Step 7 dependencies
between components
- Step 7
- Priority FPPR FPCR EPPR T
AT CT CEPT (ms) - FRead 90 130.4 -
- 130.4
2.524 - - Vdec 70 32.6 17.9
130.4 32.6
4.5 2 - VrendVO 80 16.3 32.6
32.6 16.3
0.056 32.6
23NCS Estimation Method Step 8 hyperperiod
length, number of hyperperiods
- Step 8.
- Identify hyperperiod length.
- CIS (component index set) the set of natural
numbers that serve as indexes for components - in a streaming chain. The indexes of components
will be equal with the indexes of the tasks on - which the components are mapped at execution.
- HL max T(Ti) 8 T(VRendVO) 130.4 ms
- i?CIS
-
- Duration stable phase 4369.768 ms
-
- gt average number of hyperperiods during stable
phase -
- HN ?Duration_stableStatePhase/HL?
?4369.768/HL? ?4369.768/130.4? 34
24NCS Estimation Method Step 9 NCS due to
blocking
- Step 9.
-
- Determine the NCS due to blocking.
-
- FRead
-
- FRead blocks 4 times for each packet that it
delivers due to communication with the PC host
and has its period equal with the hyperperiod
(because it only gets to deliveres 1 full packet
during the hyperperiod after which it blocks
until the next hyperperiod) gt -
- NCS_blocking(FRead) ?HL / T(Ti)?
NCS_inherentBlocking(FRead) 1 4 5
25NCS Estimation Method Step 9 NCS due to
blocking
- Step 9.
-
- VDec
- VDec delivers 1 full packet every time it
is activated after which it is blocked. - VDec is activated periodically and that
its period fits 4 time during the hyperperiod gt - VDec is activated 4 times during the
hyperperiod gt VDec is blocked 4 times during
the hyperperiod. -
- NCS_blocking(VDec) ?HL / T(Ti)?
NCS_inherentBlocking(VDec) ?HL / T(VDEc)? 0 -
?8T(VRendVO) / 2T(VRendVO)? - 4
-
- VRendVO
- VRendVO is the component that does not depend on
any other component in its execution, and has no
inherent blockings gt it does not block. -
- NCS_blocking(VRendVO) 0
26NCS Estimation Method Step 10 NCS due to
normal execution end.
- Step 10.
-
- Determine the NCS due to normal execution.
-
- Applies only to components that are not preempted
and do not depend on any other component in its
execution, thus do not get blocked. -
- gt Applies only to VRendVO
-
- NCS_normalExecutionEnd(VRendVO) ?HL /
T(VRendVO)? -
?8T(VRendVO) / T(VRendVO)? -
8 -
27NCS Estimation Method Step 11 Task activation
time (AT)
- Step 11.
- For each component by considering the
dependencies dictated by the rates of
production/consumption packets, calculate the
first AT in the hyperperiod. - In general For each component Ci mapped on task
Ti - 1. If ? j ? CIS Ci dependent on Cj
-
- If P(Ti) lt P(Tj) AT(Ti) AT(Tj) (N-1)
FPPR(Tj) CT(Tj) if Ti depends on Tj to
release N FP. - (N-1) EPPR(Tj) CT(Tj) if Ti depends on
Tj to release N EP.
N4
CT
28NCS Estimation Method Step 11 Task activation
time (AT)
- If P(Ti) gt P(Tj) AT(Ti) AT(Tj) CFPT(Tj)
(N-1) FPPR(Tj) if Ti depends on Tj to release
N FP.
- CEPT(Tj) (N-1) EPPR(Tj)
if Ti depends on Tj to release
N EP.
29NCS Estimation Method Step 11 Task activation
time (AT)
- For the current case study
- FRead FRead dependent on Vdec to release 1 EP
gt -
- P(FRead) gt P(VDec) gt AT(FRead) AT(VDec)
(1-1)EPPR(Vdec) CEPT (VDec) -
AT(VDec) CEPT(VDec) -
AT(VDec) 2ms. - Vdec Vdec dependent on VRendVO to release 1 EP
gt -
- P(VRendVO) gt P(VDec) gt
- AT(VDec) AT(VRendVO) (1-1)EPPR(VRendVO) CT
(VRendVO) - AT(VRendVO) CT (VRendVO)
- AT(VRendVO) 0.056 ms.
- 0.056 ms
-
- First AT(VRendVO) 0 relative to the beginning
of the hyperperiod. -
- gt AT(FRead) 0.056 ms 2 ms 2.056 ms
30NCS Estimation Method Step 11 Task activation
time (AT)
- Step 11
- Priority FPPR FPCR EPPR T
AT CT CEPT (ms) - FRead 90 130.4 -
- 130.4
2.524 - - Vdec 70 32.6 17.9
130.4 32.6
4.5 2 - VrendVO 80 16.3 32.6
32.6 16.3
0.056 32.6
31NCS Estimation Method Step 11 Task activation
time (AT)
- Step 11
- Priority FPPR FPCR EPPR T
AT CT CEPT (ms) - FRead 90 130.4 -
- 130.4 2.056 2.524
- - Vdec 70 32.6 17.9
130.4 32.6 0.056 4.5
2 - VrendVO 80 16.3 32.6
32.6 16.3 0
0.056 32.6
32NCS Estimation Method Task response time, NCS
due to preemptions
- P(Ti) gt P(Tj) ? AT(Ti) ? (AT(Tj), AT(Tj)
CT(Tj)) gt Ti preempts Tj.
AT(Tj)
CT(Tj)
R0(Tj) CT(Tj)
33NCS Estimation Method Task response time, NCS
due to preemptions
- P(Ti) gt P(Tj) ? AT(Ti) ? (AT(Tj), AT(Tj)
CT(Tj)) gt Ti preempts Tj.
CT(Ti)
AT(Tj)
AT(Ti)
R1(Tj) Ro(Tj)CT(Ti)
34NCS Estimation Method Task response time, NCS
due to preemptions
- P(Ti) gt P(Tj) ? AT(Ti) ? (AT(Tj), AT(Tj)
CT(Tj)) gt Ti preempts Tj.
T(Ti)
CT(Ti)
AT(Tj)
AT(Ti)
AT(Ti)
R1(Tj) Ro(Tj)2CT(Ti)
35NCS Estimation Method Task response time, NCS
due to preemptions
- P(Ti) gt P(Tj) ? AT(Ti) ? (AT(Tj), AT(Tj)
CT(Tj)) gt Ti preempts Tj. - NCS_preemption(Tj) ?Ro (Tj)/T(Ti)?
- R1(Tj) NCS_preemption(Tj)CT(Ti)
T(Ti)
CT(Ti)
AT(Tj)
AT(Ti)
AT(Ti)
R1(Tj) Ro(Tj)3CT(Ti)
AT(Ti)
36NCS Estimation Method Step 12Task response
time, NCS due to preemptions
- Step 12
- Calculate NCS_preemption for all components
- In general
- Rn(Ti) Rn-1 (Ti) ? ?Rn-1
(Ti)/T(Tj)? CT(Tj),
j ? k? CIS P(Tk) gt P(Ti) ? AT(Tk)
? (AT(Ti), AT(Ti) CT(Ti)) -
- where Ro initial response time, Ro(Ti)
CT(Ti) - From here, the total number of context switches
due to preemptions will be -
-
- NCS_preemption(Ti) ? ?Rn-1
(Ti)/Tj? - j ? k? CIS
P(Tk) gt P(Ti) ? AT(Tk) ? (AT(Ti), AT(Ti)
CT(Ti)) -
37NCS Estimation Method Step 12Task response
time, NCS due to preemptions
- Step 12 For the current case study
- FRead FRead has he highest priority assigned gt
never preempted. - gt NCS(FRead)_preemption 0
- VDec
- P(VRendVO) gt P(VDec)
- AT(VRendVO), AT(VRendVO) ? (AT(VDec), AT(VDec)
CT(VDec)) - gt VrendVO does not preempt VDec.
- P(FRead) gt P(VDec)
- AT(FRead), AT(FRead) ? (AT(VDec), AT(VDec)
CT(VDec)) gt FRead preempts VDec - NCS_preemption (VDec) 5
- VRendVO
- P(FRead) gt P(VRendVO)
- AT(FRead), AT(FRead) ? (AT(VRendVO), AT(VRendVO)
CT(VRendVO)) - gt FRead does not preempt VRendVO.
- gt NCS_preemption(VRendVO)0
38NCS Estimation Method Step 12Task response
time, NCS due to preemptions
- Step 12
- For the current case study
- FRead FRead has he highest priority assigned gt
never preempted. - gt NCS(FRead)_preemption 0
- FRead - hybrid task that due to dependencies in
execution activated every 130.4 ms. After
activation it runs blocks 4 times /packet due to
the communication with the PC host. - The activation and blocking times after the first
activation are the following -
- AT(FRead)1 CT1 0.121 ms , BT1 0.577 ms
- AT(FRead)2 CT2 0.152 ms, BT2 0.499 ms
- AT(FRead)3 CT3 0.081 ms, BT3 0.126 ms
- AT(FRead)4 CT4 0.09 ms, BT4 0.774 ms
- AT(FRead)5 CT5 0.104 ms,
-
- ð CT(FRead) ?CTi ?BTi 2.524 ms
39NCS Estimation Method Step 12Task response
time, NCS due to preemptions
- VDec
- P(VRendVO) gt P(VDec)
- AT(VRendVO), AT(VRendVO) ? (AT(VDec), AT(VDec)
CT(VDec)) - gt VrendVO does not preempt VDec.
- FRead - hybrid task gt each of its 5
internal/inherent activations per period due to
the - communication with the PC host will be treated as
independent tasks FRead1, FRead2, , - FRead5. The 5 tasks have the same period
130.4 ms 8T(VRendVO) and have equal - priorities with the priority assigned to FRead.
- P(FRead) gt P(VDec)
- ? AT(FRead), AT(FRead) ? (AT(VDec), AT(VDec)
CT(VDec)) gt FRead preempts VDec
40NCS Estimation Method Step 12Task response
time, NCS due to preemptions
- Ro CT(VDec), Ro initial response time of
VDec - NCS_preemption(VDec)1 ?Ro
(VDec)/T(FRead1)? ?4.5 / 130.4? 1 - R1 Ro ?Ro (VDec)/T(FRead1) ?
CT(FRead1) 4.5 1 0.121 4.621 ms -
- NCS_preemption(VDec)2 ?R1
(VDec)/T(FRead2)? ?4.621 / 130.4? 1 - R2 R1 ?R1 (VDec)/T(FRead2) ? CT(FRead2)
4.773 -
- NCS_preemption(VDec)3 ?R2
(VDec)/T(FRead3)? ?4.773 / 130.4? 1 - R3 R2 ?R2 (VDec)/T(FRead3) ? CT(FRead3)
4.854 ms -
- NCS_preemption(VDec)4 ?R3
(VDec)/T(FRead4)? ?4.854 / 130.4? 1 - R4 R3 ?R3 (VDec)/T(FRead4) ? CT(FRead4)
4.944 ms - NCS_preemption(VDec)5 ?R4
(VDec)/T(FRead5)? ?4.944 / 130.4? 1 - ð the 5 tasks that compose the FRead hybrid
task preempt VDec each 1 time gt - ð NCS_preemption (VDec) 5
41NCS Estimation Method Step 12Task response
time, NCS due to preemptions
- VRendVO
- P(FRead) gt P(VRendVO)
- AT(FRead), AT(FRead) ? (AT(VRendVO), AT(VRendVO)
CT(VRendVO)) - gt FRead does not preempt VRendVO.
- gt NCS_preemption(VRendVO)0
42NCS Estimation Method Step 13 Total
NCS/hyperperiod
- Step 13
- Determine NCS_total for each of the components
involved -
- For each hyperperiod
- NCS_total(Ci) NCS_blocking(Ci)
NCS_preemption(Ci) NCS_normalExecutionEnd(Ci) - gt Total NCS/hyperperiod
-
- NCS_hyperperiod (FRead) NCS_blocking(FRead)
NCS_preemption(FRead) 5 05 - NCS_hyperperiod (VDec) NCS_blocking (VDec)
NCS_preemption (VDec) 5 4 9 - NCS_hyperperiod (VRendVO) NCS_blocking VRendVO)
NCS_preemption (VRendVO)
NCS_normalExecutionEnd(VRe
ndVO) 0 0 8 8 -
43NCS Estimation Method Step 14 Total NCS
- Step 14
-
- Determine the total NCS during the entire
execution of the streaming application. -
- We know that the average number of hyperperiods
during stable phase HN 34 (from step 8) -
- gt Total estimated NCS
-
- NCS_total(FRead) 534 26 8 204
vs measured 207 - NCS_total (VDec) 934 22 356 684
vs measured 679 - NCS_total (VRendVO) 834 6 94 372
vs measured 362 -
- Note Differences come from the fact that we work
with averages in the components models which
determines an average length for the hyperperiod
and an average number of hyperperiods.
44Future work
- Test method on more complex, realistic case
studies - Write paper describing the aforementioned
findings - Extend estimation method for applications
containing multiple dependent/independent chains. - Continue studies to finding ways to estimate the
necessary of memory and bus for streaming
applications. - Continue studies on estimating necessary of
resources streaming applications running on
multiple processors platforms.