0% found this document useful (0 votes)
27 views6 pages

SN-IES-1-002 - RTE - OS - Invocation - RTE - Handling - of - Runnable - Mappings - On - Different - Task - Types

Uploaded by

kannaak4747
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views6 pages

SN-IES-1-002 - RTE - OS - Invocation - RTE - Handling - of - Runnable - Mappings - On - Different - Task - Types

Uploaded by

kannaak4747
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

RTE OS Invocation – RTE Handling of Runnable Mappings on Different Task

Types
2019-08-14
Support Note SN-IES-1-002

Author(s) Zollner, Felix


Restrictions Public Document

Table of Contents
1 Overview .......................................................................................................................................... 2
2 Definitions ........................................................................................................................................ 2
2.1 WaitPoint .................................................................................................................................. 2
2.2 Partition .................................................................................................................................... 2
2.3 Runnable Entities ..................................................................................................................... 2
2.4 Specification of Task Mapping ................................................................................................. 2
3 Requirement to Map a Runnable to a Task ..................................................................................... 3
4 Target of This Project ...................................................................................................................... 3
5 Summary of the Requirements Above ............................................................................................. 4
5.1 No Mapping of Runnables Required ........................................................................................ 4
5.2 Mapping of Runnables to the BASIC Task .............................................................................. 5
6 Contacts ........................................................................................................................................... 6
SN-IES-1-002

1 Overview
The AUTOSAR RTE is the runtime environment between application and basic software. The
functionality of the software components and the BSW modules are inherited in runnable entities. The
triggering of the runnable entities is handled by the RTE.

This document gives an overview of the triggering strategies the RTE uses when handling runnable
entities.

2 Definitions
2.1 WaitPoint

WaitPoints are used by the RTE to handle a runnable trigger out of another runnable execution which
is not in the same context. How the WaitPoint is realized depends on the configuration of the RTE
item.

WaitPoints are used in the RTE APIs (specification of RTE: AUTOSAR_SWS_RTE Chapter 4.2.2.4)
and can be configured:

> RTE_Feedback
> RTE_Receive
> RTE_SwitchAck
> RTE_Result

Also, RTE_Call could implement a WaitPoint if the configuration of the port access of a C/S interface
sets a timeout or is synchronous and calls the server port over core/partition boundaries.

2.2 Partition
A partition defines the context of an OS item in which it is running. The easiest sample is a core. At
least each core represents one partition (which has to be configured as OS Application). All OS items
that are mapped to one core have to be mapped to the partition of this core.

The second use case are the safety levels that are running in your system. Each ASIL Level needs its
own partition, so all OS items mapped to the ASIL Level need to be mapped to the ASIL partition. In
combination to one core there can be several ASIL core partitions necessary since ASIL partitions
cannot cross core boundaries.

2.3 Runnable Entities


There are defined different types of runnable entities by AUTOSAR (Software Component Template
Chapter 7.2.4.4 – Categories of Runnable Entities):

> Category 1 runnable entities do not have WaitPoints and are required to terminate in an infinite
amount of time. Category 1 is divided into two subcategories:
> Category 1A runnable entities are only allowed to use implicit APIs

> Category 1B runnable entities are additionally allowed to invoke a server and can use
explicit APIs

> Category 2 runnable entities always aggregate at least one WaitPoint


2.4 Specification of Task Mapping
AUTOSAR specified the possible Task Mappings in the RTE Specification in chapter 4.2.2.6.1 as
follows:
1. Runnable entities using variable accesses in the dataReadAccess or
dataWriteAccess roles (implicit read and send) have to terminate.
2. Runnable entities of category 1 can be mapped either to basic or extended tasks.
Copyright © 2019 – Vector Informatik GmbH 2
Contact Information: www.vector.com or +49-711-80 670-0
SN-IES-1-002

3. Runnable entities using at least one WaitPoint are of category 2.


4. Runnable entities of category 2 that contain WaitPoints will be typically mapped to extended
tasks.
5. Runnable entities that contain a synchronous server call point generally have to be mapped to
extended tasks.
6. Runnable entities that contain a synchronous server call point can be mapped to basic tasks if
no timeout monitoring is required and the server runnable is on the same partition.
7. Runnable entities that contain a synchronous server call point can be mapped to basic tasks if
the server runnable is invoked directly and is itself of category 1.

Additionally, the MICROSAR RTE defines some extensions (technical reference MICROSAR RTE
Chapter 6.2 – Task Configuration):

8. A basic task can be used when all runnables of the task are triggered by one or more identical
triggers. A typical example for this might be several cyclic triggered runnables that share the
same activation offset and cycle time.
9. There is also the possibility to select task type BASIC if all runnables of a task are triggered
cyclically but have different cycle times or different activation offsets. The RTE realizes the
basic task with the help of OS schedule tables.
10. Moreover another prerequisite for basic task usage is that the mapped runnables do not use
APIs that require a WaitPoint, like a blocking Rte_Feedback().
11. If the above described conditions are not fulfilled, an extended task has to be used. The
extended task can wait for different runnable trigger conditions e.g. data reception trigger,
cyclic triggers or mode switch trigger.

Also, the partition boundaries cannot be crossed within direct client/server calls, therefore:

12. Runnable entities that contain a synchronous server call point can be mapped to BASIC tasks
if the call does not cross partition boundaries, so when client and server runnable belong to
the same partition.

3 Requirement to Map a Runnable to a Task

When does a runnable has to be mapped to a task?


(Technical reference RTE, chapter 6.2 – Task Configuration)

Runnable entities triggered by any kind of RTE event e.g. TimingEvent have to be mapped
to tasks. Only server runnables (triggered by an OperationInvokedEvent) that either have
their CanBeInvokedConcurrently flag enabled or that are called from tasks that cannot
interrupt each other do not need to be mapped. For optimization purposes they can be
called directly and are then executed in the context of the calling runnable (client).

4 Target of This Project


The target of this coaching project is to show how runnable entity mapping can be optimized regarding
to the following targets:

1. map as less runnable entities as possible to tasks


2. map runnable entities to BASIC tasks if possible

The main scope is to use as much basic tasks as possible, so originally target 2 would be more
prioritized, but if a runnable does not have to be mapped, there is no need to map it to an extended
task as well, therefore the prioritization switched.
Copyright © 2019 – Vector Informatik GmbH 3
Contact Information: www.vector.com or +49-711-80 670-0
SN-IES-1-002

5 Summary of the Requirements Above


To sum up the requirements above, the main target would be to avoid mapping server
runnables to tasks, as shown below. Then the next step would be to check which
runnables could be mapped to BASIC tasks or what to change to make runnables
mappable to BASIC tasks.

5.1 No Mapping of Runnables Required

Runnables do not have to be mapped to tasks if:

Copyright © 2019 – Vector Informatik GmbH 4


Contact Information: www.vector.com or +49-711-80 670-0
SN-IES-1-002

5.2 Mapping of Runnables to the BASIC Task

Runnables can be mapped to a BASIC task if:

Copyright © 2019 – Vector Informatik GmbH 5


Contact Information: www.vector.com or +49-711-80 670-0
SN-IES-1-002

6 Contacts
For support related questions please address to [email protected].

Copyright © 2019 – Vector Informatik GmbH 6


Contact Information: www.vector.com or +49-711-80 670-0

You might also like