Chapter 430 The big one is coming (there are only two chapters today, see the 'Writer's Note' at the end of the chapter for details)
To be honest, this thing is a new thing, and now everyone's focus is still on how to use computers to complete specific functions on this matter.
As for someone like Gao Zhendong, who seemed to do nothing but light up the screen so that people could operate the computer, but had no specific goal, it made everyone a little confused for a while.
But those present were all professionals after all. The meaning of what Gao Zhendong said was not felt for a while, but at least, they soon realized the benefits of this thing to professionals.
For today's loop watch programs, file management is actually a very troublesome thing.
Even the cycle watch program itself is not a fuel-efficient lamp.
Whenever a program is completed, if it is run alone and does not add the software menu of the loop watch program, it is easier to store it directly to a certain starting position of the storage device. After the computer starts, The program will automatically start executing from that place, and it will be called naturally.
But if for the sake of convenience, you want to put it in the software menu of the current cycle watcher program to facilitate calling and program switching, then trouble will come.
First put the compiled program into the memory, then write down its starting position in the memory, and then configure the name and starting position of the software into the configuration file of the loop watcher program. This can be called.
If this is not the most troublesome thing, then the other thing is super troublesome.
——File management.
In the loop daemon, although there is the structure of the file itself, there is no file system. This means that in theory, the files generated or modified by each program are private to itself and cannot be accessed by other software at all.
Of course, there are solutions. For example, delineate one or more areas on the memory. All programs agree that when they need to access files for a certain purpose, they will access this area. Read and write in a specific format.
Except for this designated area, be sure not to touch other places. That is the territory of other software, and it may even be the ontology of other software.
In this way, the problem of shared access of files in multiple software is barely solved.
This can also be regarded as a relatively primitive file system. It cannot even be regarded as a system, but can only be regarded as a file operation method.
But this method is extremely troublesome.
The management of these files is basically not managed automatically by computers, but by people, and what is managed is the extremely detailed issue of specific storage locations, which is a headache.
Although there are some methods to achieve small and convenient functions such as automatically loading access addresses according to configurations, at the core, the problem still cannot be solved.
However, now, with General Engineer Gao, everything seems to be solved!
Heaven and earth, I finally don’t have to calculate the address!
Director Li, on behalf of all programmers, asked Gao Zhendong in an excited tone: "General Engineer Gao, please don't worry about anything else. I just want to ask one thing. Can this thing automatically manage files?" ?”
Gao Zhendong smiled: “Yes! The file in this system is a binary data stream. For the preset common file formats, you only need to determine the name of the file and specify the specific operation. That’s it. As for how files are distributed, stored, read, written, modified, erased, storage space recycled, etc. on the memory, it’s all a matter of the operating system.”
Chief Engineer Chi asked and concluded. Thoughts: "In other words, as long as we issue instructions like 'operating system, add 300 lines of characters to the end of the text file named test, 10 a's per line', it will automatically complete the file operation on the memory And the file address is transparent to all software. When any software operates a file, it only needs to operate through the file name? "
"Yes! The operating system can even do more. But the file name is not enough, the file path needs to be defined. ”
Mr. Chi no longer cares about the nonsense of this "file path": "No more, no more, this is good, this is good."
This is extremely pragmatic.
All the software staff looked happy. Just this one function can save them a lot of hair loss.
If Gao Zhendong knew what they are thinking now, I am afraid he would laugh out loud and die of laughter. You cannot save your hair after all.
Seeing their happiness, Gao Zhendong introduced them to another extremely practical function.
"You can directly call other programs in any program to complete the functions of other programs. For example."
Gao Zhendong opened the C editor and wrote a program called execprint. It is extremely simple. One function requires only two lines of core code.
——Call vi to edit a file named test.txt, and then call the printing program print.e to print test.txt.
What is called is an external executable program, not things inside the program such as library functions and built-in functions.
After compilation, everyone watched him directly enter the execprint command to run the program.
Then vi starts automatically, Gao Zhendong enters the famous string, saves and closes vi, then the printer "sizzles" and a piece of white paper spits out.
For today's programmers or computer operators, calling each other between executable programs is something that has never been considered. It cannot be done, or it is very dangerous to do.
For example, they want to complete the program just demonstrated by Gao Zhendong. The complete operation is like this.
First open vi, compile test.txt, and exit vi. Then switch to open the print program and print.
This is good luck. In the loop duty environment, there are vi and print at the same time. If the two are not in the same environment, it will be great fun. Complete the vi operation first, then shut down the computer, change the tape or memory and mount the print software. ,Print.
It may not seem "too" troublesome, but the actual operation is completely different. Moreover, it involves the automatic execution of a program, which is the core.
Of course, for Gao Zhendong's operating system, there is another way to implement these operations, and that is to use scripts, but that is another question.
Looking at the familiar line "NiHao, ShiJie!", all the programmers shouted.
“This feature is great!”
"With this, I can save at least a quarter of my time!"
"The program is called automatically. I have been thinking about a similar function, but I just don't know how to implement it. It turns out that the loop duty environment framework is too Dead."
"Hello, senior sister!" Huh? There seems to be something strange mixed in.
Gao Zhendong struck while the iron was hot and showed them another method of automating the above operations, a batch file, or a script, but Gao Zhendong felt that the name batch processing was more appropriate.
There was another commotion.
"This is even better. You don't need to compile it. You can directly use the existing software to create a system-wide new software."
"Batch processing, this name is well chosen. With this function, some simple Repeated operations can be executed automatically."
"Director Gao even added a process control statement similar to C language. "
With the veil of the operating system. Little by little, Director Li and Chief Engineer Chi began to realize that what Gao Zhendong said just now was far from being as simple as they first thought, and it was of great significance.
It is not without its problems. For example, current memory can only be used on magnetic tapes. Don’t even think about using magnetic cores and transistor memories. They are too expensive.
But is this an operating system problem? No, it's our own problem, we can't afford enough high-speed memory.
Chief Engineer Chi recalled what Gao Zhendong had done just now, and suddenly discovered something that no one had noticed.
"General Engineer Gao, your operating system can execute multiple programs at the same time? When I was editing in vi just now, it was obvious that the execprint program did not exit and was still running. Does this mean?"
Everyone just noticed this detail and fell silent. If this is true, it is completely subversive.
Today's computers are basically single-task. In fact, this is because the performance is only so small, and it is good to be able to complete one task.
But in any case, being able to run multiple tasks at the same time is a great change, which means more possibilities.
Gao Zhendong smiled, how should I put it, the evidence is wrong, but the conclusion is right.
“That one just now? That one doesn’t count. In that one, I just used a stack operation similar to a function call to save the scene of execprint. In fact, only vi was running at that time, and execprint was restarted after it finished running. It started running at the recovery site.”
Everyone was a little disappointed, but they seemed a little relieved. This result seemed to make Chief Engineer Gao more down-to-earth.
“But.” Well, the most terrifying thing is but.
Gao Zhendong ignored what they were thinking and continued: "This operating system is indeed a multi-tasking operating system that can execute multiple programs at the same time. It is said that it is at the same time, but it is only the same time on a macro time scale. On a micro scale, it is actually The time is divided into many pieces and they are run in turns. "Wow! !"
How can this be done? In theory, this is indeed feasible. It is easy to operate at the same time and sprinkle water on it, but in reality, it is so simple!
At least one of everyone here has never thought about how to do this.
Xiao Qin looked at Wu Shengyuan and the three others, his eyes full of envy and jealousy. This is the unit they went to, and this is their technical leader? So scary! It can be regarded as a good opportunity for them to catch it.
"Hiss~~~~~~"
After receiving Gao Zhendong's confirmation, Director Li and Chief Engineer Chi took a deep breath. Chief Engineer Gao didn't seem to be very good at computers in the past few months. Action, but I never expected that it would be invisible all year round, and it would be revealed in one fell swoop.
This is a big deal.
(End of this chapter)