ITRON History
ITRON1 – designed for 8 and 16 bit MCU ITRON2 – support 32 bit MCU μITRON2 – adaptation for low-cost MCU μITRON3 – scalability enhancements
μITRON4 – compatibility enhancement
Targeted for 32 bit MPU
The first spec for ITRON Kernel
Targeted for 8-bit and 16-bit MCU
Scalability Enhancement
Compatibility Enhancement
Copyright © 2011 DSR CorporationCopyright © 2011 DSR Corporation 11
ITRON Usage (cont.)
Copyright © 2011 DSR CorporationCopyright © 2011 DSR Corporation 22
Configure the System
RTOSconfiguration file
Source files for the task
Source files for the interrupt handler
Configurator
Compiling and linking
Software Components
Object file
MPU
To ROM
RTOS Libraries
Software Components
OtherLibraries
.c and .h files are generated as a result of configurator functioning
Copyright © 2011 DSR CorporationCopyright © 2011 DSR Corporation 33
Task States (cont.)
Copyright © 2011 DSR CorporationCopyright © 2011 DSR Corporation 44
Scheduling Rules (cont.)
Scheduling example Task A of the highest priority
Task B, C, D of the middle priority
Task E of the lowest priority
Workflow Task A terminates, task B moves to RUNNING state
If task B goes to WAITING or SUSPENDEND state and then back to READY, it has the lowest precedence
If Task A is reactivated, Task B is pre-empted and return to the READY state, it has the highest precedence
Copyright © 2011 DSR CorporationCopyright © 2011 DSR Corporation 55
Dispatch Pending State• Dispatch does not occur (dispatch pending state)
– During execution of processing units with higher precedence than that of the dispatcher
– The CPU in locked state
– Dispatch disabled state
• Task state transition into SUSPENDED or DORMANT state is hold until dispatch is turned on– Task state transition may be done using service calls from non-task context
Low priority task A is running
Dispatch pending state during interrupt handler execution
High priority task B is activated from interrupt handler
Task state changes only after dispatcher executes
Copyright © 2011 DSR CorporationCopyright © 2011 DSR Corporation 66
Semaphore (cont.)
Semaphore usage example
Semaphore acquire req.
Semaphore acquired
Semaphore(SID1)
Work with shared resources
Release semaphore
Semaphore acquire req.
Work with shared resources
Sem. resource number = 0
Sem. resource number = 1
Start
Semaphore acquired
Dispatch
Wait release, dispatch
Task 1 (Priority: Low)
Task 2(Priority: High)
Copyright © 2011 DSR CorporationCopyright © 2011 DSR Corporation 77
Eventflag (cont.)
Eventflag usage example
Event flag is cleared
Set event flag 01 Release waiting
flag=01
flag=00
Wait for event 11
Starting
Dispatch
Wait release, dispatch
Task 1(Priority: Low)
EventflagTask 2
(Priority: High)
Copyright © 2011 DSR CorporationCopyright © 2011 DSR Corporation 88
Data Queue (cont.)
Data queue functioning example: wait for receive
Empty queue
Data queue
Receive message
Release waitingSend message
Wait release, dispatch
Task 1(Priority: Low)
Task 2(Priority: High)
Dispatch
Receive wait
Copyright © 2011 DSR CorporationCopyright © 2011 DSR Corporation 99
Data Queue (cont.)
Data queue functioning example: asynchronous send
1 message in queueStart
Task 1(Priority: Low)
Data queueTask 2
(Priority: High)
Time Send a message
Empty queue
Receive message
Empty queue
Copyright © 2011 DSR CorporationCopyright © 2011 DSR Corporation 1010
Data Queue (cont.)
Data queue functioning example: wait for send
Queue is full
Queue is full
Send a message
Receive messageData queue
Put data to queue
Send-wait state
Dispatch
Wait release, dispatch
Task 1(Priority: Low) Data queue
Task 2(Priority: Low)
Copyright © 2011 DSR CorporationCopyright © 2011 DSR Corporation 1111
References μITRON4.0 Specification
http://www.t-engine.org/wp-content/themes/wp.vicuna/pdf/specifications/en_US/WG024-S001-04.03.00_en.pdf
RTEMS ITRON 3.0 User’s Guide
http://www.rtems.com/onlinedocs/releases/rtemsdocs-4.9.4/share/rtems/pdf/itron.pdf
eCOS μITRON API
http://ecos.sourceware.org/docs-1.3.1/ref/ecos-ref.a.html
ITRON short description
http://citforum.ru/operating_systems/rtos/27.shtml
FAQ of ITRON Specification OS
http://www.t-engine.org/tron-project/itron/itron-faq
TOPEERS/JSP
http://www.toppers.jp/en/index.html
Copyright © 2011 DSR CorporationCopyright © 2011 DSR Corporation 1212