(Click the blue text above to quickly follow us)
Source: Linux China / bestony
https://linux.cn/article-8290-1.html
If you have good articles to submit, please click → here for details
Today, I will interpret a comic from TurnOff.us titled “InSide The Linux Kernel“. TurnOff.us is a geek comic website where the author Daniel Stori has drawn some very interesting comics about programming languages, the web, cloud computing, and Linux. Today, we will interpret one of them.
Before we start, let’s take a look at the full picture of this comic!
Inside the Linux Kernel
This comic is drawn as a side cross-section of a house, using such a house to represent the Linux kernel.
Foundation
As with any house, the most important part is its foundation, and in this image, we start from the very bottom foundation:
Filesystem
The foundation (bottom layer) consists of rows of filing cabinets, neatly organized, with “files”—the files on the computer—inside them. In the upper left corner, there is a little penguin wearing a badge with the number 421, representing the process with PID (Process ID) 421, which is looking at the files in the cabinet, indicating that there is a process accessing the filesystem. In the lower right corner, there is a little dog, which is the watchdog, representing the monitoring of the filesystem.
First Floor (Ground Level)
Floor
After looking at the foundation, let’s see what is on the first floor above it.
Process Table
On this floor, the most eye-catching feature is a mat in the middle, surrounded by many little penguins sitting at a table. This mat area represents the process table.
In the upper left corner, there is a little penguin standing, seemingly saying something; this is clearly a parental figure, but it seems that the little penguins sitting around are not very obedient—look, many are distracted and chatting among themselves—”Hey, hey, I’m talking to you, wow, turn around (171).” It represents the initialization (init) process in the Linux kernel, which is the process we often refer to as PID 1. The little penguins at the table are all in waiting state, waiting for work tasks.
Watchdog
Look, next to the mat (process table) there is also a little dog, which monitors the status of the little penguins (monitors processes), and when the little penguins misbehave, it will bark.
Httpd Process
On the left side of this layer, there is a little penguin with badge number 1341 guarding a door, with the number 80 on it, indicating that this penguin with PID 1341 is responsible for handling port 80, which is the HTTP (web) port. The little penguin has a feather on its head, which is significant as it is the logo of the famous HTTP server Apache. Here it is:
Apache Logo
Looking to the right, we can see another door with the number 21, but it seems that this door is quite old and the number is crooked, and there is no one guarding it. It appears that the FTP protocol on port 21 is somewhat outdated, and currently, fewer people use it, so there is no one to attend to it.
Port 21
On the far right, the door with the number 22 has a very different treatment, as there is a little penguin wearing sunglasses guarding it, looking very cool. Is it a man in black? Why is this penguin so cool? Because port 22 is the SSH port, which is a very important remote connection port, usually used for remote management, so people coming through this port need to be carefully scrutinized.
Ssh Daemon
It is marked with 52, indicating that it is the 52nd little penguin.
to FS
In the upper left corner of the image, there is a staircase leading down. This staircase is from the filesystem of the bottom layer (foundation), and processes can go down this staircase to read files from the filesystem and perform operations.
Cron Tab
On this layer, there is a little penguin marked with 217, who is sweating profusely while looking at his watch. This little penguin represents the scheduled task (Crontab), and he constantly pays attention to the time to see if he needs to perform a certain task.
Pipeline
In the middle of the image, there are two little penguins carrying a pipeline (PipeLine). One little penguin can pass what it has to the little penguin behind it through this pipeline. However, it seems that the penguin in front (male?) is sweating profusely, while the one behind (female?) seems to be doing just fine—hey, the one in front, your pants are about to fall off~
Wine
On this layer, there is another little penguin holding a glass of red wine, marked with 411, looking a bit tipsy. This is the little penguin representing Wine, which can execute some tasks from Windows.
Loft
Above the first floor, there is a loft with many different screens, each displaying TTY (this is the external terminal). For example, on the far left tty4, the input is “fre”—is this trying to input “freshmeat…”? :d; next to it, tty2 and tty3 look much more normal, displaying regular commands; tty7 shows a graphical interface, yes, the graphical interface (X Window) is usually on terminal 7; tty5 and tty6 are empty, indicating that no one is using these two terminals. What about tty1?
tty
TTY (terminal) is one of the channels for external communication, but not every process needs a TTY; some processes can communicate with the outside directly through other means (such as ports) to provide services, so this layer is not a complete layer, just a loft.
Alright, did we miss anything?
Who is this clown?
Aha, I don’t know either, maybe it’s a virus? What do you think?
If you find this article interesting, please share it with more people
Follow “The Programmer’s Matters” for more interesting programming content