OOM Killer 簡短筆記
緣由 滑 hacker news 時被 Out-of-memory victim selection with BPF 砸到,忽然有點好奇 OOM Killer Source Code。 Source Code https://elixir.bootlin.com/linux/v6.6/source/mm/oom_kill.c#L192 /** * oom_badness - heuristic
緣由 滑 hacker news 時被 Out-of-memory victim selection with BPF 砸到,忽然有點好奇 OOM Killer Source Code。 Source Code https://elixir.bootlin.com/linux/v6.6/source/mm/oom_kill.c#L192 /** * oom_badness - heuristic
Manual pthread_cancel(3) - Linux manual page 根據 linux manual 所寫,pthread_cancel 基本上可以在一些可中斷的地方(POSIX 給了一個清單,大概是 IO 操作的時候)中斷 thread。 這時就好奇了:C++ 的 Destructor 會不會被觸發?這並沒有寫在文件上。 Code #include <pthread.h> #
前言 感謝 Arch Linux安裝教學,KDE Plasma桌面+中文輸入法 ,本篇的安裝步驟大部分來自於這他,尤其是硬碟分割。 在網路上找到不少教學都是有包含 GUI 的,但我打算只先可以一步一步來,這樣也可以清楚自己在做甚麼,先設定第一小步是可以開機進入系統,這樣大概只會包含磁碟分割、安裝系統和可以連接網路,尤其是無線網路。之後 IDE 安裝再視需求考慮安裝。 這篇沒有... 我盡量把一些不

在 Linux 系統下,我們可以透過 fcntl 來提供跨 Process 的 Read/Write Filelock,但是卻有一個小小的坑需要注意,那就是在同一個 Process 內,不可以跨 Thread 使用這個 Lock。 舉個例子,假設我們有一個 Process A,會定期地更新 /srv/mydata 這個資料夾,當更新時,會去使用 WLock /srv/mydata.lock 來
Linux Group Write Permission
diff will calculate the difference of two files or folders and output with specific format. patch parse that specific format and apply difference to files or folders. Example for Files Here we prepare