Kyle Hsieh (謝阿Sa)
    • Create new note
    • Create a note from template
      • 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
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me 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
    • Save as template
    • 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 Create Help
Create Create new note Create a note from template
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
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Note for [Linux 核心設計: 發展動態回顧](/hlc2c2gdSDqPZjXYdtIyqA) ## 點題 1990年代,作業系統百花爭鳴 - 核心開發者如何克服`SMP (Symmetric multiprocessing)`, scalability, 及各式硬體架構和周邊裝置支援等難題 - KVM 於2009年,Motorola有針對qualcomm brew做調整 - 當時Android剛發佈;Motorola設計虛擬化技術來同時執行Android跟brew - Contrainer - 透過Linux `namespace` 和 `cgroups`組合出來 - Lotus 1-2-3 on Linux - Microsoft OLE object - eBPF - Berkeley Packet Filter (BPF) 最初的動機的確是封包過濾機制,但擴充為eBPF (Extended BPF) 後,就變成Linux 核心內建的內部行為分析工具 - `XDP` - PREEMPT_RT - Hard real-time OS - 於1996,Linux就有用於工業控制 - AIO (Aysynchrous I/O) - Synchrous不適用於高效I/O ## 作業系統與概念 **abstractions** :notes: revolution OS ### Linux basic features - mutli-tasking from `Unix` - Virtual memory with paging - windows NT (stands for new technology) David Cutler vms wnt 純粹的32位元的作業系統 跟 Windows 95 是不同開發人員 - Linux在不同情境都共用同一份程式碼 - MONO kernel - 服務在 Kernel space 中執行 - 在Linux,kernel只提供基本的服務 - BPF - in-kernel virtual machine - 目前主要是用於雲端伺服器的效能分析 ## FOSDEM ## Linux 2.4 第二個10年 曾經有段時間搖擺不定,將 web server `httpd` 搬到kernel 0.99到1.0 是從 13 December 1992 到 14 March 1994 > ref. [Linux kernel version history](https://en.wikipedia.org/wiki/Linux_kernel_version_history) - 到2004年開始,新核心每隔==2-3個月==定期釋出 Linux 核心差一點就走進如同 Microsoft Windows 的「為需求而升級」的發展道路從而偏離原先 Linux 核心「只提供機制不提供策略」的道路。 - `LAMP`: linux apache mysql php - 不過 Linux v2.6 以來,核心發展重新找到自己的方向,沒必要透過特化需求去克服局部的效能瓶頸 - Linux-2.6 核心的發展策略是基於整體思維 ## [SMP 支援](https://hackmd.io/@sysprog/linux-dev-review#SMP-%E6%94%AF%E6%8F%B4) Linux v2.0 有項重要變革是開始支援 SMP (儘管效率不佳) > 在1996年 1997 年,為電腦《鐵達尼號》(Titanic) 製作電腦特技效果 - 許多動畫特效公司紛紛採用 Linux 搭配價格低廉且高效的硬體 Linux 2.4 在 SMP 的效率問題在哪? - [Big Kernel Lock](https://kernelnewbies.org/BigKernelLock) (BKL): 鎖定整個 Linux 核心的機制,透過 lock_kernel() 與 unlock_kernel() 函式。這是為了支援多處理器,暫時引進的鎖定機制,==已在 v2.6.39 (2011 年,在 Linux SMP 支援引入的 15 年後!) 徹底清除==。 - :spiral_note_pad: (2023summer) 出現在特定需求的同步問題,例如檔案系統;做法是處理器的其中一核將整個 kernel lock 起來,導致其他核心會完全沒有進展,直到 unlock kernel。 [Big Kernel Lock](https://kernelnewbies.org/BigKernelLock) 是個顯著的問題,但 scalability 並非單一議題,需要顧及各種議題。 ### updates on summer 2023 Linux 不是在理論上或在思維上的突破,最大的突破是,讓 SMP 真正在合理的價格取得。 講到 Red Hat,一定要講到鐵打尼 - Red Hat 後來賣給 IBM - 讓 Red Hat 股價一飛沖天的 press release, 1997 年到現在都沒改過 - 延伸閱讀: - [Red Hat Sinks Titanic](https://www.redhat.com/en/about/press-releases/press-titanic) - 鐵達尼當初如何拍攝的? - 先做實體的半艘船,另一半都是用 CG - 這也是 Linux 第一次在商業有巨大的成功 ## [虛擬化](https://hackmd.io/@sysprog/linux-dev-review#%E8%99%9B%E6%93%AC%E5%8C%96) [Embedded Virtualization applied in Mobile Devices](https://www.slideshare.net/jserv/mobile-virtualization) - Device virtualization - Android KVM - 多一個OS,讓舊的app可以執行 - On server side - issue: 處理高峰 - 一日捕魚,三日曬網 ### Linux的基礎建設 VDI - *Desktop Virtualization* xen microsoft research - firstly used by `Amazon` - 產品 KVM - 精簡易維護 直到 2006 年,Intel 和 AMD 才分別在各自的處理器中加入「有限」的硬體虛擬化特性,分別稱為,Intel VT-x 和 AMD-V。 ## [DPDK (Data Plane Development Kit)](https://hackmd.io/@sysprog/linux-dev-review#DPDK-Data-Plane-Development-Kit) [低延遲資本市場交易](https://en.wikipedia.org/wiki/Low_latency_(capital_markets)) 多數網路延遲其實發生於應用軟體層面。要降低應用軟體層級的延遲,有個激進的手段是繞過作業系統的管理,從而避免延遲:直接使應用程式能夠操作、寫入網路介面緩衝區裡的資料,甚至接管網路介面控制器。 - kernel bypassing - user space直接接管 ## [AIO](https://hackmd.io/@sysprog/linux-dev-review#AIO) 寫不好的話,效能可能會不好 - 這中間使用者層級的行程不會被 blocked。 --- :::info Updated on 2023 Summer ::: ## 點題 多核處理器 - microc rv32emu - 目標超越 qemu ## [Linux 發展動態回顧](https://hackmd.io/@sysprog/linux-dev-review) 三十年來的發展 重要的發展 - SMP (Symmetric multiprocessing) - scalability - 各式硬體架構和周邊裝置支援 - 虛擬化技術 - eBPF - PREEMPT_RT - 不只用於工業控制 ## [Linux 2.4](https://hackmd.io/@sysprog/linux-dev-review#Linux-24) Linux 核心 [v2.4.0](https://mirrors.edge.kernel.org/pub/linux/kernel/v2.4/) 在 2001 年 1 月 4 日釋出 - 距 Linux 核心發佈於 1991 年,剛好滿十年。 - 前十年的開發很多都是投石問路 當年 Linux 背後有一個強大需求,`web` - `Yahoo` (internet company, `.com`) 使用 `Liunx` 當作伺服器的系統 - 為了需求,核心內部曾經內建 `web server`,加上一個 `web 加速器` - 若將==圖形處理==搬到核心內部,會有什麼影響? - Window NT 為了解決使用者登入時 (Ctrl + Alt + Delete) 會輸入錯誤,因為鍵盤輸入事件遺失了某些案件;只好把圖形處理搬到 Windows kernel 裡。 - 圖形系統 (GUI) 可能會有很多 bugs,或是有一些資安漏洞;若發生在 kernel,就有機會透過 stack overflow 去攻擊 kernel。 - :+1: 不過 Linux v2.6 以來,核心發展重新找到自己的方向,==沒必要透過特化需求去克服局部的效能瓶頸== ## SMP 支援 Multics - > [UNIX - 維基百科,自由的百科全書](https://zh.wikipedia.org/zh-tw/UNIX) Unix的前身為1964年開始的Multics,1965年時,貝爾實驗室加入一項由奇異和麻省理工學院合作的計劃;該計劃要建立一套多使用者、多工、多層次(multi-user、multi-processor、multi-level)的MULTICS作業系統。 - 因為包山包海,導致商業化失敗 - 而 MS-DOS 是 1981 年推出,反而是單人、單工、單處理器 for PC marketing。

    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