Panic

The kernel design prevents a software fault from spreading beyond a process boundary. If a thread violates the memory rules, it is terminated. A handler is called when the application panics. Keeping a fault contained can avert critical behavior, but it does not solve the larger problem. The system should recover from a fault. A common method is to trigger a system reset. Another option might be to restart the faulty process or thread. For the latter solution, peripheral initialization would have to be moved from the main function to a process initialization phase. For now a system reset is sufficient, but in the future the binding peripheral to process approach (similar to a microkernel) could be explored.