sysprog
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    2
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: 2021 年春季 Linux 核心設計課程期末專題 image: description: 「Linux 核心設計」課程期末專題清單 --- # 2021 年春季 [Linux 核心設計](http://wiki.csie.ncku.edu.tw/linux/schedule)課程期末專題 ###### tags: `linux2021` :::info :information_source: 注意事項 1. 所有專案都該確保在 Linux v5.4+ 運作 2. 所謂的「彙整」,是指能撰寫出完整的技術報告,範例: [位元運算整理](https://hackmd.io/@0xff07/BTS) 和 [基於 C 語言標準研究與系統程式安全議題](https://hackmd.io/@sysprog/c-std-security) 3. 專題不僅是課程評分的依據,而且是自己專業的證明,日後可列於個人簡歷 4. 請及早向[授課教師](https://www.facebook.com/JservFans)預約一對一討論,得知專題進行的方式 ::: ## LittleFS Arm Mbed 作業系統有個子項目名為 [littlefs](https://github.com/littlefs-project/littlefs),顧名思義就是針對嵌入式裝置開發的小型檔案系統,我們可透過 [FUSE](https://www.kernel.org/doc/html/latest/filesystems/fuse.html) 掛載到 Linux 或 macOS 作為檔案系統,卻不用撰寫對應的核心模組。本任務嘗試理解 [littlefs](https://github.com/littlefs-project/littlefs) 運作機制,包含其工具。 相關討論: * [littlefs-fuse](https://www.facebook.com/groups/system.software2020/permalink/326283654972507/) > 執行人: bobhsiao0306 ## simplefs > 題目: 從無到有開發針對 Linux 核心的檔案系統 為了探索 Linux VFS (virtual file system) 介面及檔案系統實作機制,我們從無到有撰寫一個運作於 Linux 核心模式中的精簡檔案系統,原始程式碼約一千餘行,支援基本的檔案和目錄處理,同時也考慮到權限和並行處理的議題。 相關討論: * [simplefs](https://www.facebook.com/groups/system.software2020/permalink/330569901210549/) > 執行人: Nahemah1022 $\to$ [開發紀錄](https://hackmd.io/@Nahemah1022/rJo1sAtid) > 執行人: fwfly $\to$ [開發紀錄](https://hackmd.io/@fwfly/simplefs) ## usbip 以 USB/IP 來說,這個實作已整合進 Linux 核心,能夠將 USB 裝置透過網路連線重新導向到另外一台電腦,具體來說: * USB 裝置實際所在的電腦稱為 server (伺服器),接收重導那台稱為 client(客戶端; * client 端可搭配 udev 和相關的工具,接受裝置重新導向後,自動掛載 server 端的 USB 裝置; 這樣的情境在虛擬化環境變得重要,因為一台伺服器可提供遠端桌面所需要資源,但是 USB 裝置往往就需要適度分享,於是透過 USB/IP 可讓遠端裝置分享變得可行。 相關討論: * [usbip](https://www.facebook.com/groups/system.software2020/permalink/331069264493946/) ## vcam > 題目: 打造 Linux 虛擬攝影機裝置驅動程式 vcam 是個針對 Linux 核心開發的虛擬攝影機裝置,全部程式碼僅 1 千 5 百行,從而可理解 V4L2 (video fro Linux APIs, version 2) 的使用和 Linux 多媒體架構。開發一個虛擬的攝影機裝置除了理解 Linux 核心設計外,也有資訊安全的幫助,例如你可以安插相關程式碼,紀錄有哪些應用程式偷偷啟動攝影機,但過程中又不會揭露真正的隱私。本議程不僅討論 V4L2,也涵蓋 DMA-Buf 這樣著重 Zero-copy 裝置驅動程式運作機制。 相關討論: * [vcam](https://www.facebook.com/groups/system.software2020/permalink/332852434315629/) * [2020 年開發紀錄](https://hackmd.io/@eecheng/B16rQ3GjU) / [GitHub](https://github.com/eecheng87/vcam) > 執行人:WayneLin1992 $\to$ [開發紀錄](https://hackmd.io/@WayneLin1992/HkDBmLUDO) / [GitHub](https://github.com/WayneLin1992/vcam) ## `/dev/mem` 研究 編撰 [Linux 核心的 /dev/mem 裝置](https://hackmd.io/@sysprog/linux-mem-device),強化 eBPF, crash 等工具的運用,目標是「成為電腦的主人」 —— 想改哪段記憶體就動手變更 > 執行人: jhan1998 $\to$ [開發紀錄](https://hackmd.io/@jhan1998/Hk61Y4dd_) ## Linux 排程器研究 研讀 "Trace Linux Kernel Scheduler Events" 並擴充 > 執行人: RZHuangJeff $\to$ [開發紀錄](https://hackmd.io/@Forward1105/reading-digest) > 執行人: henrybear327 ## Linux 核心 CoW 研究 探討 Linux 核心內部 CoW 的實作機制 > 執行人: linD026 $\to$ [開發紀錄](https://hackmd.io/@linD026/Linux-kernel-COW-content) ## 改進 [mimalloc](https://github.com/microsoft/mimalloc) [mimalloc](https://github.com/microsoft/mimalloc) 是 Microsoft Research 主導的開放原始碼專案,旨在提出更輕量且更有效率的記憶體管理器 (即 malloc/free 等函式) 的實作。 * [mimalloc 實作機制和改善](https://hackmd.io/@jserv/BynrpV0eB) * [Brief History of Free List Sharding](https://hackmd.io/@hPMCWajOS-ORQdEEAQ04-w/HJbeisVNB) * [IsoAlloc Performance](https://github.com/struct/isoalloc/blob/master/PERFORMANCE.md) > 執行人: hankluo6 $\to$ [開發紀錄](https://hackmd.io/@hankluo6/mimalloc) ## High performance Web Server > 題目: 高效能網頁伺服器 —— 針對 Linux 核心和進階系統呼叫重新設計 探討從無到有打造 Linux 平台的高效能網頁伺服器,涵蓋是否該將伺服器實作於 Linux 核心內部、並行處理、I/O 模型、epoll、React pattern,和 Web 伺服器在事件驅動架構的考量。 * [sehttpd 說明](https://hackmd.io/@sysprog/linux2020-sehttpd) * [sysprog21/timeout](https://github.com/sysprog21/timeout): Tickless Hierarchical Timing Wheel * [2020 年開發紀錄](https://hackmd.io/@jwang0306/final-project) / [GitHub](https://hackmd.io/@jwang0306/sehttpd) > 執行人: D4nnyLee, XDEv11 $\to$ [開發紀錄](https://hackmd.io/@XDEv11/sehttpd-project) ## quiz2A - list 重做 [第 2 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz2) 的第 1 部分,並彙整學員們的作業成果,提出效率更好的實作。 > 執行人: shanihsu $\to$ [開發紀錄](https://hackmd.io/@shani/r16CJIjXu) > 執行人: kevinlin529 ## slab [第 2 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz2) 的第 2 部分提到 [slab allocator](https://en.wikipedia.org/wiki/Slab_allocation),請彙整學員們的作業成果,並整理為新的共筆,新增工作: 1. 回顧 [Linux 核心設計: 記憶體管理](https://hackmd.io/@sysprog/linux-memory),理解必要的背景知識 2. 針對 Linux `v5.20`,在 [User-Mode Linux](https://hackmd.io/@sysprog/user-mode-linux-env) 進行觀察 3. 透過 QEMU 建立模擬環境,載入 Linux `v5.20` 並善用 [SlabDbg](https://github.com/Kyle-Kyle/slabdbg) 追蹤 slab/slub 的內部行為 > 執行人: gyes00205 $\to$ [開發紀錄](https://hackmd.io/@gyes00205/2021q1_slab) ## quiz2C - bitcpy 重做 [第 2 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz2) 的第 3 部分,並彙整學員們的作業成果,提出效率更好的實作,也該探討 Linux 核心原始程式碼裡頭的案例 > 執行人: Jings1017 $\to$ [開發紀錄](https://hackmd.io/@jingsian27/B1dJXWTwu) > 執行人: IzsKon ## quiz2D - string interning 重做 [第 2 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz2) 的第 4 部分,並彙整學員們的作業成果,提出效率更好的實作,需要考慮到多執行緒環境 > 執行人: Zxiro $\to$ [開發紀錄](https://hackmd.io/@Zxiro/rk4qw64s_) > 執行人: William0715 ## fibdrv 重做 [fibdrv](https://hackmd.io/@sysprog/linux2021-fibdrv) 並彙整學員們的作業成果 > 執行人: yellow-hank $\to$ [開發紀錄](https://hackmd.io/@yellow-hank/fibdriv_project) / [GitHub](https://github.com/yellow-hank/fibdrv) > 執行人: xxiex123 $\to$ [開發記錄](https://hackmd.io/@yangyang128/SJibwya5u) ## quiz3 - SSO/CoW 重做 [第 3 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz3),並彙整學員們的作業成果,提出效率更好的實作,也該探討 Linux 核心原始程式碼裡頭的案例 > 執行人: yellow951321 $\to$ [開發紀錄](https://hackmd.io/@FO-ksXTRQDSs5Cgb_m3_Ew/rJV2n9Q3_) ## quiz4 - thread pool 重做 [第 4 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz4),並彙整學員們的作業成果,提出效率更好的實作。應當考慮到 [CPU Affinity](https://www.linuxjournal.com/article/6799),參考 [Thread safety with affine thread pools](https://bartoszsypytkowski.com/thread-safety-with-affine-thread-pools/) > 執行人: iLeafy11 > 執行人: xswzaq44321 :::spoiler 暫停: 重做 [sort](https://hackmd.io/@sysprog/linux2021-sort) 並彙整學員們的作業成果,提出效率更好的實作,需要在 Linux 核心內部驗證 > 執行人: Uduru0522, ccs100203 ::: ## Concurrent Programming 研究 [第 14 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz14) (第 1 部分) 和 [第 17 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz17),解讀程式運作機制、量化程式執行表現 (與 lock-based 比較),提出改進方案 執行人: Uduru0522, ccs100203 $\to$ [開發紀錄](https://hackmd.io/@cccccs100203/linux2021-project) ## quiz5A - SSO 重做 [第 5 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz5) 的第 1 部分,並彙整學員們的作業成果,提出效率更好的實作 > 執行人: andy78644 $\to$ [開發紀錄](https://hackmd.io/@JkowjMiFT6uOXNQsa1JgJA/BJvqcrBOd) > 執行人: richard880523 ## kHTTPd 改寫 [kHTTPd](https://hackmd.io/@sysprog/linux2020-khttpd),使用 [CMWQ](https://www.kernel.org/doc/html/latest/core-api/workqueue.html),並支援以下特徵: 1. 學習 [kws](https://github.com/kaiyuanl/kws) 的核心參數風格,指定 port, worker, wwwroot 等設定 2. 實作 HTTP request cache 3. 部分 HTTP 1.1 > 執行人: ParkerMactavish > 執行人: bakudr18 $\to$ [開發紀錄](https://hackmd.io/@MR-9Qa9wQLWglSAUyd6UhQ/SkFA8Favu) ## quiz6A - arbitrary-precision arithmetic 重做 [第 6 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz6) 的第 1 部分,並彙整學員們的作業成果,提出效率更好的實作,需要探討 Linux 核心的大數運算案例 > 執行人: tigger12613 $\to$ [開發紀錄](https://hackmd.io/@tigger12613/SkFBWcHhu) / [GitHub](https://github.com/tigger12613/arbitrary-precision-arithmetic) ## quiz6B - hash table 重做 [第 6 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz6) 的第 2 部分,並彙整學員們的作業成果,提出效率更好的實作,需要探討 Linux 核心的案例 > 執行人: Chialiang86 $\to$ [開發紀錄](https://hackmd.io/@ChialiangKuo/quiz6B-hash-table) / [Github](https://github.com/Chialiang86/Hash-Table-C) ## quiz6C - fiber 重做 [第 6 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz6) 的第 3 部分,並彙整學員們的作業成果 > 執行人: nickchenchj $\to$ [開發紀錄](https://hackmd.io/@nickchenchj/linux2021-quiz6c) / [GitHub](https://github.com/nickchenchj/ncku-linux-kernal-internals/tree/main/quiz6c) ## quiz7A - shell 重做 [第 7 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz7) 的第 1 部分,包含延伸問題 > 執行人: limaoxd [開發紀錄](https://hackmd.io/@limaoxd/B1BINgL2_) / [GitHub](https://github.com/limaoxd/quiz-7A) > 執行人: robertlin0401 $\to$ [開發紀錄](https://hackmd.io/@robertlin0401/2021q1-Final-Project) / [GitHub](https://github.com/robertlin0401/Linux-Kernel-Internals-quiz7) ## quiz7B - multi-threaded web server 重做 [第 7 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz7) 的第 2 部分,包含延伸問題 > 執行人: secminhr $\to$ [開發紀錄](https://hackmd.io/@secminhr/quiz7B) / [Github](https://github.com/secminhr/quiz7B) ## quiz7C - SPSC 重做 [第 7 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz7) 的第 3 部分,包含延伸問題 > 執行人: chiehen $\to$ [開發紀錄](https://hackmd.io/@Chiehen/quiz7c) / [GitHub](https://github.com/chiehen/linux2021-quiz7C) ## quiz7D - message bus 重做 [第 7 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz7) 的第 4 部分,包含延伸問題 > 執行人: wiasliaw $\to$ [開發紀錄](https://hackmd.io/@wiasliaw/SyRPYuPuO) / [GitHub](https://github.com/wiasliaw/mbus-c) ## quiz8A - SPMC 重做 [第 8 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz8) 的第 1 部分,包含延伸問題 > 執行人: cyrong $\to$ [開發紀錄](https://hackmd.io/@codelelouch0/SyX7P8AdO) ## quiz8B - MapReduce 重做 [第 8 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz8) 的第 2 部分,包含延伸問題 > 執行人: ilkclord $\to$ [開發紀錄](https://hackmd.io/@ilkclord/Hkt-7TvtO) ## quiz9 - MPMC 重做 [第 9 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz9),包含延伸問題 > 執行人: AmyLin0210 ## quiz10 - channel 重做 [第 10 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz10),包含延伸問題 > 執行人: ambersun1234 $\to$ [開發紀錄](https://hackmd.io/@ambersun1234/2021linux_final) ## quiz11 - event loop 重做 [第 11 週測驗題](https://hackmd.io/@sysprog/linux2021-quiz11),包含延伸問題 > 執行人: Julian-Chu $\to$ [開發紀錄](https://hackmd.io/@Julian-Chu/2021q1-quiz11) ## 開放原始碼生態研究 重做 [culture](https://hackmd.io/@sysprog/linux2021-culture),並彙整學員們的作業成果 > 執行人: sherisea $\to$ [開發紀錄](https://hackmd.io/@sherisea/開放原始碼生態研究) ## Real-Time Linux 研究 研究 [xenomai](https://source.denx.de/Xenomai/xenomai/-/wikis/home) 於 real time linux 上的效能表現 > 執行人: RainbowEye0486, fdfdd12345628 $\to$ [開發紀錄](https://hackmd.io/@RainbowEye0486/H1_G1Lhvu)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully