Charlie Chiou

@charliechiu

Joined on Sep 24, 2024

  • contributed by < charliechiou > Softirq, Tasklet, Workqueue Linux 核心中關於 Bottom half 有以下三種機制: softirqs tasklets workqueues 閱讀 Linux Kernel Development 以理解其機制並整理於筆記中
     Like  Bookmark
  • struct softirq_action { void (*action)(struct softirq_action *); }; 在 <linux/interrupt.h> 中 Softirq 使用上面的 function pointer 來定義要處理的函式。 並在 <kernel/softirq.c> 中定義 static struct softirq_action softirq_vec[NR_SOFTIRQS]; 每個 NR_SOFTIRQS 對應到一個要處理的類型如下
     Like  Bookmark
  • contributed by < charliechiou > 第三週測驗題 測驗 1 測驗 1 課堂問答 延伸問題 1 解釋上述程式碼運作原理 程式碼使用 mpi_t 的結構來儲存大數,藉由組合多個 uint32_t 來完成。 mpi_t 預先分配為 1 個 struct 元素的陣列,在編譯時便可確保 mpi_t 始終會佔據一個 struct 的空間。而使用陣列的形式而非指標,即可不需要再額外分配記憶體。在結構體中,使用 data 來儲存該大數的其中一段,而 capacity 則表示這個大數用到的空間。
     Like  Bookmark
  • contributed by < charliechiou > 開發環境 $ gcc --version gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 39 bits physical, 48 bits virtual
     Like  Bookmark
  • contributed by < charliechiou > 第一週測驗題 測驗 1 延伸問題 1 解釋上方程式碼運作原理 "a pointer to a pointer" 使用 pointer 指向想要操作的指標,避免了類似一次一次把 current point 指向下一個節點的這種操作。先定義所用到的結構 #include <stddef.h>
     Like  Bookmark
  • contributed by < charliechiou > 針對鏈結串列的資料排序改進 目標 : 嘗試引入 Timsort 及其延伸的演算法並與 listsort 比較。 初步閱讀這份期末專題,以下是目前的疑惑 Timsort 實做方法及延伸演算法 龐大的 linux kernel程式碼應該如何去找出改動程式碼時候會影響到的內容 如何編譯及測試 linux kernel 中的程式碼並改良內部的程式
     Like  Bookmark
  • contributed by < Po-Ying,Chiu > 1D discrete convolution Description: 1D Discrete Convolution is an operation used in signal processing and neural networks to extract features from sequential data like time series or audio. A filter slides over the input, multiplying and summing values to extract the features, making it useful in tasks like speech recognition and text analysis. For every input x[n] we can represent it as $$
     Like  Bookmark