Chapter 219 Important Things
This matter, although both the lawyer's ring and their respective parents think that it is because of the lack of precedent,
In addition, they are also students to start a business. Even if they are punished, it will not be too serious, but the sam members are still overshadowed.
After all, this is the first time they have encountered this situation, and they have never thought about such problems before.
They found that if you really want to do a good job, in addition to solving technical problems, you will also encounter other unexpected situations. Previously, these trivial matters were handled by Matthew alone. Among these people, Matthew is the one with the strongest external ability.
But now, the emergence of this incident makes them really feel the impact outside the campus.
If these things are just studied in school in peace, they will never be touched. Sam has become a medium for them to get involved in society, which has had a great impact on the hearts of Lin Hong, Arthur and Matthew, so that when they start their own businesses in the future, they will consider in advance what they have done, whether it violates the local law, and what needs to be prepared in advance. Question mark
Lin Hong returned to his room, left this matter behind, and continued to improve the system call function of the bash shell program.
Since the basic framework of bash has been completed, the system call speed has been improved by more than ten times. When the foundation is laid, the building on it will be built quickly.
Therefore, before midnight, he completed a total of more than 20 system calls, and completed all the functions that linus was transplanted to X4X.
He boarded cqcq and saw linus
happened to be online, so he sent him a message, and then sent the source code directly online to the other party.
[linus: Dude, your efficiency is so fast. After transplanting bash, the writing will be greatly accelerated in the future!]
[stone: Can gcc be transplanted in the next step? We don't have to switch to the weaving system in the environment of this cake, and we can compile it directly under the Linux platform.]
[linus: I was going to do this for the past two days, but now I have a new idea.]
[stone: Let's talk about it.]
[linus I think we should implement another file system instead of directly using the minix file system.]
Before that, in order to reduce the difficulty of writing code, Linus borrowed a lot of code from minix, the most complete of which was the implementation of the file system.
[linus:minix's file system is specially designed for microkernels. At the beginning, it was only considered for teaching purposes when it was designed. In order to better understand students, it can't really be used in large operating systems. There are fatal defects in performance. I think you should also find it. This point.]
Lin Hong agreed with this.
The efficiency of the minix system in file processing is indeed a little slow. At the beginning, I didn't feel it, but when he compiled the system, it was extremely obvious. As soon as there were many files, the efficiency of searching and reading files became extremely slow. At this point, it's not as good as dos
System.
minix's file system is designed to imitate the unix's file system. Its data structure is roughly the same as that of the U-pair file system, and can also be roughly divided into boot blocks, hyperblocks, cylinders, nodes, etc.
However, the author Andrew's system itself is used for teaching purposes, so when designing, it is considered to make it easier for students to understand, some of the complex implementations are omitted, and only its skeleton is retained. After appropriate modification, it can be Its normal operation has not been tested in the performance of a large number of file storage.
When there are few files on the disk, you can't feel the difference at all.
However, when Linus writes the Linux operating system, although there are not many codes, only about 12,000 lines, this 12,000 lines of code are not only in one file, but distributed in dozens of files and ten directories.
When compiling the system, the editor will find and link these source codes one by one according to the knitting index file makefiee, and then compile them.
In theory, with only this little file, the process should be very fast, but it turns out that it takes at least 40 minutes to compile the vooo version of Linux.
When Lin Hong had been pkip such a small software at noon, it took about ten minutes.
This efficiency is too low. If it is under unix or dos, the time spent may be only one-fifth or even one-tenth.
linus then began to find out where the problem occurred and why the editing speed was so slow.
In the end, he found that this was the reason for the design of the minix file system. He felt that it was necessary to change this point. He didn't want to port such a file system to Linux, which was as disgusting as eating a fly during a good meal.
As a technical house, Linus is absolutely not allowed to appear in Linux.
Lin Hong also thinks that this problem is really important. The file system is the cornerstone of the operating system. If the foundation is not well built, it will directly affect the height of the superstructure.
[inus: I've been thinking about this problem recently, and the next step is to start the design. But before that, I will solve a more important matter first.]
[stone: More important things?]
[linus: What every man has to go through, you know, haha!]
[stone: I don't understand.]
[linus: I almost forgot to weigh it, which seems to be much younger than me. I'm going to pursue a girl I like, do you understand?
When Lin Hong saw Linus's words, he was immediately a little ashamed. He really didn't realize it just now. It's not his fault. Just now, they were still discussing technical issues, and suddenly jumped to the topic of pursuing girls. As a nationality technical house only 14 years old in the century, it's strange to think of this problem.
[stone: The nose is like this. Then I wish you success and return the beauty as soon as possible.]
[linus: Haha, thank you!]
[linus: By the way, I forgot to tell you that it is best to follow the posix standard when you port bash, so that our system can be more compatible, and there will be no obstacles for those unix users to transfer to our Linux in the future.]
[stone:posix standard?]
[linus: This is a general term for a series of interrelated standards for the ieee organization to define api for software running on various unix operating systems. It was originally originated in a project in 1985...............,]
Then, Linus began to introduce the relevant content of this standard to Lin Hong in detail.
In fact, Linus was not clear about this standard before, but I just heard what the school teacher once said, because this standard is. The standard under four x uniformly specifies the implementation details of all system commands.
So, at the beginning, he posted a help post in the mail discussion group of minix, seeking the relevant standard download address of posix, but this post did not receive the attention and response of several people, and he did not find the relevant information of posix.
Therefore, he had to retreat and find a unix manual of the sub server to implement these system commands one by one according to the above commands.
However, this unix manual does not detail the internal details of the implementation of these commands, but only describes the results.
For example, the ls command, the manual only describes the results of this command, and what parameters can be added. For example, "ls-all" can display all files in the current directory, including hidden files.
The specific implementation is that linus comes up with itself according to the principle of the file system. For example, first find the boot area of the current directory, then analyze the file nodes in it, read the name, size, creation date and other information of each file from these nodes, and then display it in On the display screen.
In order to realize the functions of these system calls, you must have a good understanding of the underlying basic principles. Of course, this is not difficult to defeat linus
Otherwise, what else does he talk about writing his own operating system?
According to the information mentioned in the unix manual and Operating System: Design and Implementation, he has implemented a total of more than 20 system calls, which are exactly what Lin Hong has implemented in Linux.
[linus: A friend just sent me a few thick posix manuals a while ago, but now that you have begun to transplant bash, you can continue to do the next work.]
[stone: Where can I find the posix manual?]
[linus: I'm not sure about this. However, if you are in the United States, it should not be difficult to go to the book mall or library. You should be able to find it. The publishers of my posx manuals are...]
Then, Linus provided all the information about the publishing house and address to Lin Hong, so that if he really can't find it, he can follow this information and mail it directly to the publishing house.
[linus: Also, a friend of mine happens to have a server based on the Apple system. Last time I asked him to try the cqcq software. He is willing to host the server for free. What do you think?]
What Linus said was that Lin Hong mentioned last time that he wanted to host the server side of cqcq to another place, so Linus took a look.
[wtone: Yes. I will send you the installation file on the server side.]
With the increase of visitors, the performance of Sam's official server is a little unusual. In addition, the recent incident of Texas Instruments Company has happened, and Lin Hong finally agreed to turn the server away.
Originally, Lin Hong also planned to release cqcq so that more people could use it and continue to improve it, but after talking with Kevin last time, his plan was stranded.
He decided to redesign the structure of cqcq, increase its security, and then release it.
The current version is temporarily used to communicate with several internal people. After removing the server side, Lin Hong decided to recommend other members of this software.
Afterended the chat with Linus, Lin Hong began to officially redesign the cqcq software.