# OSEK
ProOSEK, OSEKTurbo
http://smartsar.com/shownews.php?menu_nav=3&menu_left=72&news_id=13
- Base on ISO-17356.
- 透過 OIL(osek implementation Laguage) configuration file 靜態管理 os 的資源 

- task : preempt or non preempt
- basic tasks: single one shot.
- Ready.
- Running.
- Suspended.

- If a higher priority task becomes ready to run, the currently executing task is
preempted and is moved from the running state into the ready state. <font color=#FF0000> Only
one task can be in the running state at any one time </font>
- BCC1 & BCC2
- extended tasks: Exist in infinite loops.
- Ready.
- Running.
- Suspended.
In addition to these, they can also exist in an extra state:
- <font color=#FF0000>Waiting. </font>

- ECC1 & ECC2
- interrupt
- todo
- resource: A resource in OSEK is just a binary semaphore.
- In OSEK, resources are locked according to a locking protocol. This locking protocol is called **priority ceiling protocol**.
- **It is guaranteed to be deadlock free**
- **Priority inversion is minimized**
- event

- message
- message passing satisfies the OSEK COM conformance classes CCCA (non-queued messages) and CCCB (queued messages) CCCB for internal task and interrupt communication

Transmission Mechanisms
- WithCopy. (interrupt) deep copy

- WithoutCopy. (no interrupt) shallow copy.


- 因為證明realtime 開發流程太繁冗, 所以有一些廠商(simems..) 開發IDE 讓系統場只要寫 app layer 的 code.
就可以保證realtime.
https://github.com/TrampolineRTOS/trampoline
https://github.com/ciaa/firmware.modules.rtos/tree/01e74f01226041eab6d07229103f5200e206c98e
https://github.com/parai/OpenOSEK
https://github.com/inniyah/arccore
https://club.rt-thread.org/ask/article/40a982637da0b684.html