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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Software</strong> Streaming Via Block Streaming 437<br />

classes used by the applet. Java class files can be downloa<strong>de</strong>d on-<strong>de</strong>mand<br />

from the server. If a Java class is not available to the Java Virtual Machine<br />

(JVM) when an executing applet attempts to invoke the class functionality,<br />

the JVM may dynamically retrieve the class file from the server [2, 3]. In<br />

theory, this method may work well <strong>for</strong> small classes. The application load<br />

time should be reduced, and the user should be able to interact with the<br />

application rather quickly. In practice, however, Web browsers make quite a<br />

few connections to retrieve class files. HTTP/1.0, which is used by most Web<br />

servers [4], allows one request (e.g., <strong>for</strong> a class file) per connection. There<strong>for</strong>e,<br />

if many class files are nee<strong>de</strong>d, many requests must be ma<strong>de</strong>, resulting in large<br />

communication overhead. The number of requests (thus, connections) ma<strong>de</strong><br />

can be reduced by bundling and compressing class files into one file [5], which<br />

in turn un<strong>for</strong>tunately can increase the application load time. While the<br />

transition to persistent connections in HTTP/1.1 may improve the per<strong>for</strong>mance<br />

<strong>for</strong> the applet having many class files by allowing requests and responses to<br />

be pipelined [6], the server does not send the subsequent java class files<br />

without a request from the client. The JVM does not request class files not<br />

yet referenced by a class. There<strong>for</strong>e, when a class is missing, the Java applet<br />

must be suspen<strong>de</strong>d. For a complex application, the class size may be large,<br />

which requires a long download time. As a result, the application load time<br />

is also long, a problem avoi<strong>de</strong>d by the block streaming method in which the<br />

application can start running as soon as the first executable block is loa<strong>de</strong>d<br />

into memory (the next section will <strong>de</strong>scribe block streaming in <strong>de</strong>tail).<br />

Huneycutt et al. [7] propose a method to solve an extreme case of limited<br />

resource issues <strong>for</strong> networked embed<strong>de</strong>d <strong>de</strong>vices such as distributed sensors<br />

and cell phones by implementing software caching. In this system, the memory<br />

on the <strong>de</strong>vice acts as cache <strong>for</strong> a more powerful server. The server sends a<br />

section of instructions or data to the <strong>de</strong>vice. When the <strong>de</strong>vice requires co<strong>de</strong><br />

outsi<strong>de</strong> the section, a software cache miss occurs. The server is then requested<br />

to send the nee<strong>de</strong>d co<strong>de</strong>. Dynamic binary rewriting is required to properly<br />

supply the co<strong>de</strong> to the <strong>de</strong>vice which incurs time overheads of at least 19%<br />

compared to no caching [7]. The program will also suffer from suspension<br />

<strong>de</strong>lay if the software cache miss constantly occurs. Our method allows<br />

software co<strong>de</strong> to be streamed in the background which may reduce software<br />

suspension due to co<strong>de</strong> misses.<br />

Raz, Volk and Melamed [8] <strong>de</strong>scribe a method to solve long load-time<br />

<strong>de</strong>lays by dividing the application software into a set of modules. For example,<br />

a Java applet is composed of Java classes. Once the initial module is loa<strong>de</strong>d,<br />

the application can be executed while additional modules are streamed in the<br />

background. The transmission time is reduced by substituting various co<strong>de</strong><br />

procedures with shortened streaming stub procedures, which will be replaced<br />

once the module is downloa<strong>de</strong>d. Since software <strong>de</strong>livery size varies from one<br />

module to another, predicting suspension time may be difficult. However, in<br />

block streaming, this issue (unpredictable suspension time) can be avoi<strong>de</strong>d by<br />

streaming fixed-size blocks.

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

Saved successfully!

Ooh no, something went wrong!