Coma FW-C2800 User's Guide Page 108

  • Download
  • Add to my manuals
  • Print
  • Page
    / 276
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 107
Overview of Thread Scheduling
Thread Scheduling 4-3
Software interrupts (SWI). Patterned after hardware interrupt (HWIs).
While HWIs are triggered by a hardware interrupt, software interrupts are
triggered by calling SWI functions from the program. Software interrupts
provide additional priority levels between hardware interrupts and TSKs.
SWIs handle threads subject to time constraints that preclude them from
being run as tasks, but whose deadlines are not as severe as those of
hardware ISRs. Like HWI’s, SWI’s threads always run to completion.
Software interrupts should be used to schedule events with deadlines of
100 microseconds or more. SWIs allow HWIs to defer less critical
processing to a lower-priority thread, minimizing the time the CPU spends
inside an interrupt service routine, where other HWIs can be disabled. See
section 4.3, Software Interrupts, page 4-26, for details about software
interrupts.
Tasks (TSK). Tasks have higher priority than the background thread and
lower priority than software interrupts. Tasks differ from software
interrupts in that they can be suspended during execution until necessary
resources are available. DSP/BIOS provides a number of structures that
can be used for inter task communication and synchronization. These
structures include queues, semaphores, and mailboxes. See section 4.4,
Tasks, page 4-40, for details about tasks.
Background thread. Executes the idle loop (IDL) at the lowest priority in
a DSP/BIOS application. After main returns, a DSP/BIOS application
calls the startup routine for each DSP/BIOS module and then falls into the
idle loop. The idle loop is a continuous loop that calls all functions for the
IDL objects. Each function must wait for all others to finish executing
before it is called again. The idle loop runs continuously except when it is
preempted by higher-priority threads. Only functions that do not have
hard deadlines should be executed in the idle loop. See section 4.5, The
Idle Loop, page 4-53, for details about the background thread.
There are several other kinds of functions that can be performed in a
DSP/BIOS program. These are performed within the context of one of the
thread types in the previous list.
Clock (CLK) functions. Triggered at the rate of the on-device timer
interrupt. By default, these functions are triggered by a hardware interrupt
and are performed as HWI functions. See section 4.8, Timers, Interrupts,
and the System Clock, page 4-67, for details.
Periodic (PRD) functions. Performed based on a multiple of either the
on-device timer interrupt or some other occurrence. Periodic functions
are a special type of software interrupt. See section 4.9, Periodic
Function Manager (PRD) and the System Clock, page 4-74, for details.
Data notification functions. Performed when you use pipes (PIP) or
host channels (HST) to transfer data. The functions are triggered when a
frame of data is read or written to notify the writer or reader. These
functions are performed as part of the context of the function that called
PIP_alloc, PIP_get, PIP_free, or PIP_put.
Page view 107
1 2 ... 103 104 105 106 107 108 109 110 111 112 113 ... 275 276

Comments to this Manuals

No comments