During exception handling, Linux always switches to supervisor mode. What is the reason for this?. Why can't it continue execution in the exception mode itself?
Supervisor mode is a protected mode for the operating system. Abort mode is entered after a data or instruction Prefetch Abort. System mode is a privileged user modeuser modeIn computer science, hierarchical protection domains, often called protection rings, are mechanisms to protect data and functionality from faults (by improving fault tolerance) and malicious behavior (by providing computer security).https://en.wikipedia.org › wiki › Protection_ringProtection ring - Wikipedia for the operating system.
An exception is any event that can cause the currently executing program to be suspended and cause a change in state to execute code to handle that exception. Other processor architectures might describe this as an interrupt.
When an exception occurs on ARM the processor switches into abort state. While in this state, the processor cannot process any interrupts. This means that screen and network updates cannot happen, nor can there be any pre-emption. For this reason, one should never perform a long running operation in the abort state.
What probably happens (I am not a linux kernel expert), is that the exception is recorded and placed only a queue and the the exception handler immediately returns. The kernel now can re-enable interrupts and process all high priority tasks. It then deals with the exception at its leisure in a way that does not disrupt other tasks.
I have not read this article but it does seem to have the kind of details you are looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With