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.

444 Chapter 32<br />

required block is being streamed. The worst case suspension time occurs when<br />

the block is not in memory; in this case the suspension time is the time to<br />

load the entire block which inclu<strong>de</strong>s the transmission time and processing time<br />

of the streamed block. The best case occurs when the block is already in<br />

memory. There<strong>for</strong>e, the suspension time is between zero and the time to load<br />

the whole block. Application suspension time is proportional to the streamed<br />

block size. The application <strong>de</strong>veloper can vary the block size to obtain an<br />

acceptable application suspension time if a block miss occurs while avoiding<br />

multiple block misses.<br />

For applications involving many interactions, low suspension <strong>de</strong>lay is very<br />

crucial. While the application is suspen<strong>de</strong>d, it cannot interact with the<br />

environment or the user. Response time can be used as a gui<strong>de</strong>line <strong>for</strong> application<br />

suspension time since the application should not be suspen<strong>de</strong>d longer<br />

than response time. A response time which is less than 0.1 seconds after the<br />

action is consi<strong>de</strong>red to be almost instantaneous <strong>for</strong> user interactive applications<br />

[13]. There<strong>for</strong>e, if the application suspension time is less than 0.1<br />

seconds, the per<strong>for</strong>mance of the stream-enabled application should be acceptable<br />

<strong>for</strong> most user interactive applications when block misses occur.<br />

4.2. Per<strong>for</strong>mance enhancements<br />

4.2.1. Background streaming<br />

In some scenarios, it may be a better solution if the application can run without<br />

interruption due to missing co<strong>de</strong>. By allowing the components or blocks to<br />

be transmitted in the background (background streaming) while the application<br />

is running, nee<strong>de</strong>d co<strong>de</strong> may appear in memory prior to being nee<strong>de</strong>d.<br />

As a result, execution <strong>de</strong>lay due to co<strong>de</strong> misses is reduced. The background<br />

streaming process is only responsible <strong>for</strong> downloading the blocks and does<br />

not modify any co<strong>de</strong>.<br />

4.2.2. On-<strong>de</strong>mand streaming<br />

In some cases where bandwidth and memory are scarce resources, background<br />

streaming may not be suitable. Certain co<strong>de</strong> blocks may not be nee<strong>de</strong>d by<br />

the application in a certain mo<strong>de</strong>. For example, the application might use only<br />

one filter in a certain mo<strong>de</strong> of operation. Memory usage is minimized when<br />

a co<strong>de</strong> block is downloa<strong>de</strong>d on-<strong>de</strong>mand, i.e., only when the application needs<br />

to use the co<strong>de</strong> block. While downloading the requested co<strong>de</strong>, the application<br />

will be suspen<strong>de</strong>d. In a multitasking environment, the block request<br />

system call will put the current task in the I/O wait queue and the RTOS may<br />

switch to run other ready tasks. On-<strong>de</strong>mand streaming allows the user to tra<strong>de</strong><br />

off between resources and response times

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

Saved successfully!

Ooh no, something went wrong!