forWSDs is\ufb02ash memory. Our index structure exploits the asymmetric read/write and wear characteristics of \ufb02ash memory in order to offer high performance index- ing and searching capabilities in the presence of a low energy budget which is typical for the devices under dis- cussion. A key idea behindMicroHash is to eliminate ex- pensive random access deletions. We have implemented
TinyOS  operating system. Our trace-driven experi- mentation with several real datasets reveals that our in- dex structure offers excellent search performance at a small cost of constructing and maintaining the index.
The improvements in hardware design along with the wide availability of economically viable embedded sen- sor systems enable researchers nowadays to sense envi- ronmental conditions at extremely high resolutions. Tra- ditional approaches to monitor the physical world in- clude passive sensing devices which transmit their read- ings to more powerful processing units for storage and analysis.Wireless Sensor Devices (WSDs) on the other hand, are tiny computers on a chip that is often as small as a coin or a credit card. These devices feature a low fre- quency processor (\u22484-58MHz) which signi\ufb01cantly re- duces power consumption, a small on-chip \ufb02ash mem- ory (\u224832KB-512KB) which can be used as a temporary local storage medium, a wireless radio for communica- tion, on-chip sensors, and an energy source such as a set of AA batteries or solar panels . This multitude of features constituteW SDs powerful devices which can be used for in-network processing, \ufb01ltering and aggre- gation [11, 12, 16]. Large-scale deployments of sensor
network devices have already emerged in environmental and habitant monitoring [13, 15], seismic and structural monitoring , factory and process automation and a large array of other applications [11, 12, 16].
In long-term deployments, it is often cheaper to keep a large window of measurements in-situ (at the generat- ing site) and transmit the respective information to the user only when requested (this is demonstrated in Sec- tion 2.4). For example, biologists analyzing a forest are usually interested in the long-term behavior of the en- vironment. Therefore the sensors are not required to transmit their readings to asink (querying node) at all times. Instead, the sensors can work unattended and store their reading locally until certain preconditions are met, or when the sensors receive a query over the radio that requests the respective data. Such in-network storage conserves energy from unnecessary radio transmissions, which can be used to increase the sampling frequency of the data and hence the \ufb01delity of the measurements in reproducing the actual physical phenomena and prolong the lifetime of the network.
Currently, the deployment of the sensor technology is severely hampered by the lack of ef\ufb01cient infrastruc- ture to store locally large amounts of sensor data mea- surements. The problem is that the local RAM mem- ory of the sensor nodes is both volatile and very lim- ited (\u22482KB-64KB). In addition, the non-volatile on-chip \ufb02ash memory featured by most sensors is also very lim- ited (\u224832KB-512KB). However the limited local storage of sensor devices is expected to change soon. Several sensor devices, such as the RISE  hardware platform, include off-chip \ufb02ash memory which supplements each sensor with several megabytes of storage. Flash mem- ory has a number of distinct characteristics compared to other storage media: First, each page (typically 128B- 512B) can only be written a limited number of times (\u224810,000-100,000). Second, pages can only be written after they have been deleted in their entirety. However, a page deletion always triggers the deletion of its respec-
tive block (\u22488KB-64KB per block). Due to these fun- damental constraints, ef\ufb01cient storage management be- comes a challenging task.
The problem that we investigate in this paper is how to ef\ufb01ciently organize the data locally on \ufb02ash memory. Our desiderata are:
1. To provide ef\ufb01cient access to the data stored on \ufb02ash bytime orvalue, forequality queries gener- ated by the user.
2. To increase thelongevity of the \ufb02ash memory by spreading page writes out uniformly so that the available storage capacity does not diminish at par- ticular regions of the \ufb02ash media.
We propose theMicroHash index, which serves as a primitive structure for ef\ufb01ciently indexing temporal data and for executing a wide spectrum of queries. Note that the data generated by sensor nodes has two unique char- acteristics: i) Records are generated at a given point in time (i.e. these are temporal records), and ii) The recorded readings are numeric values in a limited range. For example a temperature sensor might only record val- ues between -40F to 250F with one decimal point pre- cision. Traditional indexing methods used in relational database systems are not suitable as these do not take into account the asymmetric read/write behavior of \ufb02ash media. Our indexing techniques have been designed for sensor nodes that feature large \ufb02ash memories, such as the RISE  sensor, which provide them with several MBs of storage. MicroHash has been implemented in nesC  and uses the TinyOS  operating system.
1. We propose the design and implementation of Mi- croHash, a novel index structure for supporting equality queries in sensor nodes with limited pro- cessing capabilities and a low energy budget.
3. We describe the prototype implementation of Mi- croHash in nesC , and demonstrate the ef\ufb01ciency of our approach with an extensive experimental study using atmospheric readings from the Univer- sity of Washington  and the Great Duck Island study .
In this section we brie\ufb02y overview the architecture of a sensor node, with a special focus on its memory hierar- chy. We also study the distinct characteristics of \ufb02ash memory and address the challenges with regards to en- ergy consumption and access time.
The architecture of a sensor node (see Figure 1), consists of a microcontroller unit (MCU) which is interconnected to the radio, the sensors, a power source and the LEDs. The MCU includes a processor, a static RAM (SRAM) module and an on-chip \ufb02ash memory. The processor runs at low frequencies (\u22484-58MHz) which reduces power consumption. The SRAM is mainly used for code ex- ecution while in the latest generation of sensors, such as Yale\u2019s 58MHz XYZ node  and the Intel\u2019s 12MHz iMote (http://www.intel.com), it can also be used forin-
energy source is application speci\ufb01c. Most sensors ei- ther deploy a set of AA batteries or solar panels . Therefore a sensor node might have a very long lifetime.
The on-chip \ufb02ash provides a small non-volatile storage area (32KB-512KB) for storing the executable code or for accumulating values for a small window of time . A larger external storage can also be supplemented to a sensor using theSerial Peripheral Interface (SPI) which is typically found on these devices. For example in the
ory which provides the sensor with several MBs of stor- age. The external \ufb02ash memory is connected to the MCU through a Serial Peripheral Interface (SPI), that oper- ates at a fraction of the CPU frequency (e.g.cpuf req
). Therefore a faster processor would increase the maxi- mum throughput of the SPI interface.
Although it is currently not clear whether Moore\u2019s Law will apply to the size and price of the sensor units or their hardware characteristics, we believe that future sensor nodes will feature more SRAM and \ufb02ash storage, as more complex in-network processing applications, in- crease the memory and potentially the CPU demand.
Flash Memory is the most prevalent storage media used in current sensor systems because of its many advantages including: i) non-volatile storage, ii) simple cell archi- tecture, which allows easy and economical production,
iii) shock-resistance, iv) fast read access and power ef- \ufb01ciency. These characteristics establish \ufb02ash memory as an ideal storage media for mobile and wireless de- vices .
the logic gate of their respective storage cell. NAND \ufb02ash is the newer generation of \ufb02ash memory which is characterized by faster erase time, higher durability and higher density. NOR is an older type of \ufb02ash which is mainly used for code storage (e.g. for the BIOS). Its main advantage is that it supports writes at a byte granular- ity as opposed to page granularity used in NAND \ufb02ash. NOR \ufb02ash has also faster access time (i.e.\u2248200ns) than NAND (50-80\u00b5s) but lacks in all other characteristics such as density and power ef\ufb01ciency.
For the rest of the paper we will focus on the charac- teristics of NAND memory as this is the type of mem- ory used for the on-chip and off-chip \ufb02ash of most sen- sors including the RISE platform. According to Micron (http://www.micron.com/), NAND memory is the fastest growing memory market in 2005 ($8.7 billion). NAND \ufb02ash features a number of distinct constraints which can be summarized as following:
1.Read-Constraint: Reading data stored on \ufb02ash memory can be performed at granularities ranging from a single byte to a whole block (typically 8KB- 64KB).
2.Delete-Constraint: Deleting data stored on \ufb02ash memory can only be performed at a block granular- ity (i.e. 8KB-64KB).
3.Write-Constraint: Writing data can only be per- formed at a page granularity (typically 256B-512B), after the respective page (and its respective 8KB- 64KB block) has been deleted.
4.Wear-Constraint: Each page can only be writ- ten a limited number of times (typically 10,000- 100,000).
Table 1, presents the average measurements that we ob- tained from a series of micro-benchmarks using theRISE platform along with a HP E3630A constant 3.3V power supply and a Fluke 112 RMS Multimeter. The \ufb01rst ob- servation is that reading is three orders of magnitude less power demanding than writing. On the other hand, block erases are also quite expensive but can be performed much faster than the former two operations. Note that
read and write operations involve the transfer of data be- tween the MCU and the SPI bus, which becomes the bot- tleneck in the time to complete the operation. Specif- ically, reading and writing on \ufb02ash media without the utilization of the SPI bus can be achieved in\u224850\u00b5 and
Although these are hardware details, the application logic needs to be aware of these characteristics in order to minimize energy consumption and maximize perfor- mance. For example, the deletion of a 512B page will trigger the deletion of a 16KB block on the \ufb02ash mem- ory. Additionally the MCU has to re-write the rest unaf- fected 15.5KB. One of the objectives of our index design is to provide an abstraction which hides these hardware speci\ufb01c details from the application.
Another question is whether it is cheaper to write to \ufb02ash memory rather than transmitting over the RF radio. We used the RISE mote to measure the cost of transmitting the data over a 9.6Kbps radio (at 60mA), and found that transmitting 512B (one page) takes on average 416ms or 82,368\u00b5J. Comparing this with the 763\u00b5J required for writing the same amount of data to local \ufb02ash, along with the fact that transmission of one byte is roughly equiv- alent to executing 1120 CPU instructions, makes local storage and processing highly desirable.
A \ufb01nal question we investigated is how many bytes we can store on local \ufb02ash before a sensor runs out of energy. Note that this applies only to the case where the sensor runs on batteries. Double batteries (AA) used in many current designs operate at a 3V voltage and sup- ply a current of 2500 mAh (milliAmp-hours). Assuming similarly to , that only 2200mAh is available and that all current is used for data logging, we can calcu-
This action might not be possible to undo. Are you sure you want to continue?