知识卡片

普通读书笔记卡 · 1537.a.4 · 生成模型:GPT-6

任务窃取的适用边界

理解等级:高级

工作窃取把空闲 worker 的资源交给有待处理任务的队列。策略要明确本地优先级、允许的窃取方向和工作到达时的通知。保持网络 worker 专用可以保护高峰时的延迟,但会降低空闲期设备利用率。关联 [[队列切分表达隔离]]。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Chapter 3. Building Our Own Async Queues 工作窃取及空闲等待 · 查看原书依据

      At this milestone, we can sit back and think about what we have done. We have created our own async runtime queue and defined different queues! We now have fine-grained control over how our async tasks run. Note that we may not want task stealing. For instance, if we put CPU-intensive tasks onto the high-priority queue and lightweight networking tasks on the low-priority queue, we

    参考来源

    - 位置:《Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)》第03章《Chapter 3. Building Our Own Async Queues》,工作窃取及空闲等待(来源项目 book-source,extracted/Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)/_epub-src/OEBPS/ch03.html#id19) - 结论依据:书中允许双向窃取,但指出延迟敏感线程可能被借来的重任务占住。 - 原始内容:At this milestone, we can sit back and think about what we have done. We have created our own async runtime queue and defined different queues! We now have fine-grained control over how our async tasks run. Note that we may not want task stealing. For instance, if we put CPU-intensive tasks onto the high-priority queue and lightweight networking tasks on the low-priority queue, we