## 5/7 待看: - [ ] [Linux 核心設計: 淺談同步機制](https://hackmd.io/@owlfox/SyVVY3EgI/https%3A%2F%2Fhackmd.io%2Fs%2FSJpp-bN0m) - [ ] [並行程式設計: 實作輕量級的 Mutex Lock](https://hackmd.io/@sysprog/concurrency-mutex) - [ ] [並行程式設計: 建立相容於 POSIX Thread 的實作](https://hackmd.io/@sysprog/concurrency-thread-package#priority-inheritance-mutex-%E5%AF%A6%E9%A9%97) - [ ] [透過 Model Checking 學習並行處理](https://hackmd.io/@sysprog/concurrency/%2F%40sysprog%2Fconcurrency-model-checking) - [ ] [並行程式設計: Reference Counting](https://hackmd.io/@sysprog/concurrency/%2F%40sysprog%2Fconcurrency-reference-count) - [ ] [Linux 核心模組運作原理](https://hackmd.io/@sysprog/linux-kernel-module) - [ ] [Circular buffer](https://en.wikipedia.org/wiki/Circular_buffer) ### 散裝知識點: lock 是啥? lock free 又是啥? spinlock vs. mutex lock 消耗 cpu 週期 vs. futex RT preempt npo 指令???? futex 操作?????到底是尛? crtical section ????? spinlock 是啥? 如何測量 context switch 的時間? ## 5/9 待看: - [ ] [futex(2) — Linux manual page](https://man7.org/linux/man-pages/man2/futex.2.html) - [ ] [Basics of Futexes](https://eli.thegreenplace.net/2018/basics-of-futexes/) - [ ] [Spinlock](https://en.wikipedia.org/wiki/Spinlock#Significant_optimizations) - [ ] [並行程式設計: Atomics 操作](https://hackmd.io/@sysprog/concurrency-atomics) - [ ] [False sharing](https://en.wikipedia.org/wiki/False_sharing) - [ ] [並行程式設計: Lock-Free Programming](https://hackmd.io/@sysprog/concurrency-lockfree) ### 散裝知識點: csapp 6, 9 task_struct vma ??? ring buffer ?? go chanel 是啥? 生產者、消費者的數量關係(如何知道?) lwp? thread ? ewma ? sysfs? sysctl? pthread barrier ? tsc?(time stamp counter) 消耗cpu週期??裝忙?nop? 等待特定cpu週期? https://en.wikipedia.org/wiki/Cache_coherence ? dequeue 要完成哪些操作? lock-free的程式 ?是三小?保證啥? RCU ?? folly ? lock 競爭? pre- cpu ??? ## 5/14 待看: - [x] [File position](https://www.gnu.org/software/libc/manual/html_node/File-Position.html) - [ ] [Introduction to Memory Management in Linux](https://www.youtube.com/watch?v=7aONIVSXiJ8) 最複雜 - [ ] [多核處理器和 spinlock](https://hackmd.io/@sysprog/multicore-locks) - [ ] [POSIX Shared Memory](https://logan.tw/posts/2018/01/07/posix-shared-memory/) - [ ] [memory hierarchy](https://www.cs.cmu.edu/~213/lectures/09-memory-hierarchy.pdf) - [ ] [Object-oriented design patterns in the kernel, part 1](https://lwn.net/Articles/444910/) 搭配老師的書 - [ ] [The Linux Driver Model - Greg KH](https://www.youtube.com/watch?v=AdPxeGHIZ74) ### 散裝知識點: boot loader SAS page ? slab memfd_create fd 檔案描述值 file descriptor fd vs. address | fd |address | | -------- | -------- | | 數字 | 地址 | mmu npu m map idel task figure 2.1 ### 5/16 待看 - [ ] [quiz13](https://hackmd.io/@sysprog/linux2024-quiz13) - [ ] [Reentrant mutex](https://en.wikipedia.org/wiki/Reentrant_mutex) - [ ] [並行程式設計: 實作輕量級的 Mutex Lock](https://hackmd.io/@sysprog/concurrency-mutex) - [ ] [futex(2) — Linux manual page](https://man7.org/linux/man-pages/man2/futex.2.html) - [ ] [你所不知道的 C 語言:記憶體管理、對齊及硬體特性](https://hackmd.io/@sysprog/c-memory) --- [Concurrency and Threads](https://pages.cs.wisc.edu/~remzi/OSTEP/threads-intro.pdf) ->[並行程式設計: Atomics 操作](https://hackmd.io/@sysprog/concurrency-atomics) --- --- [並行程式設計: 實作輕量級的 Mutex Lock ](https://hackmd.io/@sysprog/concurrency-mutex) ->[並行程式設計: 建立相容於 POSIX Thread 的實作](https://hackmd.io/@sysprog/concurrency-thread-package#priority-inheritance-mutex-%E5%AF%A6%E9%A9%97) 講的不清不楚,要改進 Newly created tasks are assigned a fictitious run time clock that, regardless of their weight, puts them at the end of the runqueue. This means that new, high priority tasks must wait for even the lowest priority task to run first. If tasks are blocked (doing I/O, sleeping, or handling a page fault) for more than one timeslice, CFS additionally offers I/O compensation by pushing them to the front of the runqueue. pid = 1 的 task 跑在哪個CPU 上? init 三小? kernel thread ? hardware thread ? pid = 0 schduler or swapper(以前的scheduler) 如何選 cpu ??? 三小 看:[UNIX 作業系統 fork/exec 系統呼叫的前世今生](https://hackmd.io/@sysprog/unix-fork-exec) smt 、 hardware thread 、cach、 hyper-thread => core-scheduling CPU 到底是指啥? perf 可以檢查 workload