PID, TID, TGID and Why Processes and Threads Don’t Really Exist in Linux

PID, TID, TGID and Why Processes and Threads Don't Really Exist in Linux

We’ve all learned that a process has an ID (the so-called PID for Process IDentifier), that a process can have one or more threads, and that each thread also has an ID (the so-called TID for Thread IDentifier). At least, this is what we have been taught in computer science classes, and what we read in books and blogs.

How surprised would you be to learn that processes and even threads don’t really exist in Linux?

User-Defined Deduction Guides for Class Templates in C++

User-Defined Deduction Guides for Class Templates in C++

I remember when I first got serious about modern C++. It was in 2017, my company was starting a new project from scratch, and we chose the latest standard: C++17, which had just been released. Diving into all the modern features of C++, I remember one feature that left me particularly puzzled: user-defined deduction guides. They are used to influence CTAD (Class Template Argument Deduction), which was a major feature of C++17. I was puzzled because I couldn’t understand why anyone would ever need to write such a guide by hand…

How to Fix “Low Disk Space on /boot” on Linux

One day, you power up your computer, wait for Linux to boot, log in… and this message pops up:

low disk space on boot

You might decide to ignore it, or you might think this is an issue worth looking into. And you’d be right!

However, clicking “Examine” doesn’t really tell you how to fix the issue. It “just” shows you the disk usage analysis of the /boot partition:

disk usage analyzer before cleanup

clang-tidy, const & (N)RVO

Almost one year ago, clang-tidy threw an unexpected and unfamiliar message in my face: warning: constness of 'str' prevents automatic move [performance-no-automatic-move] (documented here). The offending code looked something like this:

auto build_path(const std::string& basedir, int index) {
	const auto str = fmt::format("{}/output/{}", basedir, index);
	
	fmt::print("{}\n", str);
	// ... do some work with 'str'...
	
	return str; // <-- the warning was here
}

I didn’t have time to investigate, so I wrote down a note, swore I would look into it later, and just forgot… Until today. I thought it would be simple. It was not. Because, as always, C++ is full of surprises.

Manually Install WiFi Drivers on Linux

Manually Install WiFi Drivers on Linux

On December 24th, 2024, Debian had a gift for me: it installed Linux kernel 6.11.10, and suddenly the WiFi module of my laptop stopped working. I quickly found a workaround (selecting an older kernel with GRUB during boot) and hoped that the problem would be fixed by the next kernel update or by a firmware update from my laptop’s manufacturer. Sadly, kernel 6.12 arrived and nothing changed. I finally took some time to really investigate the issue.