linD026

@linD026

Joined on Jan 11, 2021

  • <font size=3>此文於 2021 、 2022 年間,整理 Rust 現狀在 Linux 核心中遇到的限制以及問題。 最新 patch series: [PATCH v3 00/19] Rust support</font>  [name=linD026][time=Tue, Jan 18, 2022 3:36 PM] Rust 撰寫, Linus Torvalds 的想法可以從此篇訪談得知: Is C, the language the kernel is for the most part written in, being displaced by the likes of Go and Rust, such that there is "a risk that we're becoming the COBOL programmers of the 2030s?" Hohndel asked. "C is still one of the top 10 languages," answered Torvalds. However, he said that for things "not very central to the kernel itself", like drivers, the kernel team is looking at "having interfaces to do those, for example, in Rust... I'm convinced it's going to happen. It might not be Rust. But it is going to happen that we will have different models for writing these kinds of things, and C won't be the only one." 因此關於 driver 等 kernel 周遭的語言開始考量以 C 語言以外的程式語言開發,如 Rust 。
     Like 20 Bookmark
  • contributed by < linD026 > <font size = 2>此篇所引用之原始程式碼皆以用 Linux Kernel 5.10 版本,並且有關於硬體架構之程式碼以 arm 為主。</font> Copy On Write 概念 digraph abstract { rankdir = LR node [shape = record] label = "Copy on Write" proc1 [label = "process 1"]
     Like 18 Bookmark
  • contributed by < linD026 > RCU concepts :::warning <font size=2>關於 RCU 的概念,請見:Linux 核心設計: RCU 同步機制 、 perfbook - section 9.5 , section B 。 關於 Linux 內 RCU 完整資料:RCU concepts 。 </font> ::: What is RCU, Fundamentally?So the typical RCU update sequence goes something like the following:Remove pointers to a data structure, so that subsequent readers cannot gain a reference to it.
     Like 1 Bookmark
  • contributed by < linD026 > <font size = 2>此篇所引用之原始程式碼皆以用 Linux Kernel 5.10 版本,並且有關於硬體架構之程式碼以 arm 為主。 前篇: Linux 核心 Copy On Write 實作機制</font> Chapter 4 Process Address Space cs.columbia.edu - W4118: Linux memory management digraph abstract { rankdir = LR
     Like 1 Bookmark
  • contributed by < linD026 > https://lore.kernel.org/all/20191009201706.GA3755@andrea/t/#u https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/memory-model/Documentation/explanation.txt https://lpc.events/event/7/contributions/647/attachments/549/972/LPC2020-KCSAN.pdf https://algs4.cs.princeton.edu/42digraph/ https://lore.kernel.org/lkml/1574191653.9585.6.camel@lca.pw/T/
     Like 1 Bookmark
  • [time=Mon, Oct 23, 2023 7:38 PM] Summary Paper Title: Making Dynamic Page Coalescing Effective on Virtualized Clouds Link: https://web.njit.edu/~dingxn/papers/gemini.pdf year: EuroSys '23 Keyword: huge page REMOVE THIS: Keyword should be added to the tags
     Like  Bookmark
  • GitHub repo - linD026/Ownership-Checker Related Work Ownership Concept Ownership is Theft: Experiences Building an Embedded OS in Rust, PLOS2015, http://www.amitlevy.com/papers/tock-plos2015.pdf Comprehensive Rust, Google, https://google.github.io/comprehensive-rust/ownership.html References and Borrowing, Rust-lang Book, https://doc.rust-lang.org/1.8.0/book/references-and-borrowing.html Checker Developer Manual, llvm.org, https://clang-analyzer.llvm.org/checker_dev_manual.html Rust - Clone and Copy
     Like  Bookmark
  • Summary Paper Title: Exploring the Design Space of Page Management for Multi-Tiered Memory Systems Link: https://www.usenix.org/system/files/atc21-kim-jonghyeon.pdf year: USENIX ATC'21 Keyword: Memory Tiering Problems The way that operating systems currently manage pages was designed under the assumption that all the memory has the same capabilities based on DRAM. This oversimplification leads to non-optimal memory usage in tiered memory systems.In such multi-tiered memory systems, we find that the critical factor in performance is not only the access locality but also the access tier of memory. Data centers typically employ multi-chip NUMA architecture to scale up the performance of commodity servers with high core counts and memory capacity. Although this can increase the number of DIMM slots per server, scaling DRAM density is still a significant obstacle. It poses challenges in cost-effectively constructing large memory systems.
     Like  Bookmark
  • contributed by < linD026 > :::success Source code gitlab/muttmua - mutt_oauth2.py gitlab/muttmua - mutt_oauth2.py.README Tutorial
     Like  Bookmark
  • Abstract 此次作業會說明 User-mode thread 以及介紹 Context Switch 實際會以何種形式實作,並簡介過程中須要注意的細節。最後,同學須在 userspace 以 coroutine 實作出自己的 schedule 演算法。 :::success 補充資訊 恐龍書只有提及 CFS 的部份資訊,可以參考以下連結來得到更多關於此 schedule 的演算法: Linux CFS and task group Linux schedulers – overview continued CFS, BFS, Deadline, MuQSS, etc. What’s new in process scheduling?
     Like  Bookmark
  • contributed by < linD026 > 部份程式碼: Linux 核心 Copy On Write On-Demand Fork 程式碼 On-demand fork 機制 digraph abstract { node [shape = box] rankdir = TB label = "syscall - odfork() routine"
     Like 1 Bookmark
  • Textbook: Foundations of cryptography Random Oracle Model 假設 random function 是隨機的(得出得結果沒辦法用函數式的方式得出)。一般以建 table 得出。 假設 hash table 是 random function 。 假設 random function 的 table 是不能被單一人紀錄。 以 $2^{512}$ 得數值大小為例,此數是宇宙所有原子數總和。因此,沒辦法紀錄此 table 。 此 hash table 還要是 full domain hash (FDH) 。
     Like  Bookmark
  • NFA example digraph compiler { node [shape = circle] rankdir = LR label="a(a|b)*a" s [label = "start" shape=plaintext] s->0 0->1[label="ε"]
     Like  Bookmark
  • Copy On Write - 前文 Part 0 : Copy On Write 概念 Copy On Write - 正文 Part 1 : Virtual Memory Part 2 : Memory Region Part 3 : Process Part 4 : On-Demand Fork
     Like  Bookmark
  • contributed by < linD026 > 2021 年第 1 週隨堂測驗題目 Reviewed by jserv 儘管已列出 glibc 的實作程式碼,但缺乏針對 Pseudorandom number generator 的原理討論,應涵蓋其數學定義和評估標準,從而說明 glibc 的考量和潛在風險 在 Tail call 一節已說明 TCO 的效益,但編譯器具體做了什麼事情呢?請解說 避免說「我想像中的 PRNG」一類的話語,這無助於讀者理解 A Comparative Study Of Linked List Sorting Algorithms 論文提及 tree sort 效能表現,在 linked list 場景優於 quick sort 和 merge sort 一類的排序演算法,但為何在 Linux 核心的 list_sort 仍採用修改過的 merge sort,能否推敲和列出考量?
     Like  Bookmark
  • contributed by < linD026 > Synchronization Design and Trivial Concurrent Programs [name=linD026][time=Tues, Oct 26, 2021 11:00 AM] Reference: Is Parallel Programming Hard, And, If So, What Can You Do About It? :::success perfbook - mail list
     Like  Bookmark
  • contributed by < linD026 > Contents CoW explain [x] 概念 [x] 簡說 [x] process
     Like  Bookmark
  • contributed by < linD026 > 2021 年暑期 第 4 週隨堂測驗題目 lfring ( Lock-Free Ring Buffer ) 資料結構 #define SUPPORTED_FLAGS \ (LFRING_FLAG_SP | LFRING_FLAG_MP | LFRING_FLAG_SC | LFRING_FLAG_MC) #define MIN(a, b) \
     Like  Bookmark
  • contributed by < linD026 > 2021 年暑期 第 4 週隨堂測驗題目 vpoll 解釋程式碼運作原理 #define VPOLL_IOC_MAGIC '^' #define VPOLL_IO_ADDEVENTS _IO(VPOLL_IOC_MAGIC, 1 /*MMM*/) #define VPOLL_IO_DELEVENTS _IO(VPOLL_IOC_MAGIC, 2 /*NNN*/) #define EPOLLALLMASK ((__force __poll_t) 0x0fffffff)
     Like  Bookmark
  • contributed by < linD026 > 2021 年暑期 第 2 週隨堂測驗題目 解釋程式碼運作原理 tid static thread_local int tid_v = TID_UNKNOWN; static atomic_int_fast32_t tid_v_base = ATOMIC_VAR_INIT(0); static inline int tid(void)
     Like 7 Bookmark