« July 2006 | Main | October 2006 »

August 25, 2006

Protothreads and ACM SenSys 2006

I was a visiting researcher at SICS (Sweden) last fall where I had an amazing time working with Thiemo Voigt and Adam Dunkels. Adam's work on Protothreads recently got accepted at ACM SenSys 2006 and I am listed as a co-author on the paper.

If you don't know what SenSys is then you can try reading the Wikipedia article on SenSys. In short SenSys is the SIGCOMM of sensor networks, so I am more than glad about the Protothreads work being accepted at SenSys. :-)

acm-logo-small.png
"Threads vs. Event-Driven Programming" is an age-old debate in computer systems research. The late Roger Needham (Cambridge) tried to settle this debate with the "duality argument" in 1979 (essentially saying that threads and events are inter-convertible and are the same thing), but the Threads vs. Events remained a hot debatable topic e.g. Ousterhout (creator of the Tcl scripting language) made strong arguments against Threads in his "Why Threads Are A Bad Idea" invited talk at 1996 USENIX Technical Conference. An example of arguments in favour of Threads could be Eric Brewer's (UC Berkeley) "Why Events Are A Bad Idea" HotOS IX (2003) paper.

Protothreads are extremely lightweight stackless threads designed for severely memory constrained systems. One way to think about Protothreads is that they are a proof-of-concept of the 1979 Roger Needham "duality" argument. They are "something in-between" threads and event-driven programming. Maintaining state-machines makes event driven programming hard, but threads take too much memory to make them feasible on memory-constrained systems (e.g. sensor networks). Protothreads reduce/eliminate the need for maintaining explicit state-machines (the main argument against event-driven programming) while keeping the memory overhead very low (the main argument against threads). Protothreads (unlike traditional threads) are stack-less and their memory overhead is very small (only two bytes per protothread).

For more details, you can read the Protothreads SenSys 2006 paper ..... here

You can download and use the protothreads library ... here

Protothreads are already gaining some popularity, Google lists some 13,300 results for Protothreads; here are a few interesting links:

August 03, 2006

Erdős Number

Paul_Erdös.jpeg I found out about Erdos Numbers from my alma mater faculty Arif Zaman - the father of Random Number Generation (Rand() in programming languages). After seeing the list of famous people with finite Erdos numbers I got curious about my own Erdos number (if it was not infinite). Let me explain Erdos numbers a bit;
  • Paul Erdős is the only person with an Erdos number 0
  • Anyone who has published a paper with Paul Erdős has Erdos number 1
  • So, Arif Zaman has an Erdos number 4 because he published a paper with George Marsaglia who published a paper with George P. H. Styan who published a paper with Paul Erdős.
The Erdos number is basically a measure of research collaborations taking Paul Erdős as the center. The Erdos Number project found that all winners of the prestigious Mathematics Awards (e.g. the Fields Medal) have finite Erdos numbers and also most Nobel laureates have finite Erdos numbers as well. In other words this shows that the research circles are smaller than what we imagine them to be e.g.
  • Albert Einstein (Physics) has Erdos 2,
  • John Nash (Economics) has Erdos 4,
  • Stephen Hawking (Cosmology) has Erdos 4
The online collaborative distance search page was not so useful in calculating my Erdos number primarily because I am not a Mathematician or a Theoretical Computer Scientist. So I had to manually calculate my Erdos paths and find the limit on the Erdos number (I had to find manual paths to someone recognized by the Erdos project database and reduce the overall path length as much as possible). Here are some paths I found (listing only one example path for each Erdos number): So my Erdos number is 5, which means that from my co-author index on the DBLP Bibliography Server after 5 clicks you should be able to see Paul Erdös.