Shawn Hsiao

@Shawn5141

Joined on Jan 10, 2022

  • contributed by < Shawn5141 > Related Github Repo: https://github.com/I-mpossible/socket-acceleration-with-ebpf 摘要 How to use eBPF for accelerating Cloud Native applications Part 1: https://cyral.com/blog/how-to-ebpf-accelerating-cloud-native/ Part 2: https://cyral.com/blog/lessons-using-ebpf-accelerating-cloud-native/ Introduction As real time applications with very stringent performance SLAs, eBPF became a great tools for accelerating communication between various microservices in our backend.
     Like  Bookmark
  • contributed by < shawn5141 > 測驗 1 :::success 在 Linux 核心原始程式碼,include/linux/bitfield.h 提及一個巨集 GENMASK,其作用是依據給定的範圍,產生連續的 bitmask,例如: GENMASK(6, 4) 產生 011100002 GENMASK(39, 21) 產生 0x000000ffffe00000 (64 位元) 已知我們使用的微處理器架構為 64 位元,且 unsigned long 為 8 位元組寬度 (符合 LP64 資料模型),以下是可能的 GENMASK 巨集的定義:
     Like  Bookmark
  • contributed by 自我檢查清單 [x] 參照 Linux 核心模組掛載機制,解釋 $ sudo insmod khttpd.ko port=1999 這命令是如何讓 port=1999 傳遞到核心,作為核心模組初始化的參數呢? 過程中也會參照到 你所不知道的 C 語言:連結器和執行檔資訊 [ ] 參照 CS:APP 第 11 章,給定的 kHTTPd 和書中的 web 伺服器有哪些流程是一致?又有什麼是你認為 kHTTPd 可改進的部分?
     Like  Bookmark
  • contributed by < Shawn5141 > 測驗1 延伸問題: 解釋上述程式碼運作原理,指出可改進之處並實作。 /* Generates a table of prime numbers up to the maximum having digits. * All even numbers (including 2) are ignored. Bit n in the bitmap * represents the odd number (2n + 1). This enables the table to be * half the size of a naive Sieve of Eratosthenes implementation. */
     Like  Bookmark
  • contributed by < shawn5141 > 指定閱讀 作業解說 Youtube講解 費氏數列分析 Linux 核心設計: 檔案系統概念及實作手法。 Linux 核心設計: 中斷處理和現代架構考量。 Linux 核心設計: Timer 及其管理機制。 Linux Virtual File System
     Like  Bookmark
  • contributed by < shawn5141 > 測驗1 :::success 延伸第 3 週測驗題的測驗 7,已知輸入必為大於 0 的數值 (即 x > 0),以下程式碼可計算 ⌈log2(x)⌉,也就是 ceil 和 log2 的組合並轉型為整數: int ceil_log2(uint32_t x) { uint32_t r, shift;
     Like  Bookmark
  • contributed by 測驗1 1. 解釋上述程式碼運作的原理 #include <stdint.h> uint32_t average(uint32_t low, uint32_t high) { return low + (high - low) / 2; }
     Like  Bookmark
  • contributed by < Shawn5141 > Homework Requirement [x] fork lab-c [ ] 依據上述指示著手修改 queue.[ch] 和連帶的檔案,測試後用 Git 管理各項修改,要能滿足 $ make test 自動評分系統的所有項目。 [x] 詳閱 如何寫好 Git Commit Message [x] 詳閱「你所不知道的 C 語言: linked list 和非連續記憶體」 [ ] 研讀 Linux 核心原始程式碼的 lib/list_sort.c 比較你自己實作的 merge sort 和 Linux 核心程式碼之間效能落差
     Like  Bookmark
  • contributed by Shawn Hisao 測驗 1 void map_add(map_t *map, int key, void *data) { struct hash_key *kn = find_key(map, key); if (kn) return; kn = malloc(sizeof(struct hash_key));
     Like  Bookmark