29.01.2015 Views

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

Embedded Software for SoC - Grupo de Mecatrônica EESC/USP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

20 Chapter 2<br />

Table 2-2.<br />

RTOS functions timing.<br />

RTOS functions<br />

Measured time<br />

value scratchpad<br />

Measured time<br />

value w/ cache<br />

Measured time<br />

value w/o cache<br />

ActivateTask pre<br />

A act<br />

B act<br />

C act<br />

Task pre<br />

TerminateTask pre<br />

A term<br />

B term<br />

C term<br />

TerminateTask post<br />

that with proper RTOS characterization‚ it is possible to obtain tight conservative<br />

bounds on RTOS overhead during task response time analysis.<br />

Columns two and three in Table 2-2 show that the I-cache improved the<br />

per<strong>for</strong>mance of some of the RTOS functions. This will also be consi<strong>de</strong>red in<br />

the following section.<br />

5.3. Single and networked ECU analysis<br />

Single ECU analysis <strong>de</strong>termines response times‚ and consequently schedulability<br />

<strong>for</strong> all tasks running on the ECU. It builds upon single-process timing<br />

(Section 5.1) and RTOS timing results (Section 5.2). On top of that‚ it consi<strong>de</strong>rs<br />

task-activation patterns and the scheduling strategy.<br />

Our example system consists of three periodically activated tasks without<br />

data-<strong>de</strong>pen<strong>de</strong>ncies. The tasks are scheduled by a fixed-priority scheduler and<br />

each task’s <strong>de</strong>adline is equal to its period. Such a system can be analyzed<br />

using the static-priority preemptive analysis which was <strong>de</strong>veloped by Liu and<br />

Layland [10] and exten<strong>de</strong>d in [16] to account <strong>for</strong> exclusive-resource access<br />

arbitration. Additionally‚ we have to consi<strong>de</strong>r the RTOS overhead as explained<br />

in the previous section. A snapshot of the possible behavior of our system is<br />

shown in Figure 2-3.<br />

During analysis‚ we can account <strong>for</strong> the high priority level of the X act and<br />

Activate Task pre functions by treating them as in<strong>de</strong>pen<strong>de</strong>nt periodic tasks<br />

at a very high priority level. The X term function corresponding to the current<br />

task will not influence the task response time. However‚ if a higher priority<br />

task interrupts a running task then the preemption time inclu<strong>de</strong>s also the<br />

execution time of the X term function that corresponds to the preempting<br />

task. Task pre is ad<strong>de</strong>d to the process core execution time‚ and Terminate<br />

Task pre and Terminate Task post to the execution time of the X term<br />

function. We extend the analysis of [10] to capture this behavior and obtain<br />

the worst case task response time.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!