Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Product List
RTOS and Software Interrupts Slide 3

Swis can provide a very important part of the system since this thread occupies the space between the hard real time functions of Hwi’s and the background soft real time processing that occurs in the idle thread. Swis are not only similar in design to hardware interrupts, but are very often called by them. A typical use-case is for a system to have a Hardware Interrupt start a SYS/BIOS Hwi thread. The functions within a Hwi are those that require an urgent response time, such as servicing a peripheral. Furthermore, Hwi’s tend to run at sampling rates, which can mean high frequency, so a short duty cycle is essential. A Hwi might be structured so that it can be preempted by a higher priority interrupt, but it is prioritized over all the other SYS/BIOS threads. Because of this, and because interrupts are typically disabled while the Hwi is running, it is essential that it completes as soon as possible. In order for the Hwi to do the minimum amount of processing possible, any less critical functions can be done by the Software Interrupt which is made ready to run when the Hwi calls Swi_post. Since the Swi is a thread that operates at a lower priority than the Hwi, and because it can be preempted, it is used to run functions whose deadlines are more flexible. Instead of running at sample rate, Swis often run at a “frame rate” on a whole set of samples. Duty cycles tend to be measured in milliseconds instead of microseconds and they are definitely preemptible.

PTM Published on: 2012-07-17