Skip to content

Commit 2df779c

Browse files
committed
暂时完结 scheduler,剩下的慢慢补
1 parent 2ce1f69 commit 2df779c

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

readme.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
Overview
2-
------
1+
# Overview
32

43
主要是源码分析,可能也会有一些使用上的知识点。
54

65
因为用了 stackedit 支持的 mermaid 图表,这些图表在 github 上显示不出来,如果想看完整内容的话,可以在 stackedit.io 上导出为 html。
76

8-
97
1. [x] Bootstrap
108
2. [x] Channel
119
3. [ ] Interface
@@ -18,7 +16,7 @@ Overview
1816
10. [ ] Reflect
1917
11. [ ] Panic
2018
12. [ ] Goroutine
21-
13. [ ] Scheduler
19+
13. [x] Scheduler
2220
14. [ ] GC
2321
15. [x] Assembly
2422
16. [ ] Map

scheduler.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ func sysmon() {
825825
}
826826
```
827827

828-
checkdead:
828+
#### checkdead
829829

830830
```go
831831
// 检查死锁的场景
@@ -904,7 +904,7 @@ func checkdead() {
904904
}
905905
```
906906

907-
retake:
907+
#### retake
908908

909909
```go
910910
// forcePreemptNS is the time slice given to a G before it is
@@ -1191,6 +1191,14 @@ goexit1 --> goexit0
11911191
goexit0 --> schedule
11921192
```
11931193

1194+
#### gogo
1195+
1196+
TODO
1197+
1198+
#### execute
1199+
1200+
TODO
1201+
11941202
#### findrunnable
11951203

11961204
findrunnable 比较复杂,流程图先把 gc 相关的省略掉了:
@@ -1443,7 +1451,7 @@ stop:
14431451

14441452
## m 和 p 解绑定
14451453

1446-
handoffp:
1454+
### handoffp
14471455

14481456
```mermaid
14491457
graph TD
@@ -1464,6 +1472,8 @@ entersyscallblock_handoff --> handoffp
14641472
retake --> |p status == syscall| handoffp
14651473
```
14661474

1475+
TODO 代码说明
1476+
14671477
## g 的状态迁移
14681478

14691479
```mermaid

0 commit comments

Comments
 (0)