Linux is indeed quite complicated
Preface
Needless to say, the excellence of Linux goes without saying.
If the operating system is compared to a car, then Linux is a multifunctional off-road vehicle with excellent performance, which can do anything in the mountains and seas.
If you own one, you will not be satisfied with just driving it to and from get off work, and you will not be able to do basic operations such as shifting gears, stepping on the accelerator, and controlling direction. We want to fully understand and master it and explore more of its potential. However, this process is quite difficult.
Difficulties of Linux system programming
-
For developers who have a certain foundation in Linux development and want to learn advanced Linux system programming, the difficulty lies in the fact that the technical points covered by Linux are complicated and they often don’t know where to start.
-
For Linux developers with a little experience in system programming, the difficulty often lies in the lack of a thorough understanding of the underlying technology and the inability to freely grasp and control the complex behavior of the system. At the same time, the underlying technology often becomes a problem for mid-level developers when they are promoted to Bottlenecks in senior positions.
The technology is complex and difficult to grasp
Linux content is so complicated that learners don’t know where to start. Although Linux has opened up all design drawings, if all these drawings were printed out, they might fill the entire room. Even the book "In-depth Understanding of the Linux Kernel", which is known as the Linux source code navigation chart, has more than 800 pages. If you start from the beginning without any direction, you may fall asleep after reading a few pages.
When I first came into contact with Linux system development and didn't have much real-life project experience, I jumped into Linux design drawings several times, but I couldn't persist for a few months each time, and then I came back with wounded self-confidence.
For Linux developers, if there is a reading guide for Linux nautical charts at this time, which marks the buried locations of treasures on the nautical charts and the introduction of the treasures, it will definitely make the learning process more directional and more relaxed and enjoyable.
Without understanding the underlying principles, it is difficult to solve the problem from the root.
When developers initially develop applications and services on Linux systems, they often focus a lot of energy on realizing business requirements and do not have a particularly deep understanding of the implementation details of the underlying technology.
However, as the complexity of the system increases, developers can only better grasp and control the complex behavior of the system if they have a more and more thorough understanding of the underlying implementation details. Otherwise, once you encounter the following problems, it will be difficult to solve them from the root cause.
-
The program crashed intermittently at a certain location, but after I added a line of logs for debugging, it never crashed again. What's going on behind this?
-
I wrote a multi-process model server, but I always feel that the new process is not started cleanly, and sometimes some things from the parent process are mixed into the child process. But if you let the parent process do more calculations before starting the child process, or simply wait for a while, the probability of this happening is greatly reduced. The behavior of the system is a bit unpredictable. The reason behind it is what?
-
My signal handler and the main program use the same shared variable to exchange information. It works normally most of the time, but it always has a convulsion from time to time. The code has been carefully checked and no logical problems can be found. This is very distressing. What is the problem?
Situations like this where a program's performance is not exactly as expected can cause a lot of headaches for developers, especially if it behaves normally most of the time and occasionally "twitches." I have experienced these troublesome problems more than once, and the feeling of having my self-confidence hurt by Linux several times is still fresh in my memory.
Fortunately, after many explorations and pitfalls, the behavioral characteristics of the Linux system and the internal reasons for its design finally became clear to me, and the exquisite internal design of this system became more and more clear to me. .
Now, looking back on the experience of being lost in the Linux world several times, I can already clearly understand where the problem lies - before I knew what it could do, I tried to figure out how it worked. Just like starting to study the pile of gears and linkage components in the engine and gearbox before you know how a car will move forward after it is started, the result will naturally be half the effort with half the effort.
I believe that many Linux developers have experienced or are currently experiencing similar painful experiences to me.
Recently, many friends have asked me for some essential information for programmers, so I dug out the treasures at the bottom of the box and shared them with everyone for free!
Scan the QR code of the poster to get it for free.