A processor unit executes a failure detection program for a vehicle. The
failure detection program includes a first failure detection process of a
high priority level, a second failure detection process of a moderate
priority level and a memory manipulation process of a low priority level.
Each of the failure detection processes requests memory manipulation by
generating an event as the need arises. When the memory manipulation
process is activated, it performs the requested memory manipulation in
the same order as the memory manipulation is requested so that execution
of memory manipulation requested by one of the failure detection
processes is not interrupted by execution of memory manipulation
requested by the other of the failure detection processes. However, each
of the failure detection processes itself can be executed interrupting
the execution of memory manipulation process because of its higher
priority level.