Skip to content

Commit fce89eb

Browse files
committed
task schduler system
1 parent a272992 commit fce89eb

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ coursework & notes for stanford cs149 Parallel Computing : http://cs149.stanford
22

33
# writeup
44
- [Performance Analysis on a Quad-Core CPU](asst1/README.md)
5-
- [writeup 1](asst1/write-up.md)
5+
- [quad-core hyper-thread cpu 性能分析](asst1/write-up.md)
6+
- [多线程任务调度系统](asst2/writeup.md)
67

78
# notes
89

asst2/writeup.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
title: 多线程任务调度系统
2+
3+
# feature
4+
5+
1. thread pool 支持
6+
2. sync/async 调度支持
7+
3. 工作队列 lock-free支持
8+
4. 有向图任务调度支持
9+
5. 无任务 sleeping 支持
10+
11+
12+
# 一些思考
13+
14+
1. 当总任务非常少,执行很快的时候,任务调度系统性能甚至还没有直接线性执行好,(原因: 额外计算,e.g. 原子访问,线程创建/切换)
15+
2. lock-free 的代价(主从线程串行执行,work queue,无lock;work-stealing无法实现,不过会减少额外开销)
16+
3. 关于是否应该对work queue加锁,以实现更大的并发,如果运行的任务都是一些长时间任务,加锁代价不是很大,可行,以实现高并发和work-stealing。
17+
118
```
219
================================================================================
320
Running task system grading harness... (22 total tests)

0 commit comments

Comments
 (0)