--- title: 系統軟體課程進度與開放資源 categories: system programming, linux, performance, security, compiler, kernel toc: no ... - Instructor: [Jim Huang](/User/jserv) (黃敬群) `` * [Facebook 粉絲專頁](https://www.facebook.com/JservFans) (不要擔心提了笨問題,這就是專門和學生互動的) - 討論區: [https://www.facebook.com/groups/system.software2017/](https://www.facebook.com/groups/system.software2017/) - 課程信箱: `` - [行事曆](https://calendar.google.com/calendar/embed?src=4mp6h7b77t2tqkveavtgqaple0%40group.calendar.google.com&ctz=Asia%2FTaipei): 可預約一對一討論 進階電腦系統理論與實作 (Fall 2017) ------------------------------------------------------ * 第 1 週 (Sep 22): 誠實面對自己 - [課程簡介和注意須知](https://docs.google.com/presentation/d/1-6ZlaL3vd-a54omTpcTQPudbpxz-eqisyd7PY4e_Ctc/edit#) - 注意: 第 2 週安排測驗,請準時參加,[春季班考題](https://drive.google.com/file/d/0B2k5UNgAENkrSlBsOUJIQTNqQ0k/view?usp=sharing) * 第 2 週 (Sep 29): 期初測驗 * 第 3 週 (Oct 6) 作業系統設計與實作 (Spring 2017) ------------------------------------------------------ * 第 1 週 (Feb 21): 誠實面對自己:不是這門課程很操,是你過去欺騙了自己 ([第 1 週課程錄影](https://www.youtube.com/watch?v=XXiPPUzld84)) - [課程簡介和注意須知](https://docs.google.com/presentation/d/1eztX6zH26fTaGS5_c4nydp1rE-7UNzhzkx4EPn26B9c/edit#slide=id.p) - [21 世紀的系統軟體](https://hackmd.io/s/BkeL-hLtg): 「需求」層次: 正確 → 安全 → 可讀 → 優雅 → 利他; Benchmark / Profiling; 運算模式的巨變; Deep Learning 背後的資訊建設: GPU; 軟體品質和安全議題 - [重新理解數值](https://hackmd.io/s/Hy-pTh8Fl): integer overflow; 邏輯和算術的差異; 運用 bit-wise operator; Count Leading Zero - [Programming Small](https://hackmd.io/s/HkO2ZpIYe) - [2017 年春季作業說明](https://hackmd.io/s/Bk-1zqIte) - [課程表單](https://goo.gl/forms/jOIG9QDK3QtUE7Xh2) / 推薦閱讀: [因為自動飲料機而延畢的那一年](http://opass.logdown.com/posts/1273243-the-story-of-auto-beverage-machine-1) - [期初測驗](https://drive.google.com/file/d/0B2k5UNgAENkrSlBsOUJIQTNqQ0k/view?usp=sharing) - [作業](https://hackmd.io/s/Hy2rieDYe) (截止日: Mar 4) * [phonebook](https://hackmd.io/s/rJYD4UPKe), [raytracing](https://hackmd.io/s/HyuBWDwYl), [compute-pi](https://hackmd.io/s/HkiJpDPtx), [clz](https://hackmd.io/s/ry1u0uDFg) * 第 2 週 (Feb 28): 重新理解電腦結構 - [Computer Architecture](https://hackmd.io/s/H1sZHv4R) ([NOTE](https://hackmd.io/s/rkloHgHcx)) - [Modern Microprocessors A 90 Minute Guide!](http://www.lighterra.com/papers/modernmicroprocessors/) (必讀) * [重點提示和解說](https://hackmd.io/s/Hk2CscGcl) - 作業 (截止日: Mar 11) * [introspect](https://hackmd.io/s/SyFpOZQqx) * 第 3 週 (Mar 7): 效能改善,從掌握計算機組織開始 - [SIMD Programming Introduction](https://goo.gl/Rc8xPE) - [在計算機裡頭實踐演算法](https://hackmd.io/s/HyKtIPN0) - [論文 When Prefetching Works, When It Doesn’t, and Why 重點提示和解說](https://hackmd.io/s/HJtfT3icx) - [Code Review: Homework1](https://hackmd.io/OwYwjALARiDMCGBaAbMZAzRECmykA4p8RFsQIx1UAGWATmiA) - [作業](https://hackmd.io/s/HkYlSCJil) (截止日: Mar 20) * [software-pipelining](https://hackmd.io/s/rks62p1sl) * 第 4 周 (Mar 14): 開發工具和並行程式設計 - 近期活動: [前往新加坡工作的第一手資訊](https://www.facebook.com/JservFans/posts/1119413731518293), [手機裡的 ARM 處理器: 系列講座導論](https://www.facebook.com/events/431100433897526/) - [C 語言演化背景和編譯器原理](https://hackmd.io/s/rkjxY6Vjx) - [第 1 週作業回顧](https://hackmd.io/s/BkCe3bSox) - [Toward Concurrency](https://hackmd.io/s/Skh_AaVix) - [測驗](https://hackmd.io/s/H1LYz4Box) / [測驗上傳區](https://hackmd.io/s/HyGmSNrie) - [作業](https://hackmd.io/s/r1lxtzpOig) (截止日: Mar 27) * [phonebook-concurrent](https://hackmd.io/s/rkOExTOoe), [mergesort-concurrent](https://hackmd.io/s/B1xV_p_jl), [microarch](https://hackmd.io/s/r1Olsp_og) * 第 5 周 (Mar 21): 並行程式設計 - 近期活動: [手機裡的 ARM 處理器: 架構和指令集](https://www.facebook.com/events/1913208585629605/), [作業系統概念: Concurrency 程式設計篇 (2)](https://www.facebook.com/events/428684527477530/) - [第 3 週作業回顧](https://hackmd.io/s/HkbFAHRjl) - [C 語言程式設計技巧](https://hackmd.io/s/HyIdoLnjl) - 案例分析: [Linaro Cortex String benchmark for ARMv8](https://wiki.linaro.org/WorkingGroups/Kernel/ARMv8/cortex-strings) * [ssvb/tinymembench](https://github.com/ssvb/tinymembench); [hglm/test-arm-kernel-memcpy](https://github.com/hglm/test-arm-kernel-memcpy) - [inline assembly 中文解說](https://hackmd.io/s/S1-0Ymqsg) - [Toward Concurrency](https://hackmd.io/s/Skh_AaVix) - 預習: [手機裡的 ARM 處理器](http://hackfoldr.org/arm) ```C #include #define MAGIC1 0x100 #define MAGIC2 "\0\xff" #define IS_XXX (*(uint16_t *) MAGIC2 < MAGIC1) // big-endian or little-endian? ``` - [作業](https://hackmd.io/s/ryPKJUm2l) (截止日: Apr 8) * [matrix](https://hackmd.io/s/rkrrpHm2e) * 第 6 週 (3 月 28 日): Memory Model and Consistency - 近期活動: [手機裡的 ARM 處理器: 基礎指令和開發環境](https://www.facebook.com/events/155293451659852/) - [Toward Concurrency](https://hackmd.io/s/Skh_AaVix) - [第 4 週作業回顧](https://hackmd.io/s/rkQajOPhx) - 所見所聞: [再次經歷偉大的「1940 年代」](http://technews.tw/2017/03/22/its-the-1940s-again-ibms-scott-crowder-on-the-infancy-of-quantum-computers/); [99% 零組件 Made in Taiwan 的機器人](https://www.facebook.com/roboard.lab/posts/1359336907486389) * 第 7 週 (4 月 4 日): 掃墓,停課一次 * 第 8 週 (4 月 11 日) - [第 5 週作業回顧](https://www.facebook.com/groups/system.software2017/search/?query=week5) - [做好研究作業系統的準備](https://hackmd.io/s/B19wKV70x) - [2017 年春季班第一次分組表](https://hackmd.io/s/Hkxl2Zcpx) * 第 9 週 (4 月 18 日) - 近期活動: [新加坡求職座談會](https://www.facebook.com/JservFans/posts/1154886117971054) - [不要忘記今晚看成大自製人造衛星的升空直播](https://www.facebook.com/groups/system.software2017/permalink/1371429726255726/) * [為何資訊科技公司急欲發射人造衛星?](https://kknews.cc/tech/a9lgb6.html) - [深入理解 CPU 和異質運算核心](https://mp.weixin.qq.com/s/ieNYIhGDmBqY_urmH7O3TA) - [AI 晶片如何降低功耗?](https://zhuanlan.zhihu.com/p/25382177) - ARM: [聯發科手機晶片面臨的挑戰](https://richard-rrb.blogspot.tw/2017/04/20173.html) / [手機裡的 ARM 處理器](http://hackfoldr.org/arm) (有 8 份錄影) - [以 Linux 為分析對象](https://hackmd.io/s/B19wKV70x) - [案例分析: server-framework](https://hackmd.io/s/B1s8hX1yg) * 第 10 週 (4 月 25 日) - [2017 年春季班第一次分組表](https://hackmd.io/s/Hkxl2Zcpx) * 第 11 週 (5 月 2 日) - [2017 年春季班第二次分組表](https://hackmd.io/s/BJRio2rJb) - Quiz: [Bubble sort in ARM assembly](https://github.com/jserv/bubble-sort-arm) * 第 12 週 (5 月 9 日) - [軟體缺失導致的危害](https://hackmd.io/s/B1eo44C1-) - [淺談 Semaphore 與 Mutex](https://drive.google.com/file/d/0B-q4G2qfuMOGaDhiSlF1YzBURkU/view) * 錄影: [淺談 Semaphore 與 Mutex](https://www.youtube.com/watch?v=JEXwO_EoyZo) * [練習題](https://docs.google.com/document/d/1HYrW8gzn87ekAhntmrr5Dd00PN0WuRLblxFqvuNlUNg/edit#heading=h.jj4ulvjrppuw) - [The Little Book of Semaphores](http://greenteapress.com/semaphores/LittleBookOfSemaphores.pdf) - [以 Linux 為分析對象](https://hackmd.io/s/B19wKV70x) * 第 13 週 (5 月 16 日) - video: [Shimon Schocken 的電腦自修課程](https://www.ted.com/talks/shimon_schocken_the_self_organizing_computer_course?language=zh-tw) - [2017q1 期初測驗提示](https://hackmd.io/s/S1DCzEOeZ) * 第 14 週 (5 月 23 日) - [2017 年春季班第二次分組表](https://hackmd.io/s/BJRio2rJb) * 第 15 週 (5 月 30 日): 端午連續假期,停課 * 第 16 週 (6 月 6 日) - 新聞: [成大、永豐銀行 成立Atelier Future未來智慧生活工場](http://web.ncku.edu.tw/files/13-1000-166724.php?Lang=zh-tw) - Blockchain: [動畫](https://www.youtube.com/watch?v=6WG7D47tGb0), [The Blockchain and Us](https://www.youtube.com/watch?v=2iF73cybTBs), [技術簡介](https://www.slideshare.net/IBTSMG/blockchain-67620150), [市場分析](https://blogs.thomsonreuters.com/answerson/blockchain-technology-chain-reaction/) - [2017 年春季班第二次分組表](https://hackmd.io/s/BJRio2rJb) 進階電腦系統理論與實作 (Fall 2016) ------------------------------------------------------ * 第 1 週 (Sep 23): 誠實面對自己:不是這門課程很操,是你過去欺騙了自己 - [課程簡介和注意須知](https://docs.google.com/presentation/d/15F6sTm9WN6Efc5pjP8HkUVCfNbjqK859-7vYJy81kAc/edit#slide=id.p) - [21 世紀的系統軟體](https://hackmd.io/s/r1srX7Za): 「需求」層次: 正確 → 安全 → 可讀 → 優雅 → 利他; Benchmark / Profiling; 運算模式的巨變; Deep Learning 背後的資訊建設: GPU; 軟體品質和安全議題 - [你所不知道的 C 語言](http://hackfoldr.org/dykc/): 本週進度為「指標篇」和「物件導向程式設計篇」 - [重新理解數值](https://hackmd.io/s/SkKZBXZT): integer overflow; 邏輯和算術的差異; 運用 bit-wise operator; Count Leading Zero - [Programming Small](https://hackmd.io/s/S1rbwmZ6): 在小處下功夫,不放棄整體改善的機會 - [本學期作業說明](https://hackmd.io/s/B1DmtJfT) - [隨堂測驗](https://hackmd.io/s/r13u0Af6) - [作業](https://hackmd.io/s/H1B7-hGp) (截止日: Sep 29) * [phonebook](https://hackmd.io/s/S1RVdgza), [raytracing](https://hackmd.io/s/B1W5AWza), [compute-pi](https://hackmd.io/s/rJARexQT), [clz](https://hackmd.io/s/B1LHefQ6) * [W1-QA](https://hackmd.io/s/Hka2UE8a) (只有選修課程的學生需要完成這項) * 第 2 週 (Sep 30): 並行 + 演算法分析 - [第 1 週作業回顧](https://hackmd.io/s/HydMPmjT) - [concurrency](https://hackmd.io/s/H10MXXoT): Concurrency (並行) vs. Parallelism (平行); POSIX Threads; Thread Pool; Lock-free Thread Pool; 對 Linked-List 排序; Producer-Consumer Problem - [Algorithm Complexity Analysis](http://discrete.gr/complexity/) - [隨堂測驗](https://goo.gl/forms/mGZvzTbCbJfBkgwr1): 題目: 將 [Linked List Bubble Sort](http://faculty.salina.k-state.edu/tim/CMST302/study_guide/topic7/bubble.html) 裡頭的排序演算法從 recursive bubble sort 更換為 recursive merge sort - [作業](https://hackmd.io/s/HykJUcnT): (截止日: 08:00AM Oct 7) * [introspect](https://hackmd.io/s/BkhIF92p), [phonebook-concurrent](https://hackmd.io/s/rJsgh0na) * [W2-QA](https://hackmd.io/s/Sk29RMbC) (只有選修課程的學生需要完成這項) * 第 3 週 (Oct 7): 重新理解電腦結構 - [第 2 週作業回顧](https://hackmd.io/s/HkUy3wVC) - [Computer Architecture](https://hackmd.io/s/H1sZHv4R) ([NOTE](https://paper.dropbox.com/doc/Computer-Architecture-Notes-NfGP1aZt2pAkgTcFeiEmc)) - [Modern Microprocessors A 90 Minute Guide!](http://www.lighterra.com/papers/modernmicroprocessors/) (必讀) - [SIMD Programming Introduction](https://goo.gl/Rc8xPE) - [在計算機裡頭實踐演算法](https://hackmd.io/s/HyKtIPN0) - [作業](https://hackmd.io/s/Sy-ch58A): (截止日: 08:00AM Oct 14) * [mergesort-concurrent](https://hackmd.io/s/rJ-GWtJ0), [software-pipelining](https://hackmd.io/s/ry7eqDEC) * [W3-QA](https://hackmd.io/s/r1M_l_NA) (只有選修課程的學生需要完成這項) * 第 4 週 (Oct 14): 作業系統概念的實踐 - [2016 年秋季班分組表(第一次)](https://hackmd.io/CYMwbADAHATAhmAtAVmQRiQFjqxAjYTTRYePZGAYwE4BmSsGIA==?view) - [灰姑娘真能穿玻璃鞋跳舞?工程師提出解答](http://archive.eettaiwan.com/www.eettaiwan.com/ART_8800676444_676964_NT_557e5885.HTM) * 1697 年《鵝媽媽的故事》和 1812 年《格林童話》都提到灰姑娘,而灰姑娘穿什麼材質的玻璃鞋,能夠承受她的體重,讓她舒適地走路和跳舞? - [第 3 週作業回顧](https://hackmd.io/s/S1Bj65p0) - Operating System Concepts - [案例探討: 強化 server-framework 效能](https://hackmd.io/s/rJFnrj6A) - [隨堂測驗](https://goo.gl/forms/pDbtYxeoJHNvmBz32): [題目](https://hackmd.io/s/S1jWCna0) - [作業](https://hackmd.io/s/Sy_O7uCA): (截止日: Oct 20) * server-framework, 回顧既有的作業 * 第 5 週 (Oct 21): 為什麼你該理解編譯器 - [淺談 Microkernel 設計和真實世界中的應用](https://embedded2016.hackpad.com/-Microkernel--xeGzRmcbT20) - [回顧 SIMD 和計算機組織](https://hackmd.io/BwFgnATArARgbFAtBOAGAjIkB2AhpsVAZiMXQBMJsJzUIAzIuAYyA===) + [案例分析:轉置矩陣](https://hackmd.io/s/ryTASBCT) - [編譯器和最佳化原理](https://embedded2015.hackpad.com/C-DWAUb7NnQF0) - [動態連結器](https://embedded2015.hackpad.com/C-VESe3UsncpM) - [作業](https://hackmd.io/s/rk7H0Pw1g): (截止日: Oct 27; 下方擇一,並且 Week4 的專題要繼續作) * [jit-compiler](https://hackmd.io/s/SJ7AZJv1e), [rubi](https://hackmd.io/s/SyWEhlDJx) * 第 6 週 (Oct 28): 你所不知道的記憶體 - [回顧第一次分組成果](https://hackmd.io/s/rkKY7RJex) - [2016 年秋季班分組表(第二次)](https://hackmd.io/s/r1-e1Jgll) - [羅輯思維: 怎樣成為一個高手](https://www.youtube.com/watch?v=4JhlfRAzVKY): 從 12:08 開始 - [Memory Allocation](https://hackmd.io/s/B1SRlfeee) - [How a Rogue Optimization Breaks C11 Memory Consistency](https://goo.gl/B68s9X) - [DTrace for Linux 2016](http://www.brendangregg.com/blog/2016-10-27/dtrace-for-linux-2016.html): BPF tracing 是 Linux 效能分析最後一塊拼圖 * 第 7 週 (Nov 4) 數學總複習:線性代數, 離散數學, 機率統計 - [理解矩陣](http://www.52cs.org/?p=175), [從離散數學到數學文化](http://hkumath.hku.hk/~mks/20DiscrMath.pdf) - [形式化驗證 / Formal verification](https://hackmd.io/s/H1xxp3pF0) - [2016q3 Quiz](https://docs.google.com/document/d/1vGH8ZS7cP0DVjr6jeo91NCCNEXJmhDrzaY5qX0nDrG4/edit?usp=sharing) * 第 8 週 (Nov 11): 校慶停課 * 第 9 週 (Nov 18) 第二次分組成果報告 - [學期評分須知](https://hackmd.io/s/rkfCYai-x) - [新的專案題目](https://hackmd.io/s/Hy4g26jbg) (選擇性) - [第二次分組成果回顧](https://hackmd.io/s/r1-e1Jgll) ## Computer Systems: A Programmer's Perspective * [CMU 官方網站](http://csapp.cs.cmu.edu/) * 推薦閱讀: (和本課程高度相關) - [Machine-Level Representation of Programs](http://csapp.cs.cmu.edu/2e/ch3-preview.pdf) - [Processor Architecture](http://csapp.cs.cmu.edu/2e/ch4-preview.pdf) - [Optimizing Program Performance](http://csapp.cs.cmu.edu/2e/ch5-preview.pdf) - [The Memory Hierarchy](http://csapp.cs.cmu.edu/2e/ch6-preview.pdf) - [Linking](http://csapp.cs.cmu.edu/2e/ch7-preview.pdf) - [Exceptional Control Flow](http://csapp.cs.cmu.edu/2e/ch8-preview.pdf) - [Virtual Memory](http://csapp.cs.cmu.edu/2e/ch9-preview.pdf) - [System-Level I/O](http://csapp.cs.cmu.edu/2e/ch10-preview.pdf) - [Concurrent Programming](http://csapp.cs.cmu.edu/2e/ch12-preview.pdf)