YEugeneChou

@eugenechou

https://github.com/eugenechouy

Joined on Dec 22, 2017

  • Following based on Linux v4.14 每個 NUMA node 會有一個 kswapd process: [kswapd0], [kswapd1] node /* * On NUMA machines, each NUMA node would have a pg_data_t to describe * it's memory layout. On UMA machines there is a single pglist_data which * describes the whole memory. *
     Like 1 Bookmark
  • 準備工作 版本 ubuntu 16.04 linux-kernel 4.4.1 https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/ https://elixir.bootlin.com/linux/v4.4.100/source 環境 下載後先解壓縮
     Like 1 Bookmark
  • 安裝 curl https://get.acme.sh | sh 加 alias under .bash_profile(.bashrc, .profile) alias acme.sh=~/.acme.sh/acme.sh
     Like  Bookmark
  • Application Binary Interface ABI定義了函數庫的調用、應用的二進制文件(尤其是.so)如何運行在相應的系統平台上等細節。 Android目前支持以下七種ABI:armeabi、armeabi-v7a、arm64-v8a、x86、x86_64、mips、mips64。 android's cpu Android目前有以下七種cpu架構:ARMv5、ARMv7、ARMv8、x86、x86_64、MIPS和MIPS64。 ARM 是指 Advanced RISC Machine 是一個32位元精簡指令集(RISC)處理器架構,其廣泛地使用在許多嵌入式系統設計。 RISC stand for Reduced Instruction Set Computing
     Like  Bookmark
  • set up NDK and javah Eigen for android https://blog.csdn.net/u010154424/article/details/50975711 OpenCV for android https://blog.csdn.net/sbsujjbcy/article/details/49520791 First, download opencv for android https://opencv.org/releases.html Here I'm using android studio and I create a project call another1 put "native" directory into project
     Like  Bookmark
  • First setup NDK and javah for android studio after open Android Studio, choosing 'Configure' -> 'Preferences' -> 'Tools' -> 'External Tools' click the add button javah: Name, Descriptions type anything you want Tool Settings: Program: choose the path of your javah
     Like  Bookmark
  • HFP vs A2DP https://www.jianshu.com/p/04a1dc879c13 https://amorten.com/blog/2017/ios-bluetooth-and-microphone-input/ 官方文檔 If an application uses the setPreferredInput:error: method to select a Bluetooth HFP input, the output will automatically be changed to the Bluetooth HFP output. Moreover, selecting a Bluetooth HFP output using the MPVolumeView‘s route picker will automatically change the input to the Bluetooth HFP input. Therefore both the input and output will always end up on the Bluetooth HFP device even though only the input or output was set individually. 他說如果要使用HFP的輸入那麼輸出就也要使用HFP,所以要麼輸出輸入都用HFP,要麼輸出用A2DP輸入用手機內建的麥克風
     Like  Bookmark
  • Introduction IA-32(Intel Architecture 32-bit) = i386, x86 IA-32e = extension Real mode and Protected mode Real Mode: 16-bit registers
     Like  Bookmark
  • # 演算法期末整理 ## Greedy ### 背包 Input: 背包的最大容量m,以及可以放入背包的n個物品的非負重量wi與價格pi Output: 介於0與1之間的x1,…,xn分別代表第1個,…,第n個物品放入背包中的零碎部份。可以最大化ΣPiXi,並且滿足ΣWiXi <= m > Step 1: Sort pi/wi into non-increasing order. > Step 2: Put the objects into the knapsack according to the sorted sequence as much as possible. ``` 時間複雜度 Step1: O(nlogn) Step2: O(n) total: O(nlogn) ``` ### 01背包 x只能是0或1 ### Huffman編碼 Input: 字元集合C與每個字元的出現頻率f Output: Huffman編碼樹 ```cpp= n <- |C| //C: the set of n characters Q <- C //Q: 優先佇列,以字元
     Like 1 Bookmark
  • # 計算機組織期末整理 ## The Processor ### CPU performance factors * Instruction count(Determined by ISA and compiler) * CPI and Cycle time(Determined by CPU hardware) ### Instruction Execution 1. fetch instruction: PC -> instruction memory 2. read registers: Register numbers -> register file 3. Others(depending on instruction class) * Use ALU to calculate * Access data memory for load/store * PC <- target address or PC + 4 ### CPU overview 因為我們假定memory在一個clock cycle只能做一次R\W,所以要將memory分成In
     Like  Bookmark