藍圖

2025 課程準備、企劃、聯絡

重新開始

Linux 核心就業

行程總表

預期目標先處理 Fork 舊的資料,對舊的目錄更名為 2022,再依照網頁指示,進行 import repository 導入目錄,完成預備。發現與之前專案有不同的檔案。概念不熟,重試才對。

新聞

AI_ms auto written commmit message by ollama. A test. In this video, you know how to set up git hooks, in .git/hooks with proper name. There is no extension as hook.

嘗試導入 qwen 到 prehook ,即將檔案放入 .git/hooks 並適當改名,接者依照教材修改 q_size ,因為我另外加一個檔案 git-pull-all.sh 所以結果稍微影響,但成功了。

# ✅Suggested commit messages:
# Add Script to Update Git Branches and Pull Changes
# 
# Automate fetching and pulling of remote branches with new script. Also
# correct minor issue in q_size function to handle empty list gracefully.

[TODO!!]:

關於這個,Linux Foundation 提供的 LFD103 訓練 (A Beginner’s Guide to Linux Kernel Development) (免費的),裡面有介紹像是編譯核心或 in-tree modules 等基本的主題。完成之後還會收到認證可以放 LinkedIn (?)
https://training.linuxfoundation.org//a-beginne/
kernel course

面試凱心琳和 Ian 在 John 解題
Leetcode Challenge
linked mess
文組翻身
lkml,找到幾個你主修 subsystem 的重點改動
chatgpt for interview YT video and some links of

[!] Failed to retrieve upstream commit hash from GitHub.
小錯誤,回憶經驗,知道是 GPG 公私鑰設定的問題。
Why is Git always asking for my password?

  • deploy keys
  • GitHub Apps

根據作業說明後半文字,必須補完程式碼,否則無法通過 git hook 的檢查機制。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
emoji cheat sheet[1]

lab-0 qtest,參考 hello-algo 完成問題

ideas

2024 年課程期末展示完整期末專題列表,搭配 2024 年課程回顧影片從去年的期末專題中選出至少 7 項題目,紀錄過程中的認知、遇到的疑惑,以及你認為如何改進。盡可能選我有興趣容易而且有時間且能適當發展。每一項,除了認知、疑惑、改進之外,興趣和難易度和發展時間以及可能性都會被討論。

上半場 可以直接切時間:
場次:4;人次:15 : 鄭樺軒 陳伯儒, <張則佳 P177 = Hot Mercury> 成大資工所114級, <陳榮佑>, <>, <>, <>, <Roy Huang>, <鄭以新 I-Hsin Cheng = var-x> ~44:04

34:03-44:04 var; Sched 25 mins
1:31:27-1:39:04-1:39:19-1:48:16
disk , jason50123
1:39:04 老師訊息留言

1:10:22 葉惟欣 排程書籍

作業區

使用者名稱 lab0-c GitHub ideas
Urbaner3 Urbaner GitHub ideas

reverseK

graph

#include <stdio.h>
#include <stdlib.h>

// Define a simple struct to hold an integer value
struct node {
    int data;
    struct node *prev;
    struct node *next;
};

// Function to add a new node to the end of the list
void add_node(struct node **head, int data) {
    struct node *new_node = (struct node *) malloc(sizeof(struct node));
    new_node->data = data;
    new_node->next = NULL;

    if (*head == NULL) {
        *head = new_node;
        new_node->prev = NULL;
    } else {
        struct node *temp = *head;
        while (temp->next != NULL) {
            temp = temp->next;
        }
        temp->next = new_node;
        new_node->prev = temp;
    }
}

// Function to print the list
void print_list(struct node *head) {
    while (head != NULL) {
        printf("%d ", head->data);
        head = head->next;
    }
    printf("\n");
}

// Function to reverse nodes in groups of k
void q_reverseK(struct node **head, int k) {
    if (!head || !(*head) || k <= 1) {
        return;
    }

    struct node *curr = *head;
    struct node *prev_tail = NULL;
    struct node *new_head = NULL;

    while (curr != NULL) {
        struct node *group_head = curr;
        struct node *prev = NULL;
        int count = 0;

        // Reverse k nodes
        while (curr != NULL && count < k) {
            struct node *next = curr->next;
            curr->next = prev;
            curr->prev = next; // Adjust the prev pointer
            prev = curr;
            curr = next;
            count++;
        }

        // Connect the previous group's tail to the current group's head
        if (prev_tail != NULL) {
            prev_tail->next = prev;
        }

        // Update the new head of the list
        if (new_head == NULL) {
            new_head = prev;
        }

        // Update the tail of the current group
        prev_tail = group_head;
    }

    // Update the head pointer
    if (new_head != NULL) {
        *head = new_head;
    }
}

