---
# System prepended metadata

title: '2.2 : 不僅是個執行單元的 Process'
tags: [Linux 核心設計]

---

Linux 核心設計: 不僅是個執行單元的 Process
===
:::warning
注意！這是上課筆記
:::

:::info
原始課程在這裡
- [影片](https://www.youtube.com/watch?v=kcEcN43J3CQ)
- [講義](https://hackmd.io/@sysprog/linux-process)

Original by [jserv](http://wiki.csie.ncku.edu.tw/User/jserv)
:::

---



| Section | Time| Description |
| -------- | -------- | -------- |
| 1 | [00:00:11](https://youtu.be/kcEcN43J3CQ?si=0lRTZX5ZMUHahllH&t=11) | 1. task_struct.<br>2. 課程大綱。<br>3. 投影片 “Microkernels: The veterans of OS design”.<br>4. Microkernel 有嚴重的效能問題。|
| 2 | [00:11:34](https://youtu.be/kcEcN43J3CQ?si=6ctRrK_JvnCwM_EW&t=694) | 1. Mach microkernel.<br>2. FUSE:使用者層級提供檔案服務，例如雲端服務。<br>3. 回頭看 Linux.<br>4. Linux 對於 process and thread 的取捨。|
| 3 | [00:22:30](https://youtu.be/kcEcN43J3CQ?si=z9dx9ynDdxrKKhBH&t=1350) | 1. Process 和 Thread 有什麼差異？<br>2. 透過實驗統計來觀察差異。<br>3. 投影片 “Process Address Spaces and Binary Formats”<br>4. Linux:vm_area_struct.|
| 4 | [00:33:14](https://youtu.be/kcEcN43J3CQ?si=fgVFgzEWAYn7vemd&t=1994) | 1. mm_struct : 記憶體管理結構。<br>2. Linux 利用紅黑樹來做記憶體管理(Virtual memory).<br>3. mmap().<br>4. 新酷音輸入法。|
| 5 | [00:42:06](https://youtu.be/kcEcN43J3CQ?si=X7dVqgRa-MaknOFc&t=2526) | 1. Demand paging.<br>2. fork().<br>3. fork()的返回值設計。<br>4. COW(copy-on-write).|
| 6 | [00:54:16](https://youtu.be/kcEcN43J3CQ?si=g1g_KmU__0HzN_C2&t=3256) | 1. 投影片 “Scheduling (1)”<br>2. context switching.<br>3. ARM trustzone.<br>4. 利用暫存器降低IPC成本。<br>5. A runqueue belongs to a specific CPU.|
| 7 | [01:06:16](https://youtu.be/kcEcN43J3CQ?si=xj09stmHqqAxFHJv&t=3976) | 1. Blocked tasks put into wait queue.<br>2. "nice value" on priority: 人善被人欺。<br>3. realtime priority.<br>4. Responsive UIs. 優先權是動態的。Dynamic priority.<br>5. Linux scheduler machine learning.|
| 8 | [01:17:03](https://youtu.be/kcEcN43J3CQ?si=9dgy_YFSPmECV-Kq&t=4623) | 1. Rebalancing tasks.<br>2. SMP / NUMA.<br>3. signal.<br>4. demo: divide zero.<br>5. signal handler control flow.<br>6. android debuggerd signal.|
| 9 | [01:30:50](https://youtu.be/kcEcN43J3CQ?si=Zk6yREtKTi5B7ldI&t=5450) | 1. NPTL: Threading overview.<br>2. task_struct.<br>3. Linux 擴充需要重新編譯。<br>4. 聊聊編譯器變成公共財。|
| 10 | [01:43:11](https://youtu.be/kcEcN43J3CQ?si=jOOmA3uVeixPTwiN&t=6191) | 1. what is a thread library?<br>2. thread models.<br>3. 執行緒和同步議題。<br>4. reentrancy.|
| 11 | [01:59:35](https://youtu.be/kcEcN43J3CQ?si=0r2YCAhgMDcoU7br&t=7175) | 1. 投影片 “Thread & Synchronization”.<br>2. Go channel.<br>3. process state.<br>4. Linux kernel 的困難。|
| 12 | [02:21:33](https://youtu.be/kcEcN43J3CQ?si=cHtHolMPUytfFRng&t=8493) | 1. Linux thread state transition.<br>2. Linux process 是對於系統資源的抽象描述。<br>3. kernel preemption.<br>4. work queue.|
| 13 | [02:29:30](https://youtu.be/kcEcN43J3CQ?si=nD3K3_ZsuU1w087R&t=8970) | 1. 投影片 “Process Management”.<br>2. 文章 "Simulating the Linux Scheduler in user space".<br>3. 文章 “real-time scheduling analyzer”.<br>4. ARM-Linux 技術報告。|
| 14 | [02:47:08](https://youtu.be/kcEcN43J3CQ?si=oqVpPLD4QSevn1Uq&t=10028) | 1. 投影片 “Process Management: Abstracting Computing Resources”.<br>2. 文章 “Elements of a process”.<br>3. pstree: 觀察 process 階層。<br>4. 文章 “Program startup process in userspace”.