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 2

Software Interrupts, along with tasks, are one of the chief threading models that BIOS provides. Swis are patterned after hardware interrupts (called “Hwis”), but provide a way in which processing can be done in a more controlled and less restrictive way. Software interrupts are preemptible in that each Swi is given an explicit priority; higher priority Swis preempt the lower priority ones. The SYS/BIOS scheduler completely controls this and handles all of the context saves and restores. An important feature one must understand is that unlike Tasks, Swis operate on a single stack. This is both an advantage and a constraint, as it makes using Swis very memory efficient, but also keeps them from blocking to allow other threads to execute. In other words Swis must always run to completion. In this sense, they are very similar in design to the Hardware Interrupts thread. The stack used by Swis is the same stack that Hwi’s use. Every time a Swi is preempted, it will first need to push its context on to the stack. Because of that, the size of the stack that needs to be allocated is directly proportional to how many Swi priority levels the system will need.

PTM Published on: 2012-07-17