Chapter 5
Tiny Operating System (TinyOS)
Simple things should be simple, complex things should be possible.
—Alan Kay
An operating system (OS) can be defined as the master program existing between the computer hardware and the user. Its main purpose is the management and coordination of various system resources, which may include hardware resources such as hard disk, memory, peripheral device management, or nonhardware resources such as managing processor timeslots. It provides equal access to these resources through numerous system interfaces. Also, included in its role as a master program, an operating system can act as a host on which other programs can be executed, providing systemwide services by which these programs can access shared resources. Typical services provided by operating systems include networking services, file I/O, data security, and provision of user interfaces. There are several types of operating system, each differing only in its intended environment for use. Some common examples of operating systems include real-time, embedded, single-user, and multiuser operating systems. In most wireless sensor networks, sensors implement a basic operating system containing the minimum functions necessary to execute their tasks. This minimalist approach is of great importance because of the highly resource-constrained nature of these sensing devices; operating system code and application code must reside in devices having much less than one megabyte (1 MB) of memory. ...