DUOS: ECU RTOS 1 1 1 1 1 1 1 ECU ECU ECU ECU ECU ECU RTOS µitron OSEK OS API API DUOS API DUOS: A Real-Time OS Framework for Integrating Electronic Control Units in Automotive Control Systems TAKUYA NAGAO, 1 MASAHIRO YAMADA, 1 TAKESHI ISHITANI, 1 YUTAKA MATSUBARA, 1 FUMIO YAMAZAKI, 1 SHINYA HONDA 1 and HIROAKI TAKADA 1 The number of Electronic Control Units (ECUs) in automotive control systems has been continuously increasing due to the requirement from the advanced electronic control functions. For the purpose of reducing this number, several approaches has been studied to integrate ECUs into a high performance one and unite applications on it. This paper presents a new RTOS framework for integrating ECUs to reduce the amount of comprehensive verification works at the integration of ECUs. The RTOS framework includes a hierarchical scheduler, and API layers for µitron OS and OSEK OS specification. The results of the evaluation of the prototype system, called DUOS, indicate that the overhead of execution time of API and task switching are reasonably acceptable for the real-time applications. 1. ECU ECU ECU ECU ECU ECU ECU ECU ECU ECU ECU ECU ECU RTOS API 1 Center for Embedded Computing Systems, Nagoya Univ. 1 c 2010 Information Processing Society of Japan
ECU RTOS 1),2) µitron 3) OSEK OS 4) API API DUOS Dual API Real-time OS ECU RTOS RTOS DUOS API ECU-A アプリケーションA RTOS-A CPU 30MHz ECU-B アプリケーションB RTOS-B CPU 40MHz ECU-C アプリケーションA アプリケーションB RTOS-C 40% CPU 100MHz 1 ECU Fig. 1 Integration of ECUs LAN LAN 2. ECU RTOS 2.1 ECU ECU 1 ECU ECU ECU-A 30MHz RTOS-A A ECU-B 40MHz RTOS-B B ECU 100MHz ECU-C ECU ECU A B ECU ECU-C ECU RTOS-A RTOS-B ECU-C RTOS-A RTOS-B RTOS ECU-C RTOS-C 2.2 ECU ECU ECU RTOS API 2.3 RTOS ECU ECU RTOS ECU 2 c 2010 Information Processing Society of Japan
OSEK OS のアプリケーション ITRON OS のアプリケーション アプリケーション 1 アプリケーション 1 アプリケーション 2 OSEK OS の API ITRON OS の API ローカルスケジューラローカルスケジューラ Scheduler Programming Interface (SPI) グローバルスケジューラディスパッチャ DUOS の構成 ディスパッチャ SPI グローバル スケジューラ タイムイベント システムログ 割込み処理 スケジューラプロセッサアプリケーション2 スケジューラ Application Programming Interface (API) ローカルローカルスケジューラスケジューラ Scheduler Programming Interface (SPI) グローバルスケジューラ階層型スケジューラディスパッチャ プロセッサ プロセッサ プロセッサ Fig. 2 2 Composition of the proposed RTOS framework. Fig. 3 3 Composition of the hierarchical scheduler ECU API API OS API API API ECU 3. ECU RTOS 3.1 2 RTOS API API OS 3.2 3 EDF EDF 4 EDF EDF DUOS EDF ECU ECU 1) 3 c 2010 Information Processing Society of Japan
1 SPI 重み付きラウンドロビンラウンドロビン方式 Table 1 List of SPI functions アプリケーションの実行周期 アプリケーションA() アプリケーションB() アプリケーションC(40%) 40% 40% 40% 固定デッドライン EDF 方式アプリケーションAの周期アプリケーションA アプリケーション B の周期 アプリケーション B API API 変動デッドライン EDF 方式デッドラインの変化アプリケーションA アプリケーションB 4 Fig. 4 Three types of scheduling method for global scheduler SPI Scheduler Programming Interface SPI SPI 1 3.3 API API API API API µitron 3) OSEK OS 4) µitron OSEK OS API 2 RTOS SPI 3.4 API 4 c 2010 Information Processing Society of Japan
SPI OS OS RTOS 4. 4.1 DUOS SPI API DUOS TOPPERS/ASP API 4.2 DUOS DUOS API API API SPI API 1 1 4.3 API API 4.3.1 4.3.2 µitron 4.3.3 SPI SPI 1 API 4.4 API ITRON OS API(act tsk) act tsk DUOS API SPI ) 4.5 ITRON OS OSEK OS OSEK OS / ITRON OS / ITRON OS ITRON OS OSEK OS 5 c 2010 Information Processing Society of Japan
ディスパッチ開始最高優先度のアプリケーションの有無 yes ディスパッチ保留状態か? yes 実行するタスクを切り替える no no 非タスクコンテキストで割込み待ち /* * ITRON */ APPLICATION(MAINAPP) { CFG APP({ TA ASP, TA CYC, 30, 100 }); CRE TSK(TASK1,{TA NULL,1,task1,MID PRIORITY,TA SCHFULL,STACK SIZE,NULL, TA NULL,0,0}); CRE TSK(TASK2,{TA NULL,2,task2,MID PRIORITY,TA SCHFULL,STACK SIZE,NULL, TA NULL,0,0}); CRE TSK(MAIN TASK,{TA ACT,0,main task,main PRIORITY,TA SCHFULL, STACK SIZE,NULL,TA NULL,0,0}); } タスクへ復帰 5 DUOS Fig. 5 Dispatcher of DUOS 6 Fig. 6 configuration file 5 4.6 DUOS TOPPERS 5) API API DUOS API API APPLICATION( ) { CFG APP(...) CRE TSK(...)... } CFG APP API ms CFG APP( API,, CPU, ); 6 TA ASP API CPU 100ms main task task1 task2 5. DUOS ARM Cortex-A9 MPCore 1 400MHz RAM 512MB 6 c 2010 Information Processing Society of Japan
2 (byte) Table 2 Size of object files(byte) text data bss total ITRON OS 35,579 0 4 35,583 OSEK OS 23,532 0 2 23,534 DUOS 59,954 0 6 59,960 3 API (µs) Table 3 API execute performance Native DUOS ITRON API 8.0 11.4 10.5 22.6 OSEK API 10.3 14.2 12.1 24.4 250MHz ARM GCC 4.3.3(arm-none-eabi-gcc) ITRON OS 100ms CPU OSEK OS 200ms CPU DUOS ITRON OS OSEK OS DUOS API API API act tsk(itron OS) ActivateTask(OSEK OS) API 10 10 708ns 5.1 DUOS DUOS ITRON OS OSEK OS DUOS 2. DUOS text ITRON OS 24KB OSEK OS 36KB OS text DUOS API 2 ITRON OS OSEK OS 59117byte 2% VM OS VM 5.2 5.2.1 API 3 API 3 Native DUOS ITRON OS OSEK OS API 3 API ITRON OS OSEK OS ITRON OS OSEK OS (8.0µs 10.3µs) API DUOS API Native API API DUOS 2µs 10µs DUOS API 2.1 API SPI Native ITRON API OSEK API DUOS API 2µs 10µs ms ms 1% 5.2.2 API DUOS 7 DUOS ITRON API 52µs 10 API 1.0s 1ms 1.0s 1000 52µs API 1084 52µs API DUOS OSEK API 1289 DUOS 7 c 2010 Information Processing Society of Japan
10000 5 1000 DUOS(ITRON) DUOS(OSEK) 4 DUOS(ITRON) DUOS(OSEK) ] [ 回度頻 100 ] 3 [ 回度頻 2 10 1 1 0 10 20 30 40 50 60 時間 [us] 7 API ( )-1 Fig. 7 API execution performance(not execute dispatch)-1 0 50 60 70 80 90 100 110 120 130 時間 [ms] Fig. 8 8 API ( )-2 API execution performance(not execute dispatch)-2 OSEK API API 12µs DUOS OSEK API DUOS CPU 5.2.3 API 8 8 7 ms 8 API 68ms 120ms 1.0s ITRON OS 100ms CPU 1 30ms 30ms 3000 CPU 10 33 70ms 68ms 30 33 68ms API CPU 120ms 25 68ms 20. 120ms 68ms 5.2.4 DUOS 100 30.6µs 5.3.1 API 22.6µs 1.3 6. OS 6),7) OS OS OS 8 c 2010 Information Processing Society of Japan
OS API 8) 10) OS RTOS API OS API API ecos 11) xenomai 12) RTOS API API API API RTOS API API 7. ECU ECU ECU RTOS µitron OSEK OS API API DUOS API µitron OSEK OS API API OS OS ECU 8(ACS 18) pp.192-202 (2007) 3) TRON ASSOCIATION: µitron 4.0 Specification Ver.4.02.00 4) OSEK/VDX Group.: OSEK/VDX Operating System Specification 2.2.1 (2003) 5) TOPPERS : TOPPERS Release 1.1.0 (2009) 6) S.Devine, E.Bugnion, and M.Rosenblum: Virtualization system including a virtual machine monitor for a computer with a segmented architecture, US Patent (1998) 7) P.Barham, B.Dragovic, K.Fraser, S.Hand, T.Harris, A.Ho, R.Neugebar, I.Pratt and A.Warfield: Xen and the Art of Virtualization, In Proc. of the ACM Symposium on Operating Systems Principles (2003) 8) K.Robert and W.Stephan: The Pike OS Concept - History and Design, SYSGO AG : White paper (2007) 9) H.Härtig, M.Hohmuth, J.Liedtke, S.Schönberg and J.Wolter:e The Performance of µ-kernel-based Systems, 16th ACM Symposium on Operating Systems Principles (1997) 10) S.Oikawa, H.Ishikawa, M.Iwasaki and T.Nakajima: Providing Protected Execution Environments for Embedded Operating Systems Using a u-kernel, In Proc. of International Conference on Embedded and Ubiquitous Computing, 153-163 (2004) 11) http://ecos.sourceware.org 12) http://www.xenomai.org 1),,, :,, Vol.49 No.10 pp. 3508 3519 (2008) 2),,, :,, Vol.48 No.SIG 9 c 2010 Information Processing Society of Japan