Abstract - Ph D thesis Adam Dunkels

Programming Memory-Constrained Networked Embedded Systems

Ten years after the Internet revolution are we standing on the brink of
another revolution: networked embedded systems that connect the physical
world with the computers, enabling new applications ranging from
environmental monitoring and wildlife tracking to improvements in health
care and medicine. Only 2% of all microprocessors that are sold today are
used in PCs; the remaining 98% of all microprocessors are used in embedded
systems. The microprocessors used in embedded systems have much smaller
amounts of memory than PC computers. An embedded system may have as little
has a few hundred bytes of memory, which is thousands of millions times the
memory in a modern PC. Thememory constraintsmakes programming embedded
systems a challenge.

This thesis focus on three topics regarding programming memory-constrained
networked embedded systems: using the TCP/IP protocol suite
even in memory-constrained networked embedded systems, simplifying
eventdriven programming of memory-constrained systems, and dynamic loading
of program modules in an operating system for memory-constrained devices.

I show that the TCP/IP protocol stack can, contrary to previous belief, be
used in memory-constrained embedded systems by implementing two small TCP/IP
protocol stacks, lwIP and uIP.

Furthermore, I present a novel programming
mechanism that I call protothreads that is intended to replace state
machinebased event-driven programs. Protothreads provide a conditional
blocked wait mechanism on top of event-driven systems with a much smaller
memory overhead than full multithreading; each protothread requires only two
bytes of memory. I show that protothreads significantly reduce the
complexity of eventdriven programming formemory-constrained systems. Of
seven statemachinebased programs rewritten with protothreads, almost all
explicit states and state transitions could be removed. Protothreads also
reduced the number of lines of code with 33% on the average. The execution
time overhead of protothreads is small enough to make protothreads usable
even in time-critical programs.

Finally, I show that dynamic linking of native code in standard ELF object
code format is doable and feasible for wireless sensor networks by
implementing a dynamic loading and linking mechanism for my Contiki
operating system. I measure and quantify the energy consumption of the
dynamic linker and compare the energy consumption of native code with that
of virtual machine code. The results show that the energy overhead of
dynamic linking of ELF files mainly is due to the ELF file format and not
due to the dynamic linking mechanism as such. The results also suggest that
combinations of native code and virtual machine code are more energy
efficient than pure native code or pure virtual machine code.



Travel reports

Licentiate seminars


Courses Spring 2015


Last modified on January 2007 by Anne Moe