编程知识 cdmana.com

Why can Linus write a system as powerful as Linux?

from : Silent + Coldwings( You know )

link :www.zhihu.com/question/63187737

Who is he? ,Linus!

Linnaeus ・ Joe watts (Linus Torvalds, 1969 year ~), Famous programmer ,Linux The inventor of the kernel and the collaborators of the project .

Torvalds used his personal time and equipment to create one of the most popular operating system kernels in the world .

He is now employed by the open source development laboratory (OSDL:Open Source Development Labs, Inc), Make every effort to develop Linux kernel .

Linus I started writing operating systems as a graduate student ( It's about 91 year ), At that time, personal computers (PC) Although it has been on the rise for some years , But it's just a toy for a small number of programmers and enthusiasts . Hardware is basically saved by yourself , The software also uses the open source system each kind of magic transformation .

So ordinary people don't have trouble at all PC The motivation and reason for .

Unix Has taken over a lot of productivity scenarios , The only drawback is that it's expensive , And many distributions are closed source . Individual users don't even think about .

At that time Linus I saved a set of 386, But it doesn't work , cheap / Free operating system with . Of course, there was a free and open source system in the community , But either it's poor compatibility , Or it's all kinds of pits , Or there's no software , All in all, all kinds of problems . And compatibility is the main problem , At that time CPU Unlike the current popular architecture, there are only two kinds of architecture (x86Arm), At that time, there were more than a dozen kinds of architectures called Shangming , So operating system compatibility is very important .

Linus Start learning the operating system , Found a good textbook  《 operating system : Design and implementation 》 , And then spent a summer vacation watching , Start writing your own operating system .

《 operating system : Design and implementation 》 The author of this book is Tarebaum , At the time of writing the book, he was already a big bull in the industry , He was in college to teach operating systems , But students can't afford to buy too expensive Unix Distribution version , So I wrote a compatible Unix Standard operating system ( Mainly compatible with  POSIX  standard ), It's called  Minix( There's a lot of rivalry in the name ,Universe - mini).

Minix This system is designed for teaching , Just buy this book , Just send a copy of it for free Minix Source code .Minix For the convenience of teaching , Keep your code simple , Tarebaum refuses to add too many complex features to it . therefore Minix Although it's elegant , But the players in the community should use it everyday , You have to change a lot of things .

by the way ,Minix It's microkernel . Yes , The concept of microkernel has been around for decades , instead of 2019 Year of the birth of .

The structure of the microkernel is very elegant , file system , memory management , Hardware drivers It's all in the form of processes , Instead of kernel code , This means that the driver will not hang with the kernel when it is hung . The disadvantage is that the system calls are too expensive , So slow that it can't be accepted . So today's desktop systems , There's no pure microkernel .

For the teaching system , Microkernel is not a problem , After all, it's teaching , It's not a production tool .

Communities and Linus They all like Minix, But they are not satisfied with Minix The author gives up compatibility and extensibility for teaching purposes . therefore Linus Running on its own Minix Of PC Here we go Linux Development of .Linux It's macro kernel .

Linux It wasn't called Linux,Linus Is a very introverted person , Sorry to be such a narcissistic name , But the collaborators strongly recommend the name , So it's used ,x representative unix The connection of ( All compatible POSIX).

Mention a sentence ,Unix Not for open source and free , It's about business , however Unix The development of the best open source environment ( such as GNU).

Be careful , The community in recent years , Belong to 『 warlords 』, We all lack a good free operating system , But it's not just Linus Thinking about solving this problem , Richard · Stroman led GNU Organized in 90 A free operating system has been brewing since the s , Because their purpose is to do business with Unix against , There is only one GCC The compiler is not enough , You also need to have your own operating system .

All kinds of technicians in the community are also right about GNU We are looking forward to , But this thing is having a hard time . Until a long time later ,Linux When it's popular , Still not done .

At the very beginning Linux edition , Only a few thousand lines of code , Now the foundation is solid CS Undergraduate , It takes a while to understand , Even some OS The textbook is to use Linux The original version is for teaching , For example, the course of Li Zhijun of Harbin Institute of Technology .

Linus Ever since the beginning minix Post your progress on the Forum , It made a group of people on the forum very interested , So a lot of people joined the development , Now Linus Receive everyone's code by email , And then manually merge . After a period of time ,minix The forum was full of discussions Linux Of course. , Although tarybaum is not a mean person , But it's also very upsetting for tarabaum

Not long after Linus There was a conflict with talebam .

Tarebaum wrote an article on the Forum , The advantages and disadvantages of microkernel and macrokernel are demonstrated , In fact, it mainly attacks the macro kernel , The macro kernel has better performance , It's all shortcomings , say Linux Out of date .Linus It's a grumpy person , Never compromise on technical issues . So he began to mock minix.Linux More portability than minix Better , And open source for free (minix You need to buy books to get ).

And then came and went and argued many times , For details, see :

https://www.oreilly.com/openbook/opensources/book/appa.html

It's just that neither of them thought , The battle of words on this forum will become the battle of operating system that people will still talk about for decades .

Linus I don't hate tarebaum , He said he went to tarebaum to give a speech later , After that, take the book and ask for tarybaum's signature , But it didn't wait for people .

I think Linus I still respect him more or less , After all, he is the leader in learning the operating system himself .

stay Linus With the efforts of the community , By extending the GCC Support Linux,Linux Also compatible with more and more platforms . Other kinds of software are ported to Linux It's going to be easy , Especially in the era when a lot of software was released in source code , As long as there is a compiler for the corresponding platform , Once you compile it, you can transplant it .

catch up with PC The wave of development , But not enough , After all, apple and Microsoft are not easy to deal with , The ease of use of commercial operating systems remains strong .

however Linux Began to be favored by all kinds of enterprises , Because not every enterprise has the money to buy a set at a high price Unix To use , Or more expensive software + Hardware integrated mainframe to use .Linux Let them see the hope of saving money .

GNU Start supporting Linux,Linux Become GNU The official operating system of , So now it's called GNU/Linux.

so to speak Linux and GCC Almost two of the greatest open source projects . They all add up to be stronger .

GCC Make software easy to transplant ,Linux Software ecology is good , If the software ecology is good, there will be more users , More users make hardware companies greedy , All hardware companies are for Linux Development driven and various extensions , To support your own hardware , So more users . The multiplier effect is very strong .

Linus When the project reaches a certain size, you don't write code yourself , Mainly merge code , After all, so many people around the world submit code , He was busy enough to audit the merger alone , I don't have time to write code myself .

Until one day he felt too busy , Auditing code will encounter a lot of goofy code and developers , So he developed the most popular version control tool now ,git, Literally, it means rice .

Have to say , His control of the development direction of the operating system is accurate .

To sum up ,Linux The success of the , The following conditions are essential :

  • Linus Strong development capability ;

  • Linus Project management can ;

  • Linus Control the development direction of the operating system ;

  • A separatist regime , The era of the lack of free and easy-to-use operating systems ;

  • One is not just a separate regime , Lack of a free and easy-to-use operating system , And the programming language , Operating system theory , Compiler technology has developed to a certain extent , personal PC The era of sustainable development ;

  • GNU The system didn't work out ;

  • Minix Stick to it 『 education 』 Don't put ;

  • GNU Support for ;

  • Support from hardware manufacturers all over the world ;

  • Support from software vendors all over the world ;

  • The great contribution of open source developers around the world ;

To sum up , A person's destiny , Of course, we have to fight for ourselves , But also consider the course of history .

 


Another netizen  Coldwings  Point of view

 

Tell the truth , You think too much ……

 

Linus It is Linux A lot of work has been done on the kernel development of , Such as project initiation , The design of the original kernel and so on , But any one you have now Linux Distribution in , It contains at least a hundred GNU project , Countless other open source projects , And hundreds of thousands of people contributed code . What is said here is Linux, Refer to Linux This kernel , The kernel doesn't include any application layer , Even the black box command line is not Linux Part of . The kernel exposes the abstraction from hardware to software 、 Task and resource scheduling , The programming interface of calling system is given , That's it .

 

Linus What we did 1991 What are the features of the first version of the kernel ? To put it simply , That's true :

 

One has hardware platform limitations , It works , It was not very popular at that time Minix Most of the features of the operating system kernel are compatible with the kernel .

 

In terms of ability , That's very strong , Because more than 20 years later, today's college students have to write a big homework even if they take the operating system course OS kernel , It doesn't usually do it in a comprehensive way , Not to mention fully compatible with a standard ( Of course, it's more likely that there's no such elaborate requirement ). But if that's all ,Linux It stops at 「 Excellent course assignments for college students 」 Level up .

 

What really matters is that he put Linux Throw on the Internet and collaborate with the community to develop ( And then it added GPL agreement ), And then, in 2 More than 100 people have been tossing about this kernel in the past year . And in the commercial environment at that time, it was widely used Unix And the main distribution Unix When the sky is high , stay 4 Years later, someone finally felt that this open source kernel plus GNU Tools can act as a substitute Unix Cost savings , It's only in the real sense that it's getting hot . At that time, thousands of people had participated in the development of the kernel , There are even a lot of RH Wait for the company's full-time employees .

 

you 're right , It's just a kernel , There's no human-computer interaction , It's something that just provides the environment for the software to run , Although the original prototype was Linus The works of , Four years later, it has been developed by thousands of programmers who have studied the operating system . And this is just an existing Linux A small part of the distribution ( Even though it's important ), An interactive command line environment bash From GNU, The graphical interface Gnome From GNU, Voice service comes from GNU, The display service comes from GNU( There are also other open source implementations in recent releases )…… Even compilers come from GNU, And these things ,Linus Almost no participation .

 

He's a God , yes Linux The father of , But say Linux, In particular, now widely used function complete Linux He developed this kind of thing on his own , It doesn't exist .

版权声明
本文为[osc_ auwur47t]所创,转载请带上原文链接,感谢
https://cdmana.com/2020/12/20201225085811703A.html

Scroll to Top