twelve

The system is not big, but it is very capable, this is the feeling after Lu Ping read through it, it supports disk, supports directories, has a file system, and can also achieve multi-task and multi-user.

Lu Ping gave it a try, although it can only support two users for functional reasons, but it can already multi-task without hindrance, and the two users have almost no impact.

After debugging this system, Lu Ping finally admired Cao Changjiu a little, the program is not too much, but it contains a lot of content, and it can run without errors under such harsh hardware conditions, which is really rare. What's more valuable is that it actually realizes multi-user and multi-task operation, which Lu Ping sincerely admires.

In fact, this system was written by Cao Changchang one by one Unix-like, which is equivalent to the Linux of later generations. When Linux rose in his dream, Cao Changjiu had written it himself, and now it's just a matter of revisiting the old things and writing it again.

The only difference is that the machine is a little worse, compared with the single-chip microcomputer in the dream, the operating system of the single-chip microcomputer is even more streamlined, Cao Changjiu is even better at this, so that he is still glad that he did it in his dream.

As for the time-sharing multi-task characteristics of the system, it is a long story, the time-sharing system was proposed in the early stage of computer development, and the input and output of the machine at that time was a row of switches and indicator lights, and later advanced a little more to engage in punching paper tape input. Find a cardboard tape, two rows of holes, there are holes on the top to represent one, no holes to represent zero, a program to play the long, wait for the paper to go in and then press the electric door, the computer will start to count. After calculating the abrupt punching, another piece of paper came out, and people counted the holes one by one and converted them into results. Therefore, at that time, the computer had to wait, and the operation efficiency of the computer was not high, and most of the time was wasted on input and output, which is commonly known as a single person and a single task. Only one person can operate a task at a time, which is of course inefficient. This led to the creation of the time-sharing multitasking operating system, which is the famous and well-known UNIX.

The two great people who invented UNIX are Grandpa Ken Thompson and Grandpa Dennis M. Riche, known as DMR. In 1969, when computers were still in the prehistoric era, it was generally agreed that the operating system was a feature of the mainframe, that it was impossible for a minicomputer to run an operating system, and that it was even more foolish to write an operating system in a high-level language. In 1970, in order to be able to play games on the machine (as any computer predecessor would have known), the two wrote the first version of the operating system UNIX in assembly language on PDP-7 (a small computer that was much more rubbish than Cao's DJS-130) in assembly language. Later, in 71, Grandpa K rewrote UNIX in C language (high-level language), and I still have a great admiration for my juniors.

Let's talk about Unix later, it's time to talk about the king.

Wang Suo feels as if he has forgotten something these days, and it is normal for people to lose their memories when they are old. He is not retiring in his sixties, and he is still presiding over the development of a national high-performance computer, and he is really too busy.

But he always felt that he had explained an important thing above, why couldn't he remember Nirvana?

After thinking about it for a long time, I finally got a little impression, Secretary Hu sent a student here for an internship, and he also sent someone to take care of it. I don't know what happened to this little guy, Wang thought.

Wang Suo originally thought that he would leave after a few days of long-term work, but where did he think that this kid would actually live in the warehouse, and even Lu Ping, the kid, followed suit.

The more I thought about it, the more relieved I became, a month had passed, but the two of them had no news, and they didn't even see each other, so I had to go and see, Wang thought to himself.

When he came to the door of the warehouse, he heard the crackling sound inside. He nodded and thought, it seems that both of these guys are full of hard work.

Wang Suo didn't want to alarm them, so he walked in softly and stood behind Lu Ping, who didn't notice anything.

What he saw in front of him made Wang Suo a little surprised, it was not the first time he had seen the display system, he just thought that it was surprising that two young people could actually make such a feat on a small computer.

"Ahem, huh. ”

Wang Suo coughed lightly, Lu Ping looked back, stood up and said, "Wang Suo, you are here, you sit." ”

"Well, you're busy, I'll take a look. Wang Suo smiled and said that he was very fond of talented young people, "What about that little guy?"

Lu Ping hurriedly replied: "I debugged the system all night last night and went back to sleep." He didn't dare to say anything about the two of them playing games all morning.

"Oh?" Wang was slightly surprised, "this display system is being debugged, is there any problem?"

"Not this one. Lu Ping hurriedly waved his hand, "The display system has been done a long time ago, Comrade Changjiu is debugging a disk operating system, which is very powerful, supports multi-task and multi-user, and I am making comments to his code." ”

Wang was shocked, and the children of the 14th Five-Year Plan wrote the operating system for the minicomputer, "Show me the code!"

......After watching the operation for half an hour, Wang Suo was speechless, turned around and said to Lu Ping: "Are you sure this is written by Cao Changjiu - that kid?"

"I don't know about that. It's just that he himself said that it took two days to write the code and one night of debugging before it came out. Lu Ping scratched his head and said, "Is there anything wrong with this?"

Wang shook his head: "No matter who wrote it, I admire the person who wrote this program." Albert Einstein said that mathematical formulas must contain beauty. Look at what a concise and beautiful program statement, Lu Ping, you have to study hard. ”

"Beautiful?" Lu Ping was at a loss, what is beautiful about this compilation statement, isn't it just a line of characters.

"Simplicity is beauty!" Wang defined.

Lu Ping was puzzled.

"Young man, don't you see? Have we ever written an operating system program before?"

"I wrote that the operating system of the 013 mainframe was what we did. Although the system written this time is fast, the function is not as good as our product. "Lu Ping's vision is indeed unique, and he can see the problem at a glance.

"No, in my opinion, long-term programs are not only concise and practical, but also have a greater benefit, which is portability. The king sighed.

"Are you talking about ......?" Lupin seemed to realize.

"Yes, although I didn't have an in-depth understanding, but I just read it once, and the program written by Cao Changchang is divided into at least several parts. I just found his core program, which is directly adapted to the hardware and fully exploits the potential of the hardware system, which is why the software runs so efficiently. As for the rest of the code, I'm guessing it's hardware agnostic, as if it was compiled automatically, and it's nowhere near as efficient as the core program, but it's also quite impressive. Wang kept looking at Cao Changjiu's original code and said.

"Yes, if you don't say that I really don't see it, I just think that these pieces of code don't seem to have been made by one person, why is there such a big difference. Lu Ping suddenly realized.

"In my opinion, except for the core code written in assembly language, the rest of the code seems to be written in a high-level language and then automatically compiled by the machine, the problem is that I have never heard of a high-level language that can be used to write an operating system, and it seems that this kid still has a lot of goods in his stomach. ”