...
µC/OS-III is a preemptive kernel, which means that µC/OS-III always runs the most important task that is ready-to-run as shown in Figure 1-2.
F1-2(1)A low-priority task is executing.F1-2
(2)An interrupt occurs, and the CPU vectors to the ISR responsible for servicing the interrupting device.
F1-2(3)The ISR services the interrupt device, but actually does very little work. The ISR will typically signal or send a message to a higher-priority task that will be responsible for most of the processing of the interrupting device. For example, if the interrupt comes from an Ethernet controller, the ISR simply signals a task, which will process the received packet.F1-2
(4)When the ISR finishes, µC/OS-III notices that a more important task has been made ready-to-run by the ISR and will not return to the interrupted task, but instead context switch to the more important task.
F1-2(5)The higher-priority task executes and performs the necessary processing in response to the interrupt device.F1-2
(6)When the higher-priority task completes its work, it loops back to the beginning of the task code and makes a µC/OS-III function call to wait for the next interrupt from the device.
F1-2(7)The low-priority task resumes exactly at the point where it was interrupted, not knowing what happened.
...