C language-the watershed between rookie and great god: memory, thread, process

As an ancient programming language, C language has been strong for decades. Beginners start from C language, and universities regard C language as a basic course. No matter how others criticize or sing badly, the C language will stand firm; Java, C#, Python, PHP, Perl, etc. have alternatives, and they can all fall, but the C language cannot.

The program runs in memory (we will explain in detail in the section "Loading Memory, Let the Program Run"). A qualified programmer must understand memory. Learning C language is the easiest and easiest way to understand memory layout. The direct and most effective way, C language is simply born for memory, it is closer to memory than any programming language.

The so-called memory is what we often call the memory stick, which is the thing in the picture below, I believe you must have seen it.


All programs are trying their best to save memory and spare no effort to improve memory efficiency. The entire development process of computers is revolving around memory, and memory layout is constantly optimized to ensure that multiple programs can run at the same time.

If you don't understand memory, you can't learn processes and threads, you are not qualified to play medium and large projects, you are not qualified to develop low-level components, and you are not qualified to build a system. You are destined to be a rookie and you will not be able to become a novice.

During my work, I used to focus on website development. Although I was able to design web pages with beautiful interfaces and good experience, I didn’t know anything about the underlying concepts such as memory leaks, multithreading, and shared memory. I felt that there was a big gap with my colleagues around me, which made me very depressed. , Do not know how to break through. I tried to learn memory and threads many times, and I found a lot of information, but I couldn't understand it anyway, and I was still at a loss.

After leaving my job, I ran the C language Chinese website full-time, so I decided to learn C language systematically, in-depth and comprehensively, and combined with C language to understand some memory knowledge. At this time, I discovered that the original C language was born for memory. C The design of the language and the layout of the memory are closely matched. I learned the C language and learned the memory thoroughly, and understood how computer memory is distributed and organized.

The C language talks about memory all the time, and memory is just like a shadow, you have to study it.

The most important thing is that I can combine the memory with specific programming knowledge and the running process of the program, and I can really apply what I have learned and let the concept fall into place instead of empty talk. This is the most rare thing.

After conquering memory, you can basically understand processes and threads. Processes and threads revolve around memory. To a certain extent, they exist for more efficient use of memory.

From C language to memory, from memory to process and thread, the links are intertwined: if you don't learn C language, you won't be able to understand memory, and if you don't learn memory, you won't be able to understand processes and threads.

I felt that I was sublimated instantly and reached a new height. Many mysteries before were solved, and there was no barrier to communication with the great god.

The most basic computer concepts of "memory + process + thread" are the watershed between a rookie and a great god, and only by learning the C language can you understand them thoroughly. Java, C#, PHP, Python, and JavaScript programmers will encounter bottlenecks after working for a few years. Many people will come back to learn the C language, regain the underlying concepts, and let themselves break through again.

 

Guess you like

Origin blog.csdn.net/Python6886/article/details/111302161