30.12.2013 Views

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.3. INTERRUPT HANDLING 11<br />

precedence<br />

priority<br />

Hight 〈Priority 1〉<br />

✻<br />

〈Priority 2〉<br />

✲ Task B ✲ Task C ✲ Task D ✲<br />

❄<br />

Low 〈Priority 3〉<br />

✲<br />

Task E<br />

✲<br />

Figure 2.3: Precedence After Task B Goes To RUN State<br />

precedence<br />

priority<br />

Hight 〈Priority 1〉<br />

✻<br />

〈Priority 2〉<br />

✲ Task C ✲ Task D ✲<br />

❄<br />

Low 〈Priority 3〉<br />

✲<br />

Task E<br />

✲<br />

Figure 2.4: Precedence After Task B Goes To WAIT State<br />

Note that after a task goes from SUSPEND state to a run state, it has the lowest precedence among<br />

tasks of the same priority. In a virtual memory system, since a task is made to wait for paging by putting<br />

the task in SUSPEND state, in such a system the task precedence changes as a result of a paging wait.<br />

precedence<br />

priority<br />

Hight 〈Priority 1〉<br />

✻<br />

〈Priority 2〉<br />

✲ Task C ✲ Task D ✲ Task B ✲<br />

❄<br />

Low 〈Priority 3〉<br />

✲<br />

Task E<br />

✲<br />

Figure 2.5: Precedence After Task B WAIT State Is Released<br />

2.3 Interrupt Handling<br />

Interrupts in the T-<strong>Kernel</strong> specification include both external interrupts from devices and interrupts<br />

due to CPU exceptions. One interrupt handler may be defined for each interrupt number. Interrupt<br />

Copyright c○ 2002, 2003 by T-Engine Forum<br />

T-<strong>Kernel</strong> <strong>1.B0.02</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!