In the last years, wireless sensor networks (WSNs) are acquiring more importance as a promising technology based on tiny devices called sensor nodes or motes able to monitor a wide range of physical phenomenon through sensors. The severe hardware restrictions of sensor nodes in relation to computation, communication and specifically, energy, have posed new technical and conceptual challenges. In particular, research is moving towards heterogeneous networks that will contain different devices running custom WSN operating systems. Operating systems specifically designed for sensor nodes are intended to efficiently manage the hardware resources and facilitate the programming. Nevertheless, they often lack the generality and the high-level abstractions expected at this abstraction layer. The book address the problem of designing and implementing a generic sensor node-centric architecture distinguishing clearly the different abstraction levels in a sensor node. Programming language extensions have to be also specified on top of the architecture, in order to write portable applications. In this way, architecture deals with the problem of heterogeneity and portability.