advertisement
ETAS The INTECRIO Components reduces the required computing power at runtime and the memory requirement since it is not necessary to manage a high number of processes/RE but only a much smaller number of tasks.
Each task is assigned a static priority . Tasks activated at runtime are handled according to their respective priority. A task with a higher priority takes precedence over a task with a lower priority. Different tasks can have the same priority. If these tasks are scheduled for execution at the same time, they are arranged in a FIFO queue and processed based on the principle "First come, first served."
Dynamic scheduling is handled in accordance with a status model for the tasks. Upon activation, a task is changed to the status activated . If its priority is higher than that of the running task and if switching is possible, it is started (the latter translates to a direct transition from the status "inactive" to the status
"running") while the execution of the current task is interrupted (the task is changed to the status "activated"). At the end of the running task, i.e. when it changes to the status inactive , the activated task with the highest priority and at the first position of the respective FIFO queue is started or continued (if this
task was previously interrupted). Fig. 5-22 shows the existing task states and
all possible transitions.
Activated
Interrupt
Activate
Start
Running
Start
Terminate
Inactive
Fig. 5-22 Task states and transitions
5.8.1.3
Cooperative and Preemptive Scheduling
There are two possible methods for switching between a running task and an activated task with higher priority. The first switches the execution at predefined locations of the software. These predefined locations are the boundar-
INTECRIO V4.7 - User’s Guide 92
ETAS The INTECRIO Components ies between the processes/RE of a task. Since the task with the higher priority is waiting until the running process/RE finishes, this method is referred to as cooperative scheduling
Priority
Activate task B
Start task B
Task B p1
B p2
B p3
B p4
B p5
B
Task A p1
A p2
A p3
A p4
A
Time
Fig. 5-23 Cooperative scheduling
NOTE
Cooperative scheduling is not available for RTA-OSEK.
The advantage of cooperative scheduling is the efficient utilization of resources. The design ensures that access to resources, such as stack, register or messages, is exclusive. In addition, there is no need to secure the process/RE context when switching takes place; all processes/RE can be executed using the same register bank. The disadvantage of cooperative scheduling is the relatively slow response time that is dependent upon the longest execution time of the processes/RE.
The second strategy– preemptive scheduling –allows for switching the execution inside the processes/RE at the boundaries of machine instructions (provided that the interrupts are not deactivated).
The scheduler is, therefore, capable of interrupting the currently running process/RE of a task and starting the execution of a task with higher priority (see
Priority
Activate task B
Start task B
Task B p1
B p2
B p3
B p4
B p5
B
Task A p1
A p2
A
Interruption ...
p2
A p3
A p4
A
… Continuation of p2
A
Time
Fig. 5-24 Preemptive scheduling
INTECRIO V4.7 - User’s Guide 93
advertisement
Related manuals
advertisement
Table of contents
- 7 About this Document
- 7 Classification of Safety Messages
- 7 Presentation of Instructions
- 8 Typographical Conventions
- 8 Presentation of Supporting Information
- 9 Introduction
- 9 Safety Information
- 9 Correct Use
- 9 Demands on the Technical State of the Product
- 10 Privacy Statement
- 10 Data Processing
- 10 Data and Data Categories
- 11 Technical and Organizational Measures
- 12 Understanding INTECRIO
- 13 Challenges of the Electronic Control Unit Development
- 13 Complexity Through System Requirements
- 15 Complexity Through Distributed Development
- 16 Possible Steps
- 16 Description of Electronic Systems
- 17 Design and Operating Method of Electronic Systems
- 18 Architecture and Description of Electronic Systems
- 20 Application Software
- 23 Platform Software: Hardware Systems
- 23 Connecting Hardware and Software
- 24 Virtual Prototyping
- 25 Target-Close Prototyping
- 25 Advantages of Virtual Prototyping
- 26 Virtual Prototyping and Rapid Prototyping
- 27 INTECRIO in the Development Process
- 28 The INTECRIO Working Environment
- 32 Software Systems
- 32 Modules and AUTOSAR Software Components
- 34 Functions
- 35 Software Systems
- 35 Environment Systems
- 36 Hardware Systems
- 36 System Projects
- 38 Crossbar
- 40 Experimenting with INTECRIO
- 42 INTECRIO and AUTOSAR
- 42 Overview
- 43 RTA-RTE and RTA-OS
- 44 Creating AUTOSAR Software Components (outside INTECRIO)
- 44 Validating Software Components
- 46 What is a Runtime Environment?
- 47 AUTOSAR Elements in INTECRIO
- 47 AUTOSAR Software Components
- 48 Ports and Interfaces
- 48 Sender-Receiver Communication
- 49 Client-Server Communication
- 49 Calibration Parameter Interfaces
- 49 Runnable Entities and Tasks
- 50 Runtime Environment
- 51 The INTECRIO Components
- 52 Connectivity
- 54 Characteristics in the Creation of the Simulink Model
- 55 Contents of the Description File
- 55 ASCET Connectivity
- 56 Characteristics in the Creation of the ASCET Model
- 57 Contents of the Description File
- 57 The Hardware Configurator
- 58 Discontinued Hardware
- 59 HWX Import/Export
- 60 Ethernet Controller and XCP on UDP
- 60 XXX to CAN Gateway
- 60 ES900 Connectivity and Hardware Configurator
- 61 ES900 Configuration in the Hardware Configurator
- 65 Interface Types and Supported Interfaces
- 72 ES800 Connectivity and Hardware Configurator
- 73 ES800 Configuration in the Hardware Configurator
- 77 Interface Types and Supported Interfaces
- 84 PC Connectivity
- 85 The Project Configurator
- 86 Offline Mode
- 86 Modules and SWC
- 86 Functions
- 87 Software Systems and Environments
- 88 System Projects
- 89 Online Mode
- 90 The OS Configurator
- 90 Tasks of the Operating System
- 91 Scheduling
- 91 Tasks
- 92 Cooperative and Preemptive Scheduling
- 94 Data Consistency with Preemptive Scheduling
- 96 Application Modes
- 97 Design of the OS Configurator
- 98 The OSC Editor
- 98 Creating Tasks
- 101 Task Properties
- 103 Setting Up Timer and Software Tasks
- 104 Setting Up Interrupt Service Routines
- 106 The Project Integrator
- 106 The Build Process
- 107 Overview
- 108 Sequence
- 109 ASAM-MCD-2MC Generation
- 110 The ETAS Experiment Environment
- 111 Validation and Verification
- 111 Measuring and Calibrating
- 112 Experimenting with Different Targets
- 115 Environment
- 115 Bypass Experiment
- 116 Fullpass Experiment
- 118 X-Pass Experiment
- 118 Environment
- 118 The Documentor
- 119 RTA-TRACE Connectivity
- 120 SCOOP and SCOOP-IX
- 121 The SCOOP Concept
- 121 The SCOOP-IX Language
- 122 Modules and Interfaces
- 122 Description of the C Code Interface
- 123 Description of Semantic Information
- 123 Model Origin
- 125 Implementation
- 126 Module Data
- 127 Referenced Models
- 127 File
- 132 Creation of SCOOP-IX and Example
- 142 Modeling Hints
- 142 Modeling for INTECRIO
- 142 Modeling with Simulink
- 144 Modeling with ASCET
- 144 Integration of User Code
- 145 Bypass Concept
- 145 ETK Bypass Concept Description
- 145 Bypass Input
- 146 Hook-Based Bypass
- 147 Service-Based Bypass
- 149 Safety Considerations
- 149 Bypass Input Data
- 149 Bypass Calculation
- 149 Bypass Output Data
- 149 Message Copies
- 150 Service-Based Bypass Specifics
- 151 Service Processes for the SBB Implemented as Service Functions
- 152 Controlling the ECU Behavior from INTECRIO
- 152 OS Configuration for Service-Based Bypass V
- 152 Restrictions
- 153 Classical ECU Function Bypass
- 154 Bypass of an Entire ECU Functionality
- 155 Different Rasters
- 157 ECU-Synchronous Write-Back
- 158 Summary
- 160 Glossary
- 160 Abbreviations
- 164 Terms
- 169 Contact Information
- 170 Figures
- 174 Tables
- 175 Index