- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi~
I have some questions about the task execution.
Does all the tasks in the deque or the mailbox could be executed interchangeably?
I want to steal the task in other's mailbox and execute it right away under some special circumstances.
Is there anything I should aware of?
I find out that the task's execute() methods are only called in the wait_for_all().
Does that mean only the wait_for_all methods could make the task been executed?
I am trying to keep track of all the currently running tasks and record their affinity_ids.
So I want to record affinity_ids manually right before they are executed.
If there are some other ways could do this more easier, plz let me know.
I also find out there is a variable named "innermost_running_task" in GenericScheduler.
I am wondering that would TBB execute more than one task on a thread?
If not, what the purpose of "innermost" is?
Another question is, does all the tasks in the mailbox has the same affinity ID in current TBB implementation?
If not, could you give me some examples?
I am also curious about the purpose of the set_is_idle method of mail_inbox.
Sorry for asking so many questions.
Any help would be grateful!
Dennis
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - irisshinra308
I have some questions about the task execution.
Does all the tasks in the deque or the mailbox could be executed interchangeably?
I want to steal the task in other's mailbox and execute it right away under some special circumstances.
Is there anything I should aware of?
I find out that the task's execute() methods are only called in the wait_for_all().
Does that mean only the wait_for_all methods could make the task been executed?
I am trying to keep track of all the currently running tasks and record their affinity_ids.
So I want to record affinity_ids manually right before they are executed.
If there are some other ways could do this more easier, plz let me know.
I also find out there is a variable named "innermost_running_task" in GenericScheduler.
I am wondering that would TBB execute more than one task on a thread?
If not, what the purpose of "innermost" is?
Another question is, does all the tasks in the mailbox has the same affinity ID in current TBB implementation?
If not, could you give me some examples?
I am also curious about the purpose of the set_is_idle method of mail_inbox.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for replying.
I am trying to do some research about the sharing data scheduling issues, so I need to steal the tasks with specific affinty from their mailbox.
I know that the affinity information is only a hint for the scheduler to make a better choice.
The tasks with same affinity id have some sharing data which could be reused in the private cache.
Am I right?
So in the spawn(), it would send the task_proxy to the mailbox of affinity thread, but also it would put this task into the deque of current thread. Whoever takes the task first would execute it. Is this correct?
Sorry for bothering you for so many questions
Dennis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - irisshinra308
Yes this is correct.
I am trying to do some research about the sharing data scheduling issues, so I need to steal the tasks with specific affinty from their mailbox.
I know that the affinity information is only a hint for the scheduler to make a better choice. The tasks with same affinity id have some sharing data which could be reused in the private cache. Am I right?
So in the spawn(), it would send the task_proxy to the mailbox of affinity thread, but also it would put this task into the deque of current thread. Whoever takes the task first would execute it. Is this correct?
I know that the affinity information is only a hint for the scheduler to make a better choice. The tasks with same affinity id have some sharing data which could be reused in the private cache. Am I right?
So in the spawn(), it would send the task_proxy to the mailbox of affinity thread, but also it would put this task into the deque of current thread. Whoever takes the task first would execute it. Is this correct?
Yes this is correct.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page