博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
TBB Task Scheduler Notes
阅读量:5322 次
发布时间:2019-06-14

本文共 1061 字,大约阅读时间需要 3 分钟。

* Distribute tasks in a round-robin fashion.

* Required APIs:

void task::spawn_root_and_wait(taks&);

void task::spawn(task&);
void task::spawn_and_wait_for_all(task&);

Depth-first execution:

  * Strike when the cache is hot. The deepest tasks are the most recently created tasks, and therefore are

hottest in cache.

  * Minimize space. Depth-first execution creates nodes linearly.

Breadth-first execution:

  * Maximize parallelism.

Eah thread has its own task queue. When a thread spawns a task, it pushes it onto the bottom of its queue. (top:

oldest task, bottom: youngest task)

A thread continually executes a task obtained by the first rule below that applies:

1. Pop a task from the bottom of its own queue. This rule does not apply if the queue is empty. (depth-first

execution)

2. Steal a task from the top of another randomly chosen queue. If the chosen queue is empty, the thread tries

this rule again until it succeeds. (breadth-first execution)

posted on
2012-06-22 21:33 阅读(
...) 评论(
...)

转载于:https://www.cnblogs.com/len3d/archive/2012/06/22/2558971.html

你可能感兴趣的文章
数据结构与算法JavaScript描述
查看>>
每周总结③
查看>>
项目打包结构
查看>>
log4j
查看>>
linux下setsockopt函数的使用
查看>>
我的第一个python web开发框架(36)——后台菜单管理功能
查看>>
eclipse开发创建web项目
查看>>
iphone常见机型微信网页可视高度
查看>>
移动混合开发之HTML5在移动开发中的准则
查看>>
以Qemu模拟Linux,学习Linux内核
查看>>
Hadoop 综合大作业
查看>>
hexo安装
查看>>
python日期及时间格式转换
查看>>
MSP与PSP
查看>>
Android 使用RecyclerView SnapHelper详解
查看>>
Android开发学习:[15]自动导入包
查看>>
Struts2+JFreeChart
查看>>
touch事件记录
查看>>
[C语言 - 9] typedef
查看>>
在100万个数中找到最大的十个数
查看>>