Jacob Lin

@millaker

Joined on Feb 17, 2022

  • contributed by < millaker > 閱讀心得 原本我對新創、創業就有一定的興趣,在電機系開設的創業創新課程中,老師說過就算沒有要自己創業,也要有能力判斷新創公司的機會。在該課程中,學到比較多關於創業的想法、如何分析灘頭市場,反而沒有像文章內真實創業會遇到的困難和解決方法。從文章內冰塊機的例子,我學到要能適時判斷問題的輕重緩急,整件事不能因為一件小事停滯或是考慮放棄,若今天目標是要做出全自動飲料機,那目標應該放在做出能動的完整產線,並逐一解決產出速率、準確度的問題。但是核心問題絕對要做足夠多的實驗或是理論證明。 教材疑問 Priority Inheritance 在並行程式設計: POSIX Thread中有提到 Priority Inheritance,我的疑問是作業系統核心是用何種方法判斷兩個或多個 thread 在等待同一個 mutex 被釋放? 參見第 9 週教材建立相容於 POSIX Thread 的實作,留意 futex :notes: jserv
     Like  Bookmark
  • contributed by < millaker > 第三週 第一題 程式碼運作原理 本題運用 Digit by digit caculation 估計一個整數的平方根,$N^2=(a_n+a_{n-1}+...+a_m)^2$ 其中 $a_m=2^m$ 或 0。算法從 $2^n$ 依序檢查到 $2^0$ ,建構出平方根估計值 $P_m=a_0+a_1+...+a_m$。檢查的方法是比較 $P_m^2 <= N^2$,若為真則 $a_m=2^m$ 反之則為零。為了避免每次檢查需要重新計算 $P_m^2$ ,我們利用一個額外變數 $X_m = N^2 - P_m^2$ 儲存差值,並在每個回合更新。更新的大小可由以下推導得出: $$ X_m - X_{m+1} = N^2 - P_m^2 - N^2 -P_{m+1}^2$$ 移項整理後可得 $$ X_m = X_{m+1} - Y_m$$ 其中
     Like  Bookmark
  • Simulation config and build Build command and final config: $ ./build_champsim.sh unified_model multi multi multi 1 ... ChampSim is successfully built Branch Predictor: unified_model L1D Prefetcher: multi L2C Prefetcher: multi LLC Prefetcher: multi
     Like  Bookmark
  • contributed by < millaker > 開發環境 $ gcc --version gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 48 bits physical, 48 bits virtual
     Like  Bookmark
  • contributed by < millaker > 第一週測驗題 測驗一 程式運作原理 題目中的 quicksort() 參考 Optimized QuickSort — C Implementation (Non-Recursive) 文章內的方法,運用堆疊避免遞迴函式呼叫,但兩者交換元素的方法不同。文章內的做法只要找到一組比 pivot 大和比 pivot 小的元素就會將兩者交換並進行下一輪比較直到 L >= R。題目中則是依序走訪每一個節點並和 pivot 比較,如果大於就加入 left 鏈結串列,反之則加入 right。以下為一個簡單的範例: 將 pivot 設為第一個節點,並從 pivot 下一個節點開始走訪和比較。將 left 和 right 重設為空的鏈結串列。 digraph G {
     Like  Bookmark
  • Test program(kernel) image Factorial recursion Unified execution image All tasks with the same value image No error
     Like  Bookmark
  • System overview Instruction Set format 1. RV32I Base Integer Instruction Set (32-bit) RV32I Base Integer Instrustions use 32-bits for single instruction. There are 6 types of instruction format in RV32I shown as figure below. Also, there are 5 types of immediate encoding format in RV32I shown as figure below. 2. “F” Standard Extension for Single-Precision Floating-Point
     Like 2 Bookmark
  • contributed by < millaker > 實驗環境 $gcc --version gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 $lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian
     Like 1 Bookmark