Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » APP4MC » [Model Semantics] Activate Event of Tasks with multipleTaskActivationLimit > 1
[Model Semantics] Activate Event of Tasks with multipleTaskActivationLimit > 1 [message #1826618] Mon, 27 April 2020 19:04 Go to next message
Benjamin Beichler is currently offline Benjamin BeichlerFriend
Messages: 4
Registered: April 2020
Junior Member
From my understanding:
If a task is defined to have a multipleTaskActivationLimit more than 1, it could queue up multiple activations.

My assumption is also, that there could only be run exactly one or zero activation instances of a Task at the same time. This statement of course does not allow auto-concurrency, but this is also my experience from normal OS (like linux). If you want to have a second instance you need to fork (or similar) and create a new Task.

My understanding is currently the following: if a Task is triggered while it is still running, it is not immediately activated (the "activate event" is not emitted), but this activation is delayed until the "terminate event" of the current Task activation.

Taking the Process State Chart into consideration the Task could simply not be two times in the state machine, and the "activate event" is created by the "activate" state transition.

My question is, whether this is right, or the activate event should be emitted directly after the triggering of a stimulus ? This relates to the implementation of my BTF-Tracer which I implement from this specification ( https://wiki.eclipse.org/images/e/e6/TA_BTF_Specification_2.1.3_Eclipse_Auto_IWG.pdf ) but it applies in general to the meta model.
Re: [Model Semantics] Activate Event of Tasks with multipleTaskActivationLimit > 1 [message #1826978 is a reply to message #1826618] Tue, 05 May 2020 14:48 Go to previous messageGo to next message
Michael Pressler is currently offline Michael PresslerFriend
Messages: 3
Registered: May 2020
Junior Member
Hi Benjamin,

you are right. I would explain it as a stalled activation in a classical OSEK-based system. Once the current task instance is terminated the next activation is activtivated.

In modern systems this could look differently. For example if you spawn multiple worker threads executing the same functionality on different parts of the data you wish for concurrent execution in a multi-core system. In this case every instance has its own task state.

The latter case is not fully covered in App4mc for now. Either you misinterpret the multipleTaskActivationLimit which I would not suggest or you need to statically model every instance of the worker thread.

This is definitely a topic for future extension discussions.
Re: [Model Semantics] Activate Event of Tasks with multipleTaskActivationLimit > 1 [message #1827128 is a reply to message #1826978] Thu, 07 May 2020 18:53 Go to previous messageGo to next message
Benjamin Beichler is currently offline Benjamin BeichlerFriend
Messages: 4
Registered: April 2020
Junior Member
I think we completely agree. I think even your example could be modeled, if you have a bounded number of worker threads (which your answer might imply). Then each worker thread is a different task (with its own state) and you need some distribution logic (Round-Robin to all worker threads should be easily doable with some mode switch and counter).

Even modern system tend to not spawn dynamically threads for their activation (e.g. for web servers apache/nginx is a good example, where the actual request/response is generated by a limited thread pool).

Nonetheless, my actual question was already answered in another way, I was asking about the actual time point, where the activate event is generated. But since there exists also stimulus events, they mark the actual time point of triggering the process (in comparison to the activate event, which will be emitted, when the process can actually scheduled for execution).

Finally, I would suggest, that the multiple activation and therefore the stalled behavior of task activation is also documented in the meta model description/ app4mc help. The right person may open a low priority bug request at the right place :-)
Re: [Model Semantics] Activate Event of Tasks with multipleTaskActivationLimit > 1 [message #1827419 is a reply to message #1827128] Thu, 14 May 2020 09:21 Go to previous message
Michael Pressler is currently offline Michael PresslerFriend
Messages: 3
Registered: May 2020
Junior Member
Benjamin Beichler wrote on Thu, 07 May 2020 18:53

Finally, I would suggest, that the multiple activation and therefore the stalled behavior of task activation is also documented in the meta model description/ app4mc help. The right person may open a low priority bug request at the right place :-)


I put it on the todo list :)
Previous Topic:Data Binding Tool with C++
Next Topic:[Model Semantics] OsEvents - Counter in {Set|Clear}Event
Goto Forum:
  


Current Time: Tue Apr 23 12:40:18 GMT 2024

Powered by FUDForum. Page generated in 1.61029 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top