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.

Hardware and <strong>Software</strong> Partitioning of Operating Systems 203<br />

Table 15-1. Average-case simulation results of the example.<br />

Total execution time<br />

Pure SW*<br />

With <strong>SoC</strong>LC<br />

With RTU<br />

6 tasks<br />

(in cycles)<br />

Reduction<br />

(in cycles)<br />

Reduction<br />

100398<br />

0%<br />

379400<br />

0%<br />

71365<br />

29%<br />

317916<br />

16%<br />

67038<br />

33%<br />

279480<br />

26%<br />

30 tasks<br />

* Semaphores are used in pure software while a hardware mechanism is used in <strong>SoC</strong>LC and<br />

RTU.<br />

the RTU system achieves a 33% reduction over case (i) in the total execution<br />

time of the 6-task database application. On the other hand, the <strong>SoC</strong>LC system<br />

showed a 29% reduction over case (i). We also simulated these systems with<br />

a 30-task database application, where the RTU system and the <strong>SoC</strong>LC system<br />

showed 26% and 16% reductions, respectively, compared to the pure software<br />

RTOS system of case (i). The reason why smaller execution time reductions<br />

are seen when comparing to the pure software system in the 30-task case is<br />

that, when compared to the 6-task case, software <strong>for</strong> the 30-task case was able<br />

to take much more advantage of the caches.<br />

In or<strong>de</strong>r to gain some insight to explain the per<strong>for</strong>mance differences<br />

observed, we looked in more <strong>de</strong>tail at the different scenarios and RTOS<br />

interactions. Table 15-2 shows the total number of interactions including<br />

sema-phore interactions and context switches while executing the applications.<br />

Table 15-3 shows in which of three broad areas – communication using<br />

the bus, context switching and computation – PEs have spent their clock<br />

cycles. The numbers <strong>for</strong> communication shown in Table 15-3 indicate the time<br />

period between just be<strong>for</strong>e posting a semaphore and just after acquiring the<br />

semaphore in a task that waits the semaphore and has the highest priority <strong>for</strong><br />

the semaphore. For example, if Task 1 in PE1 releases a semaphore <strong>for</strong><br />

Table 15-2. Number of interactions.<br />

Times<br />

Number of semaphore interactions<br />

Number of context switches<br />

Number of short locks<br />

6 tasks<br />

12<br />

3<br />

10<br />

30 tasks<br />

60<br />

30<br />

58<br />

Table 15-3. Average time spent on (6 task case).<br />

Cycles<br />

Pure SW<br />

With <strong>SoC</strong>LC<br />

With RTU<br />

Communication<br />

Context switch<br />

Computation<br />

18944<br />

3218<br />

8523<br />

3730<br />

3231<br />

8577<br />

2075<br />

2835<br />

8421

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

Saved successfully!

Ooh no, something went wrong!