93i7xo2

@93i7xo2

卑微社底

Prime membership

Joined on Oct 23, 2015

  • contribute by < 93i7xo2 > Source: quiz3 作業區 測驗 11 static inline unsigned long fls(unsigned long word) { int num = 64 - 1;
     Like  Bookmark
  • contributed by < 93i7xo2 > Source: 2021q1 第 4 週測驗題 資料結構 Thread Pool & Job Queue struct __threadpool { size_t count; pthread_t *workers; jobqueue_t *jobqueue;
     Like  Bookmark
  • 本篇介紹 Quantization table Huffman table Encoded data 在JPEG檔案內排列的順序,範例參考Understanding and Decoding a JPEG Image using Python,參考規格書補漏,並實作JPEG decoder。 JPEG有4種壓縮格式
     Like 1 Bookmark
  • 簡介 Baseline JPEG Baseline編碼時依序將經過下面流程: RGB to Y'CbCr 2-D DCT Quantization Huffman encoding 最後Header、Huffman table、Quantization table和資料一起包裝成jpg。
     Like  Bookmark
  • 在上一部份處理完MCU的DCT及量化,這篇要介紹如何進行對係數進行編碼。 一個8x8 MCU經過量化後可分為 1個在左上角雙向上頻率為0的DC coefficient 63個AC coefficient 從2-D DCT可發現DC coefficient代表區塊內像素平均值,由於鄰近區塊的DC coefficient有相似性,以DPCM方式編碼使值縮小,可以在之後的壓縮取得不錯成效。 $DiffDC(i) = DC(i) - DC(i-1), i=1,2,...$
     Like  Bookmark
  • contributed by <93i7xo2> Source: quiz2 Lock-Free Data Structures with Hazard Pointers Source 本偏論文旨在提出一個 lock-free "Write-Rarely-Read-Many" maps,基於 Lock-Free Data Structures 提出的方法進行改良。
     Like  Bookmark
  • contributed by <93i7xo2> Source: quiz1 解釋上述程式碼運作原理,包含 ftrace 的使用 ftrace 的功用是在目標函式前附加上 callback 來追蹤在 kernel 內的流程,使用這項功能必須用 struct ftrace_ops 來告知 ftrace 何者為 callback。 struct ftrace_hook { ... struct ftrace_ops ops;
     Like  Bookmark
  • 在接下來的課程中會大量在linux上操作,而作業要求之一即在linux上編輯文件。因此,以下我們會引導大家在linux上使用vim編輯器。 Install sudo apt install vim 編輯文件 Vim有三種模式 命令模式(Command mode) 插入模式(Insert mode)
     Like  Bookmark
  • contributed by < 93i7xo2 > Source: J07: quiz3 [x] 解釋上述程式碼運作原理,並提出改進方案; [x] 以上述程式碼為基礎,提供字串複製 (應考慮到 CoW) 的函式實作; [x] 設計實驗,確認上述字串處理最佳化 (針對空間效率) 帶來的效益,應考慮到 locality of reference,善用 GDB 追蹤和分析,確認字串的確符合預期地配置於 stack 或 heap; [ ] 嘗試將 quiz2 提到的 string interning 機制整合,提出對空間高度最佳化的字串處理工具函式庫 [x] 在 Linux 核心原始程式碼中,找出類似手法的 SSO 或 CoW 案例並解說;
     Like  Bookmark
  • contributed by < 93i7xo2 > Source: J06: fibdrv 實驗環境 Intel i5-6200U, L1/L2/L3: 64KB/512KB/3MB Qemu 4.2.1 Kernel: 5.4.0-72-generic
     Like  Bookmark
  • contributed by < 93i7xo2 > Source: 2021q1 第 2 週測驗題 To-do list 測驗3 [ ] Linux 核心原始程式碼找出逐 bit 進行資料複製的程式碼,並解說相對應的情境
     Like  Bookmark
  • contributed by < 93i7xo2 > Source: lab-0 To-Do List [ ] 研讀論文 Dude, is my code constant time?,解釋本程式的 "simulation" 模式是如何透過以實驗而非理論分析,達到驗證時間複雜度,需要解釋 Student's t-distribution 及程式實作的原理。注意:現有實作存在若干致命缺陷,請討論並提出解決方案; [ ] 開啟 Address Sanitizer,修正 qtest 執行過程中的錯誤 先執行 qtest 再於命令提示列輸入 help 命令,會使 開啟 Address Sanitizer 觸發錯誤,應予以排除
     Like  Bookmark
  • Thread & Process 取自Programming Parallel Machines Spring 2019第7周教材 A thread can possess an independent flow of control and be schedulable because it maintains its own: Stack pointer Registers Scheduling properties (such as policy or priority) Set of pending and blocked signals Thread specific data.
     Like  Bookmark
  • IRIT 2019 COSCUP 投影片 What is the original meaning of CUJU? And how does it connect to the high availability? CUJU,中文為踧鞠,一種傳統中國遊戲,玩家要保持球不落地,隱喻該技術不讓VM有停機的機會。藉由在兩台 host 間不斷同步虛擬機器的記憶體和I/O,當一台 host 故障發生時另一台能馬上接手,達到零停機時間。此類技術不是 HA(High availability) 而是 FT(Fault-tolerance),雖然 VMWare 的 vCenter 要打開 HA 才能使用 FT,但 HA 是藉由監控 guestOS 維持高可用性,一旦 VM 上的服務停止回應藉由重啟VM或在其他host上重新啟動,仍然有停機時間;FT 則是在虛擬機層級進行同步,若 guestOS 發生錯誤崩潰,另一端備份也同樣崩潰,無法保證服務正常運行,所以一般會搭配 HA 使用。 What is the group fault tolerance (GFT)? To what kinds of applications it is useful.
     Like  Bookmark
  • 實驗設備 筆電 i5-6200U (Intel HD530) Intel 530 + Nvdia 930M 桌電 i7-6700 (Intel 520) youtube codecs 查看youtube影片所使用的編碼格式: statistics->codecs:VP9 chrome flags無法更動,固YOUTUBE維持VP9輸出
     Like 1 Bookmark
  • 以一ㄚ起頭為例,有效的對(單字,起頭,結尾)為 單字 亞瑟 夏天風情 家具 甲殼類 鴨子 啞鈴 霞
     Like  Bookmark
  • :::success Upload image: ssh [id]@140.114.91.176 -p20122 1.上傳image位置: /home/cloud/{學號} 2.1人使用30G 3.server只給學生測試advance效能,不允許長時間佔用server,請學生不要在server上compile kernal advance score: advance baseline ->kernel boot time + uesr boot time = 8.155s
     Like  Bookmark
  • # 台大資工104考題 ###### tags: `雜記` > 僅供參考,有沒有錯都不知道== ![](https://i.imgur.com/mokVHDh.png) ```! On a MIPS machine (Fig. 1) running UNIX, we observed the following binary string stored in memory location x. 0011 1111 0111 0000 0000 0000 0000 0000 The binary could mean many different things, ``` #### a. If this is an integer number, what value is it? $2^{29}+2^{28}+2^{27}+2^{26}+2^{25}+2^{24}+2^{22}+2^{21}+2^{20}$ #### b. If this is a single precision floating point number, what value is it
     Like  Bookmark
  • # 2019q3 Homework4 (quiz4) contributed by < `93i7xo2` > ###### tags: `sysprog2019` Source: [2019q3 第 4 週測驗題](https://hackmd.io/@sysprog/B1keOS-dB) ### 測驗 `1` 考慮一個單向 linked list: ```cpp typedef struct __list { int data; struct __list *next; } list; ``` 在不存在環狀結構的狀況下,以下函式能夠對 linked list 元素從小到大排序: ```cpp list *sort(list *start) { if (!start || !start->next) return start; list *left = start; list *right = left->next; LL0; left = sort(left); right = sort(
     Like  Bookmark
  • # 2019q3 Homework3 (quiz3) contributed by < `93i7xo2` > ###### tags: `sysprog2019` --- ### 測驗 `1` 考慮深度學習領域中,使用[激勵函數 ReLU](https://mropengate.blogspot.com/2017/02/deep-learning-role-of-activation.html): $$ ReLU(x) = \begin{cases} x & \text{if } x \geq 0 \newline 0 & \text{if } x \lt 0 \end{cases} $$ RelU 計算量小,只要判斷輸入是否大於 `0`,沒有指數運算。下方程式 (`ReLU.c`) 是個常數時間的實作: ```cpp float ReLU(float x) { union { float f; int32_t i; } out = {.f = x}; out.i =
     Like  Bookmark