[Model Semantics] Activate Event of Tasks with multipleTaskActivationLimit > 1 [message #1826618] |
Mon, 27 April 2020 15:04  |
Eclipse User |
|
|
|
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 #1827128 is a reply to message #1826978] |
Thu, 07 May 2020 14:53   |
Eclipse User |
|
|
|
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 :-)
|
|
|
|
Powered by
FUDForum. Page generated in 0.02972 seconds