Overview of Thread Scheduling
Thread Scheduling 4-5
❏ PRD. Use PRD functions when you want a function to run at a rate based
on a multiple of the on-device timer’s low-resolution rate or another event
(such as an external interrupt). These functions run as SWI functions.
❏ PRD versus SWI. All PRD functions run at the same SWI priority, so one
PRD function cannot preempt another. However, PRD functions can post
lower-priority software interrupts for lengthy processing routines. This
ensures that the PRD_swi software interrupt can preempt those routines
when the next system tick occurs and PRD_swi is posted again.
4.1.3 A Comparison of Thread Characteristics
Table 4-1 provides a comparison of the thread types supported by DSP/BIOS.
Table 4-1. Comparison of Thread Characteristics
Notes: 1) If you disable the TSK Manager, IDL threads use the system stack.
Characteristic
HWI SWI TSK IDL
Priority Highest 2nd highest 2nd lowest Lowest
Number of priority
levels
DSP-dependent 15. Periodic func-
tions run at priority of
the PRD_swi SWI
object. Task sched-
uler runs at lowest
priority.
16 (Including 1
for the ID loop)
1
Can yield and pend No, runs to
completion except
for preemption
No, runs to
completion except
for preemption
Yes Should not; would
prevent PC from
getting target
information
Execution states Inactive, ready,
running
Inactive, ready,
running
Ready, running,
blocked,
terminated
Ready, running
Scheduler
disabled by
HWI_disable SWI_disable TSK_disable Program exit
Posted or made
ready to run by
Interrupt occurs SWI_post,
SWI_andn,
SWI_dec, SWI_inc,
SWI_or
TSK_create main() exits and no
other thread is cur-
rently running
Stack used System stack
(1 per program)
System stack
(1 per program)
Task stack
(1 per task)
Task stack used by
default (see Note 1)