~ Written in front
First of all, thank Meng Teacher's careful explanation, the use of this novel teaching method (Mooc classroom + blog), also feel very fortunate with the teacher's idea of the Linux kernel to carry out a preliminary system learning. The combination of code and GDB Debug Tool trace analysis has a deeper understanding of some important mechanisms of the Linux kernel.
a learning Linux kernel understanding of Linux system
The Liunx kernel is a huge operating system, with tens of thousands of lines of code, and it's getting bigger, so it's unrealistic to read the code to understand his mechanism. But with a book about Linux working mechanisms, such as the "deep understanding of the Linux kernel", which was cited as the classic, the more you read it, the more unreal it feels, there's always some question: is that so? Why is that so? Through the teacher's "mechanism and code" parallel approach, really let me learn a lot, some mechanisms to understand more thoroughly, such as process switching process, interrupt processing process, previously because of the needs of the exam, several important steps of the classic process back very familiar, in the learning process, through the relevant code, there is a " It's the way it is, that's how it feels.
On the experience, in addition to the previous study method (mechanism + code), there is a question to learn, what it needs, and then to think about how Linux is implemented, and finally to find the relevant code validation.
As for the understanding of Linux, because did not learn windows and other desktop systems, so-called no comparison has no say, or borrow others ' results:
Aside from Android, Linux is a developer -centric operating system, and Windows is a consumer- centric operating system. This is the most fundamental difference and the advantage/disadvantage of Linux versus Windows.
Another important feature is that Linux is cobbled together by amateurs. It does not have a clear "development goal" like WINDOWS/MAC, and even without a "Base System" like BSD, Linux is just a kernel, and a bunch of applications that are being developed from different places to try to meet the needs of different developers . Just happen to find that these combinations of tools can meet most of the needs of most people .
With these two features in view, many of the advantages/disadvantages of Linux have become easy to understand.
- tendency to apply
The most notable feature is that all development-related tasks have a very well-developed tool support. -From the bottom compiler, to the Make/cmake, to the Shell Script/script languages, to git, to the Vim/emacs to the convenient dependency management and software handling tools. Other tools, however, are relatively limited.
And these tools are almost by default available. Can you imagine windows/mac with VS and a lot of development tools at the factory? But almost all Linux distro, from Shell to git to sed to g++/make, are "preinstalled." This is because these tools are a must for the vast majority of Linux users.
- The choice of "efficiency" and "Easy learning"
Not that Windows/mac will not have "efficiency", but Windows/mac's design is relatively less inclined to the "efficiency" end. Take the graphical interface example, most of the Linux tools are "command line/Library interface First", and then the X11 interface as a "afterthought" and "extra Options", and windows/mac happens to the contrary-the default interface is "graphical", Automated tools as an "extra option".
- Open source and highly customizable
Open source is not intended for "freedom" but for "customization". At/T Unix is always copyrighted, but the source code is still available, so that users can "modify" it as needed.
Most of the software and systems admired by the Linux community follow the same rules-it should be able to adapt to the different environments of different users, be able to easily change their behavior, and easily integrate with different environments. Rather than assuming that others are consistent with your needs, give them the freedom to customize the system.
- "User-friendly" and "reduced packaging"
Most Linux software starts with personal interest-I want to write a program for myself and share it with the community. In fact, the vast majority of Linux software is still in this state-you can use it, but if it has any problems or something that doesn't meet your requirements, you need to study it yourself.
So the software under Linux is often willing to expose itself "more thoroughly" to the user. It is convenient for users to better understand its internal mechanism and carry out hack.
- To the center of
Decentralized software development also doomed the system's interface and form of disunity-because everyone likes to invent wheels (?), and each person's wheels are more or less suitable for "own" and "community" rather than everyone, and in the Linux environment no one can force everyone to use their own wheels (except kernel developers, But in fact a lot of distro have patches for kernel, so instead of developing a practice, Linux more allows users to choose the "way of life".
You will see a lot of distro in the Linux ecosystem, different distro have different init methods, different package managers and installation strategies; everyone is accustomed to using different VCs, different shells, different editors, all of which are "more choices" in the philosophy of the embodiment.
So, if you find yourself more of a "developer" than a "consumer", or if your task happens to be done with Linux, you will naturally find the benefits of Linux. As far as I am concerned, even with VS, I often feel that the configuration of projects under Windows is too cumbersome, and even with homebrew, I often feel that software management under OS X is rather strange. Under Linux, I can easily use the latest version of almost all development tools. ------Know
The basic idea of Linux has two points: first, everything is a document; second, each software has a definite purpose. The first article in detail is that everything in the system boils down to a file, including commands, hardware and software devices, operating systems, processes, and so on for the operating system kernel, all of which are considered to have their own attributes or types of files. ----from Baidu
Second study catalogue
Here is what I learned from this period of time:
Linux kernel Learning one simple C-language disassembly
Linux kernel Learning Two analysis of a thin kernel (based on time slice rotation)
Linux Kernel learning three-track analysis kernel startup process
Linux Kernel Learning four system calls
Analysis of five system_call process of Linux kernel learning
Linux kernel learning six process creation process learning
The Linux kernel learns the loading and operation of seven executable programs
Analysis of eight process scheduling process of Linux kernel learning
Three summary
Through the two months of learning, the most rewarding feeling is to find a new way to learn Linux (mechanism + code), and with questions to the code to find the answer. Of course, the biggest regret is that the study time is too short, there are many want to understand the content has not come and learning, such as file system, memory management, the implementation of the kernel timer, can only explore their own ....
Thanks again for teacher Meng's hard work ....
By: Fanglongwei
Original works reproduced please indicate the source
"Linux kernel Analysis" MOOC course http://mooc.study.163.com/course/USTC-1000029000
A summary of the nine learning process of Linux Learning