We introduce application specific virtual machines (ASVMs) as a way to retask deployed wireless sensor networks. We analyze and show that prior approaches, such as standardized virtual machines or a user/kernel boundary, are insufficient or less appropriate than our approach. We present Mate, an architecture for building application specific virtual machines. We describe its execution and data models, as well as its code loading and linking algorithms. We evaluate the efficiency of a Mate ASVM's components individually with microbenchmarks, evaluate the efficiency of a whole system against other proposals for application level programming, and evaluate Mate's flexibility by presenting several example ASVMs that users have built and deployed. The results show that ASVMs allow users to safely, efficiently, and quickly retask large sensor networks in high level languages, making these systems accessible to non-expert users and opening up new application opportunities. |