Yunyung
    • 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 New
    • 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 Note Insights Versions and GitHub Sync 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
    3
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # NCTU OSDI 2021 ###### tags: `OSDI` ## External Reference * #### Bare metal tutorials in C https://github.com/bztsrc/raspi3-tutorial * #### Operating system tutorials in C https://github.com/s-matyukevich/raspberry-pi-os * #### Embedded Programming with the GNU Toolchain http://www.bravegnu.org/gnu-eprog/index.html * #### Georgia Institute of Technology - cs3210, Design Operating Systems https://tc.gts3.org/cs3210/2020/spring/cal.html * #### CSE451: Introduction to Operating Systems https://courses.cs.washington.edu/courses/cse451/15au/index.html * #### MIT, Operating System Engineering https://pdos.csail.mit.edu/6.828/2020/index.html * #### Baking Pi – Operating Systems Development https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/ * #### Understanding the Linux Kernel, 3rd Edition http://gauss.ececs.uc.edu/Courses/c4029/code/memory/understanding.pdf * #### Building an Operating System for the Raspberry Pi (但不是Raspberry Pi 3) https://jsandler18.github.io/ * #### Mel Gorman's book "Understanding the Linux Virtual Memory Manager" https://www.kernel.org/doc/gorman/html/understand/ * #### OSDev.org https://wiki.osdev.org/Main_Page * #### Other https://people.kth.se/~johanmon/ose.html * #### SystemProgramming, angrave https://github.com/angrave/SystemProgramming/wiki * #### BCM2835 ARM Peripherals https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/README.md https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf https://github.com/raspberrypi/documentation/files/1888662/BCM2837-ARM-Peripherals.-.Revised.-.V2-1.pdf (修正版) * #### BCM2837 https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2837/README.md https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2836/QA7_rev3.4.pdf * #### Dynamic Tracing with DTrace & SystemTap https://myaut.github.io/dtrace-stap-book/index.html * #### The Linux Kernel https://www.kernel.org/doc/html/latest/locking/locktypes.html ## Previous Work - 2020 OSDI :::info 2021年作業與2020年稍有不同,參考時需注意 ::: * 2020 OSDI - JingWangTW https://github.com/JingWangTW/NCTU-OSDI-2020/tree/master * 2020 OSDI - YK https://kaiiiz.github.io/notes/nctu/osdi/ * 其中一位助教 https://github.com/GrassLab/osdi2020/tree/0856126 * 李** 助教 0616074 * https://github.com/RinHizakura * https://github.com/JackGrence ## Other Reference #### Arm assembly * http://www.toves.org/books/arm/ * http://wen00072.github.io/blog/2015/04/22/hello-assembly/ * https://azeria-labs.com/writing-arm-assembly-part-1/ #### Memory Layout https://www.geeksforgeeks.org/memory-layout-of-c-program/ ## Lab Reference :::success 紀錄實作各Lab有參考到的資料、網站 ::: ### Lab0 ### Lab1 #### Linker Script * https://blog.louie.lu/2016/11/06/10%E5%88%86%E9%90%98%E8%AE%80%E6%87%82-linker-scripts/ * https://wen00072.github.io/blog/2014/03/14/study-on-the-linker-script/ * https://www.slideshare.net/jserv/from-source-to-binary-how-gnu-toolchain-works/46 * https://sourceware.org/binutils/docs/ld/Scripts.html#Scripts * https://wiki.osdev.org/Linker_Scripts * [ELF中的.bss section和COMMON section](http://swaywang.blogspot.com/2012/06/elfbss-sectioncommon-section.html) #### Makefile * http://maxubuntu.blogspot.com/2010/02/makefile.html * http://www.opensourceforu.com/2012/06/gnu-make-in-detail-for-beginners/ * https://mropengate.blogspot.com/2018/01/makefile.html * https://hackmd.io/@sysprog/gnu-linux-dev/https%3A%2F%2Fhackmd.io%2Fs%2FSySTMXPvl #### Other external references * Calling assembly functions from C and C++ https://www.keil.com/support/man/docs/armclang_intro/armclang_intro_lmi1470147220260.htm * MEMORY INSTRUCTIONS: LOAD AND STORE https://azeria-labs.com/memory-instructions-load-and-store-part-4/ * What registers to save in the ARM C calling convention? https://stackoverflow.com/questions/261419/what-registers-to-save-in-the-arm-c-calling-convention * 關於GNU Inline Assembly (C語言裡面執行Assembly) * http://wen00072.github.io/blog/2015/12/10/about-inline-asm/ ### Lab2 - Transmit kernel through UART1 https://github.com/bztsrc/raspi3-tutorial/tree/master/14_raspbootin64 - relocated bootloader https://github.com/bztsrc/raspi3-tutorial/blob/master/14_raspbootin64/start.S - receiver https://github.com/bztsrc/raspi3-tutorial/blob/master/14_raspbootin64/main.c - CPIO archive format in FreeBSD Manual Pages https://www.freebsd.org/cgi/man.cgi?query=cpio&sektion=5 - CPIO arcihve source code in SEL4PROJ project (Cpio in "New ASCII Format") https://github.com/SEL4PROJ/libcpio - Initial ramdisk https://en.wikipedia.org/wiki/Initial_ramdisk ### Lab3 - Jserv Linux 核心設計: 記憶體管理 https://hackmd.io/@sysprog/linux-memory - 2020 OSDI Somebody's LAB-6 https://kaiiiz.github.io/notes/nctu/osdi/lab6/buddy-system/ https://github.com/GrassLab/osdi2020/tree/ab140f2676320a454c72a4d00e8f30afdb54c74b - Physical Page Allocation(Buddy and Slab) https://www.kernel.org/doc/gorman/html/understand/understand009.html https://www.kernel.org/doc/gorman/html/understand/understand011.html#Sec:%20Tracking%20Free%20Objects - Linux kernel list.h file https://github.com/torvalds/linux/blob/master/include/linux/list.h - The Slab Allocator in the Linux kernel. https://hammertux.github.io/slab-allocator - Buddy memory allocation, Wikipedia https://en.wikipedia.org/wiki/Buddy_memory_allocation - Overview of Linux Memory Management Concepts: Slabs http://www.secretmango.com/jimb/Whitepapers/slabs/slab.html - Buddy System – Memory allocation technique, GeeksforGeeks https://www.geeksforgeeks.org/buddy-system-memory-allocation-technique/ - Linux 的記憶體管理, 陳鍾誠的網站 http://ccckmit.wikidot.com/lk:memory - 我有所不知的 static inline function https://medium.com/@hauyang/%E6%88%91%E6%9C%89%E6%89%80%E4%B8%8D%E7%9F%A5%E7%9A%84-static-inline-b363892b7450 - 解釋Linux Kernel list.h http://simon88.leanote.com/post/%E5%86%85%E6%A0%B8%E9%93%BE%E8%A1%A8list.h - Other https://people.kth.se/~johanmon/ose/assignments/buddy.pdf ### Lab4 - Lab4實作紀錄 https://hackmd.io/Xp1pItIkRsKiM7Un655sXQ ### Lab5 - Lab5實作紀錄 https://hackmd.io/xhbHgDurTcGUuRTzpGshqQ ### Lab6 - VFS - Lab6 Sepc https://grasslab.github.io/NYCU_Operating_System_Capstone/labs/lab6.html - 實作紀錄 https://www.notion.so/Lab6-Virtual-File-System-2990755ae8604f13ae488d946b1106cc ### Lab7 - File System Meets Hardware - 實作紀錄 https://www.notion.so/Lab7-File-System-Meets-Hardware-7c58f5ca16d9400784a776f91d985a48 - https://forum.osdev.org/viewtopic.php?p=288532&sid=56df6457550d1de0a98e3a59077edb83#p288532 - Microsoft Extensible Firmware Initiative FAT32 File System Specification http://www.osdever.net./documents/fatgen103.pdf --- #### 問助教的問題 * 為何下列的.S code可以僅啟用core 0 關閉其他3個 core (為何要使用and?) ``` .globl _start _start: mrs x0, mpidr_el1 and x0, x0,#0xFF // Check processor id cbz x0, master // Hang for all non-primary CPU b proc_hang ``` 答:可以清掉其他bit * bss section initailize 0? 答: 可以讓Linker會對BSS section進行類似壓縮 * Enter輸入是'\r'為何不是'\n' 答: 可能根據screen putty軟體不同,像putty會自動幫轉'\r'成'\n' * Lab2 提示 答: 就是參考External references + 網路資料 解釋User thread, Kernel thread 在Linux Kernel thread = Task structure 會被Scheduler納入排程 ![](https://i.imgur.com/0EptLqB.jpg) #### 實作心得

    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