Watch Dog Timer + Arduino
There's already a watchdog timer built into the atmega chip; you can use avr/wdt.h to manipulate it.

A quick example:

#include &lt;avr/wdt.h&gt;

void setup() {  
  wdt_enable(WDTO_500MS); // have the wdt reset the chip
  // if 500ms passes without a reset
}

void loop() {   
  wdt_reset(); // reset the wdt
}