// Main function
int main() {
    // Create a list and add some nodes
    struct node *head = NULL;
    for (int i = 1; i <= 10; i++) {
        add_node(&head, i);
    }

    // Print original list
    printf("Original list: ");
    print_list(head);

    // Reverse the list in groups of k
    int k = 3;
    q_reverseK(&head, k);

    // Print reversed list
    printf("Reversed list in groups of %d: ", k);
    print_list(head);

    return 0;
}

期待攻下伺服器

希望的var-x 得失心不要太重,學習惟欣,穩定常態,而不是追求超然。作業要求 可能改變,也許本來就不穩定,在測試,也只有少數人能體會,不必太過在意。能學會 select 很好,繼續思考伺服器還有什麼可學的。

AI

aider
ai_commit_help

課前問卷

2025 linux kernel quiz pre-course

@提醒 lab0:
git 介紹

git pull deal with other branches
Git playground

makefile
hackmd_src to copy
chat_word
git branch : How to pull all branches in github? Create a git-pull-all.sh can be executed.

作業依靠 22,23,24年 有 valgrind 的優先

Hw1

hw1

以新 是一個有根據、有系統、敢做敢想,有創意的人。所以受人矚目。
惟欣是一個直覺準,自省能力高,說話穩注意觀感的人,但對測試過的理論,就會很快。無法注意別人。
衍傑是一個精神差,無法長時間說話的人
那我科翰是怎樣的人?分心、貪心,敢想敢做隨性的人,常常像個賭徒。會幻想,但也會過度練習、過度解釋。善用敏感直覺。會大量閱讀和模仿。 不能接受別人、但會去演示或是模仿,為達目的不擇手段。 容易走偏,產生邪教。不夠專注,相信成型,奔放,不夠勇敢。堅持。

稍微記錄程式碼數量,想象是在做菜,雖然是多個程式,但步驟是重複的,目標要想辦法讓他明確。先確認 commit 的更新,還有說明文字鐘的目標數量,重複關係,做事順序,或是並行處理。有測資、實作 queue 程式碼、資料結構演算法、自動測試、valgrind 動態分析、指標處理回收清除、Makefile 流程、 sort 排序實作、研究內核 list sort 程式碼、已知條件。得知優化的能力。目錄檔案點算。記憶體位置,電腦運算,編碼,記憶除錯、記憶體設計、完成檢驗。第一次、第二次、第三次測驗。 精準的記憶體分析和除錯、Git pre-commit hook、Git pre-push hook 3=fork, push, passwd。選單界面、linenoise 補完、自動評分程式 2 python, make 再畫圖。ASAN: Address Sanitizer、 seg fault

頁一 API說明、作業目標、過往歷史搜尋。Helloalg 演算法展示。NULL 空和 empty 指標空。 queue.c 實作。17 函數,找出重複寫出計劃。 delete" 和 "remove" 看似都是「刪去」不同:斷開和清空。頭值接節點的結構。編譯環境 ,靜態分析, rebase,開發工具內外。 make: check, test 流程可以推。 scripy:python, hook 兩項 python 編譯配 IDE、slide_download、/usr/include/linux/ 、前項有 sched.h 應用 list_head、基礎實作:-linked-list#開放原始碼專案中的實作、list.h 在 kernel 裡的哪裡:include/linux/types、 git fetch or pull、q_size 示範、check:size, show, new, size, ih, it, reverse, free, quit;

小目標

補回測驗、上課進度

2025q1

2025q1 第 1 週測驗筆記 ; 題目 : linked list, double pointer append; memory free block_t tree; Quick sort
week2 題目: sort with linux linked list, ;square root 2 with bitwise operation; hash table, two sum leetcode. slice window, sum of subarray.
week3 題目: bit operations, setbit, multiplication, module, gcd, test; SIMD within a register , memory, mask; signal , user context;
week4 題目: Cyclic Redundancy Check, bitops, rbtree

hw4 去年測驗

M04: quiz3+4
回答第 3 周測驗題從測驗一到測驗五和第 4 周測驗題從測
quiz_try = 2024quiz_try

lab0 qtest call graph

利用 egypt做圖 , opt
qtest_graph
console.o_callgraph
linenoise.o_callgraph
report.o_callgraph
queue.o_callgraph
harness.o_callgraph
random.o_callgraph
web.o_callgraph


  1. emojilist
    最差就引用22年的專案設計,一定可行。 ↩︎