logo资料库

几种主流OSEK的横向比较.pdf

第1页 / 共50页
第2页 / 共50页
第3页 / 共50页
第4页 / 共50页
第5页 / 共50页
第6页 / 共50页
第7页 / 共50页
第8页 / 共50页
资料共50页,剩余部分请下载后查看
ISSN 0280-5316 ISRN LUTFD2/TFRT--5731--SE Investigation of Real-Time Operating Systems : OSEK/VDX and Rubus Pontus Evertsson Department of Automatic Control Lund Institute of Technology December 2004
Department of Automatic Control Lund Institute of Technology Box 118 SE-221 00 Lund Sweden Author(s) Pontus Evertsson Document name MASTER THESIS Date of issue December 2004 Document Number ISRNLUTFD2/TFRT--5731--SE Supervisor Karl-Erik Årzén at LTH in Lund Clas Emanuelsson at Haldex Traction in Landskrona. Sponsoring organization Title and subtitle Investigation of Real-Time Operating Systems: OSEK/VDX and Rubus (Analys av realtidsoperativsystem: OSEK/VDX and Rubus) Abstract The aim of this work was to investigate the possibilities and consequences for Haldex Traction of starting to use the OSEK/VDX standard for realtime operating systems. This report contains a summary of the realtime operating system documents produced by OSEK/VDX. OSEK/VDX is a committee that produces standards for realtime operating systems in the European vehicle industry. The report also contains a market evaluation of different OSEK/VDX realtime operating systems. The main differences between OSEK/VDX OS and a realtime operating system named Rubus OS are also discussed. There is a design suggestion of how to change an application that runs under Rubus OS to make it work with an OSEK/VDX OS. Finally a test of changing a small test application’s realtime operating system from Rubus OS to the OSEK OS osCAN is presented. Keywords Classification system and/or index terms (if any) Supplementary bibliographical information ISSN and key title 0280-5316 Language English Security classification Number of pages 48 Recipient’s notes ISBN The report may be ordered from the Department of Automatic Control or borrowed through:University Library, Box 3, SE-221 00 Lund, Sweden Fax +46 46 222 42 43
Contents Contents...................................................................................................................................... 1 Acknowledgement...................................................................................................................... 4 1 Introduction ............................................................................................................................. 5 1.1 Motivation for this work .................................................................................................. 5 1.2 Haldex AB........................................................................................................................ 5 1.2.1 Haldex Traction......................................................................................................... 5 The coupling................................................................................................................... 6 Basic function of the coupling ................................................................................... 6 Electronic control unit................................................................................................ 7 Software architectural design ..................................................................................... 7 1.3 Outline of the report ......................................................................................................... 8 2 OSEK/VDX............................................................................................................................. 9 2.1 Goal with OSEK/VDX..................................................................................................... 9 2.2 OSEK/VDX Operating System........................................................................................ 9 2.2.1 Architecture of the OSEK/VDX operating system ................................................... 9 Task management......................................................................................................... 10 Extended tasks.......................................................................................................... 10 Basic tasks................................................................................................................ 10 Conformance classes .................................................................................................... 10 2.2.2 Scheduling............................................................................................................... 11 Non preemptive scheduling.......................................................................................... 11 Full preemptive scheduling .......................................................................................... 11 Groups of tasks............................................................................................................. 11 Mixed preemptive scheduling ...................................................................................... 11 2.2.3 Application modes................................................................................................... 12 2.2.4 Interrupt processing................................................................................................. 12 2.2.5 Event mechanism .................................................................................................... 12 2.2.6 Resource management............................................................................................. 13 Problems with synchronisation mechanisms................................................................ 13 Priority inversion...................................................................................................... 13 Deadlocks................................................................................................................. 14 OSEK Priority Ceiling Protocol................................................................................... 14 2.2.7 Alarms ..................................................................................................................... 14 2.2.8 Error handling, tracing and debugging.................................................................... 15 2.3 OSEK/VDX Time-Triggered ......................................................................................... 16 2.3.1 Task management.................................................................................................... 16 2.3.2 Interrupt processing................................................................................................. 16 2.3.3 Synchronisation....................................................................................................... 17 2.3.4 Inter-Task Communication ..................................................................................... 17 2.3.5 Error handling ......................................................................................................... 17 2.4 OSEK/VDX Communication......................................................................................... 17 2.4.1 Requirements........................................................................................................... 17 2.4.2 Communication concept.......................................................................................... 17 2.4.3 Interaction Layer ..................................................................................................... 18 Overview ...................................................................................................................... 18 Message reception ........................................................................................................ 18 Message transmission................................................................................................... 18 Notification................................................................................................................... 19 1
Error handling .............................................................................................................. 19 2.4.4 Conformance classes............................................................................................... 19 2.5 OSEK/VDX Network Management............................................................................... 20 2.6 OSEK/VDX Implementation Language......................................................................... 20 2.6.1 General concept....................................................................................................... 20 3 Some OSEK/VDX RTOS ..................................................................................................... 22 3.1 Why OSEK/VDX........................................................................................................... 22 3.2 Important factors of OSEK OS for Haldex Traction...................................................... 22 3.3 Eight OSEK/VDX RTOS............................................................................................... 23 3.3.1 Eurosmot ................................................................................................................. 23 3.3.2 Ercosek.................................................................................................................... 23 3.3.3 OSEKturbo.............................................................................................................. 24 3.3.4 RTA-OSEK ............................................................................................................. 24 3.3.5 ProOSEK................................................................................................................. 25 3.3.6 Nucleus OSEK ........................................................................................................ 25 3.3.7 OX-OSEK ............................................................................................................... 26 3.3.8 osCAN..................................................................................................................... 26 3.4 Evaluation of the OSEK/VDX candidates ..................................................................... 27 4 Rubus OS, Arcticus Systems................................................................................................. 29 4.1 Rubus OS architecture.................................................................................................... 29 4.1.1 The Basic Services .................................................................................................. 29 Clocks and Timers........................................................................................................ 29 Event Log Services....................................................................................................... 30 Basic Queue Services ................................................................................................... 30 4.1.2 The Red Kernel Services......................................................................................... 30 Red Schedule................................................................................................................ 30 Red Error Handling ...................................................................................................... 30 4.1.3 The Blue Kernel Basic Layer Services ................................................................... 30 Blue scheduling ............................................................................................................ 30 Blue Kernel Threads..................................................................................................... 31 Blue Error Handling ..................................................................................................... 31 Signals .......................................................................................................................... 31 Interrupt Control........................................................................................................... 31 4.1.4 The Blue Kernel Thread Co-operation Layer Services........................................... 31 Mutex ........................................................................................................................... 31 Message Passing........................................................................................................... 32 4.1.5 The Blue Personality Services................................................................................. 32 4.2 Some differences between OSEK/VDX OS and Rubus OS .......................................... 32 4.2.1 Scheduling............................................................................................................... 32 4.2.2 Periodic activities .................................................................................................... 32 4.2.3 Resource management............................................................................................. 33 4.2.4 Application modes................................................................................................... 33 5 Conversion from Rubus OS to OSEK/VDX......................................................................... 34 5.1 Changes in the scheduling.............................................................................................. 34 5.2 Changes in the resource management ............................................................................ 35 5.3 Different application modes ........................................................................................... 35 5.4 Translation of the operating system calls....................................................................... 36 6 Test application ..................................................................................................................... 40 6.1 Introduction .................................................................................................................... 40 6.2 The test hardware and OSEK OS................................................................................... 40 2
6.3 The test application ........................................................................................................ 40 6.4 Two different approaches............................................................................................... 42 6.4.1 Using Haldex Traction’s makefiles......................................................................... 42 6.4.2 Using osCAN’s makefiles....................................................................................... 43 Summary .................................................................................................................................. 44 References ................................................................................................................................ 45 3
Acknowledgement The report is the master’s thesis of the Computer Science and Engineering Programme at Lund Institute of Technology. Several people have helped me with my report. I want to thank my supervisor Professor Karl-Erik Årzén at the Department of Automatic Control, LTH and my other supervisor Clas Emanuelsson at Haldex Traction. my work. I also want to thank the staff at the TTE division of Haldex Traction for their help with I want to thank all the RTOS vendors mentioned in this report. Without their information and help the work would have been impossible. Finally I want to thank Håkan Larsson for the help with the proofread and I want to thank Malin Bengtsson for not getting tired of the technical monologue. 4
分享到:
收藏