The application discloses a task-level redundant fault-tolerant
system based on an RTOS kernel, which comprises a user API layer, a redundant
task manager, a state synchronization engine and a fault detection and switching controller, and a
shared memory partition. The user API layer is used for creating a redundant
task group by calling a special API interface. The redundant
task manager is used for managing the whole life cycle of the redundant
task group. The state synchronization engine is used for
synchronizing state data and buffering task input data. The fault detection and switching controller is used for detecting
timeout,
software errors and hardware abnormal faults, and switching the main task and the
backup task after detecting the failure. The
shared memory partition is used for
synchronizing information between the main task and the
backup task, and modifying the access authority when the main task and the
backup task are switched by configuring the access authority by an MPU. The task-level redundant fault-tolerant
system based on the RTOS kernel disclosed by the application reduces the development and maintenance cost, improves the fault identification accuracy, and guarantees the execution continuity after the main-backup switching.