04.12.2012 Views

Towards a Platform for Widespread Embedded Intelligence - ERCIM

Towards a Platform for Widespread Embedded Intelligence - ERCIM

Towards a Platform for Widespread Embedded Intelligence - ERCIM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

30<br />

SPECIAL THEME: <strong>Embedded</strong> <strong>Intelligence</strong><br />

TPC: Tagged Procedure Calls<br />

by Konstantinos Kapelonis, Sven Karsson, and Angelos Bilas<br />

Tagged Procedure Calls (TPC) is a new approach addressing the problem of the<br />

high programmer ef<strong>for</strong>t needed to achieve scalable execution. TPC is targeted at<br />

architectures ranging from small embedded systems to large-scale multi-core<br />

processors and provides an efficient programming model easy to understand<br />

and exploit.<br />

A huge opportunity and challenge we<br />

face today is the design of embedded<br />

systems that will support demanding<br />

application domains. Current technology<br />

trends in building such embedded systems<br />

advocate the use of parallel systems<br />

with (i) multi-core processors and (ii)<br />

tightly-coupled interconnects. However,<br />

exploiting parallelism has traditionally<br />

resulted in significant programmer<br />

ef<strong>for</strong>t. The programming model plays an<br />

important role in reducing this ef<strong>for</strong>t.<br />

The main challenges in the programming<br />

model are to expose mechanisms that<br />

need to be used directly by the programmer<br />

and to hide mechanisms that<br />

can be used transparently.<br />

It is predicted that multi-core processors<br />

will use the increasing number of transistors<br />

more efficiently than traditional<br />

single-core processors and offer higher<br />

per<strong>for</strong>mance. However, multi-core processors<br />

require a large degree of parallelism<br />

that has traditionally demanded<br />

additional programming ef<strong>for</strong>t. There is<br />

a need <strong>for</strong> an intuitive programming<br />

model <strong>for</strong> multi-core processors.<br />

Moreover, future interconnects will play<br />

an important role in such systems as they<br />

interconnect all the cores in a system. To<br />

be efficient, the programming model<br />

must facilitate efficient use of the interconnect.<br />

Tagged procedure calls (TPC), are a new<br />

programming model that re-draws the<br />

balance between what the programmer<br />

needs to specify and what the architecture<br />

should provide. Furthermore, TPC<br />

aim at unifying intra- and inter-chip programming<br />

abstractions. In<strong>for</strong>mally, the<br />

main points behind TPC are:<br />

• TPC allow the programmer to augment<br />

procedure declarations and calls<br />

with tags that control the way these<br />

procedures will be executed.<br />

<strong>ERCIM</strong> News No. 67, October 2006<br />

• TPC require the programmer to<br />

specify parallelism through special,<br />

tagged, asynchronous procedure calls.<br />

TPC also provide primitives that block<br />

execution until certain procedure calls<br />

have completed, see Figure 1.<br />

• TPC discourage the programmer from<br />

accessing global data within tagged<br />

procedures.<br />

• TPC allow the programmer to use<br />

pointers to global data as arguments to<br />

procedures.<br />

/* Function with OUT argument */<br />

void procedure(...){<br />

...<br />

}<br />

void main()<br />

{<br />

/* Define a handle <strong>for</strong> function */<br />

TPC:DECL(hdl,procedure)<br />

...<br />

/* call asynchronously procedure()<br />

* it changes argument s */<br />

TPC:CALL(hdl,procedure,s) c,i<br />

/* Continue execution */<br />

...<br />

/* Use handle hdl to wait <strong>for</strong><br />

* procedure() to complete */<br />

TPC:WAIT(hdl)<br />

/* s can now be accessed */<br />

...<br />

}<br />

Figure 1: TPC example. Calling a function<br />

with consistency (c) and isolation (i) tags.<br />

Figure 2. Current prototyping plat<strong>for</strong>m at<br />

FORTH-ICS. The depicted architecture is<br />

implemented using a Xilinx XUP board.<br />

Tags placed on procedure calls by the<br />

programmer define an abstract representation<br />

of the required execution semantics,<br />

see Figure 1. The programmer (a)<br />

has to identify the available parallelism,<br />

(b) is urged to identify the data used<br />

during parallel computations and (c) has<br />

to specify how parts of the code will execute,<br />

eg as atomic or serializable regions.<br />

However, they need not worry about<br />

how this will be achieved. Finally, TPC<br />

aim at unifying intra- and inter-processor<br />

programming models and dealing with<br />

the inherent heterogeneity of future<br />

embedded systems in a simple and intuitive<br />

manner.<br />

TPC encourage the programmer to<br />

specify parallelism and data used during<br />

parallel execution, but do not expose the<br />

underlying mechanisms <strong>for</strong> communication,<br />

synchronization, etc. We believe<br />

that this balance between what the programmer<br />

needs to specify and what can<br />

be done transparently will result in both<br />

efficient execution and reduced programmer<br />

ef<strong>for</strong>t on future embedded systems.<br />

Our current work focuses on a prototype<br />

implementation of TPC on an embedded<br />

plat<strong>for</strong>m. We are using an FPGA-prototype<br />

(see Figure 2) with multiple cores.<br />

Using this implementation plat<strong>for</strong>m, we<br />

are currently experimenting with the<br />

semantics of TPC. We are porting a<br />

number of existing parallel applications.<br />

This ef<strong>for</strong>t will allow us to examine the<br />

cost introduced by the runtime system<br />

when transparently dealing with communication<br />

and synchronization issues.<br />

This work has been partially supported<br />

by the European Commission in the context<br />

of the SARC project.<br />

Please contact:<br />

Angelos Bilas, FORTH-ICS and University<br />

of Crete, Greece<br />

E-mail: bilas@ics.<strong>for</strong>th.gr<br />

http://www.ics.<strong>for</strong>th.gr/~bilas/

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

Saved successfully!

Ooh no, something went wrong!