Chapter 134 Upgrade Details
Chapter 134 Upgrade details
Yang Zhiqiu asked: "Does Xiaofeng often do this?"
After hearing that Han Feng often did not go to class for many days to play with missing things, Han Feng's parents were surprised because Han Feng had always given them the impression that they were a very well-behaved son. From this perspective, this kind of thing would definitely not happen. However, after going to college, why did the changes so big?
Han De is also a person who talks less, so along the way he is like a bystander and rarely speaks. Basically, Yang Zhiqiu is asking questions.
Yang Cheng smiled and said, "Sister, you don't have to worry about Xiao Feng's affairs so much. He is really extraordinary. I think he underestimated him by the title of "genius boy".
When Liu Yueshuang saw that her godmother seemed a little angry, she also quickly asked Han Feng to say good things: "Godmother, my uncle is right. Brother Feng performed very well in school. He also won the 'elite medal' in elite military training! By the way, the teacher of their college published a paper in the Science Journal of Nature, and the teacher also signed his name, saying that Brother Feng had done a lot of effort."
Han De couldn't help but be moved when he heard this news. As far as he knew, Han Feng had just moved into a new major, how could he have achieved this step so quickly? He looked at Yang Cheng with suspicious eyes, wanting to find the answer from him.
When Yang Cheng saw him, he shrugged helplessly: "This is true, so I said this kid is very human! I will also reveal good news to you. Mr. Hua has now officially accepted Xiao Feng as a closed disciple. For Xiao Feng, he has stayed in Beijing for a long time."
"Old Hua?" Han De asked again, "The miracle doctor Hua Tiansheng?"
Yang Cheng sighed, "Isn't that true!"
Seeing his brother-in-law's appearance now, Yang Cheng laughed in his heart, and his son couldn't understand it either. He always looked old and had no temper. If the matter was on his son, it would be up to you to care whether you would care.
"Although Xiaofeng has only been here for a few months, he has done a lot of things. If you really want to talk about it, you really can't say it for a while. If you have time, you can ask yourself."
"Which house is he?" Yang Zhiqiu is concerned about Han Feng's safety now, and he doesn't care about anything else.
Yang Cheng said: "It's almost here, it's the building in the middle."
Several people came to Han Feng's residence. The door was locked. After a while, the doorbell was ringing, but it didn't ring, and it seemed that it was not here.
Yang Cheng said: "I have the key here, let's go in and take a look."
In two days and two nights, Han Feng had already encapsulated the control function of the "hardware abstraction layer", which was the result of him spending a lot of time on expected preparation and packaging before. Otherwise, if the packaging is temporarily carried out, this time would definitely be far from enough.
After this, he can actually control his body, such as sending function instructions directly to this layer, and he can also control his body. However, because the instructions are complicated and there are still a lot of nerve pulses involved, it takes a lot of time to control it. Every time he wants to do something, he has to brew it before he can do it, and the effort is also very consuming.
Han Feng has already finished writing the first real kernel of the super system. What he wants to do now is to install this kernel on the "hardware abstraction layer". Since this is the first kernel version and the development time is relatively tight, the principle of compiling this kernel is still based on the rules from simple to complex.
Han Feng temporarily designed it as a single-threaded structure, that is, only one executor is allowed to run in the kernel at the same time and will not be interrupted by the scheduler to run other tasks. This kind of kernel is called "non-preempt". According to Han Feng's processing, he treats the nerve pulse signals in his body as a single processor for processing, so the advantage of this is that it is relatively simple, and there are no concurrent tasks in the kernel, thus avoiding many complex synchronization problems.
Of course, this "non-preempt" kernel also has a very prominent disadvantage, that is, it is likely to delay the system's response speed. New tasks must wait for the current task to be released before they can get the opportunity to run.
Han Feng is also very clear that this disadvantage has hidden dangers, but if he wants to achieve "non-preemption", the complexity of the kernel will be greatly improved. It is not within his consideration for the time being, and it is just the goal of future upgrades. After all, the CPU of "nerve center" is actually quite powerful. Han Feng can use the "pseudo-multi-threading" method to solve this problem to a certain extent through a specially optimized scheduling algorithm. The principle is also very simple. He divides the execution time of each thread into n times slices, and each thread is "cross-over" execution in units of time slices. From a macro perspective, it seems that several threads are running at the same time, while at the micro perspective, there is still only one thread running at each moment.
This kernel adopts a "modular" approach to device drivers and file systems, that is, it can be loaded dynamically at any time when needed, and it can be uninstalled dynamically when not needed. Some control drivers that are necessary for the body, such as the control drivers for some major organs and parts, Han Feng precompiled them into the kernel in advance. These drivers cannot be uninstalled at will. Some extended functions for body parts, such as increasing the frequency range that the ears can hear, are made into "dynamic modules" that can be loaded and uninstalled dynamically.
Although there are still many functions in the kernel that have not been completed, Han Feng has left them with an expandable position, and will be added when upgrading later. For example, Han Feng even left a "network management" function interface. He is looking forward to when his super system can be connected to the real Internet and surfing the Internet. After all, this is theoretically feasible. Of course, as for how to couple with the Internet, Han Feng has not yet thought of an effective way.
In addition, Han Feng also implemented a timer with very high accuracy in the kernel, reaching the millisecond level. This thing is like the pulse of a super system. The more accurate the better, and it cannot be interrupted, and must continue to work normally. To put it bluntly, this is the life counter of the super system, which is the time working benchmark of the entire system. The execution of all instruction sequences is strictly sorted according to this time. In order to realize the "hardware" basis of the timer, Han Feng also spent some time and finally found a very stable neural pulse generation cycle path.
It was not until this time that Han Feng's super system truly reached the level of accuracy as computers.
After installing the kernel, Hanfeng once again installed some commonly used applications into the super system, including a command line control interface and a graphical desktop application.
The so-called "applications" before were actually just collections of some instructions and cannot be called real applications. These programs were written by Han Feng in a special high-level language invented by himself.
Hanfeng's implementation of this graphical desktop application is completely affected by the Linux operating system. It has added a visual shell to the outside of the kernel, which is just a matter of habit, in order to make the control image point more convenient.
The graphics mentioned here is the subtle control of Han Feng specifically for the "visual nerve", so as to realize the image of an LCD monitor in front of you. Even Han Feng himself was shocked! Because this "display" does not actually exist, it was "created" out of thin air, but its visual effect is like a real monitor in front of you, it exists in front of you, touched with your hands, but you can't touch anything.
Han Feng attaches great importance to programming in this aspect, just like the computer's graphic display function, Han Feng also specially reserved a graphic display interface in the "hardware abstraction layer". However, because the control involved is very complex, the functions completed are still very simple. The colors are only black and white, and the graphics displayed are still very rough, which is a bit similar to the situation when the computer was invented and only characters can be displayed. But now that Han Feng can reach this step, he is already very satisfied. He even couldn't resist the impulse in his heart and focused on developing this function.
Of course, Han Feng did not do this in the end, and he still had to eat it one bite at a time. He couldn't expect to become a fat man in one bite.
Add the application and Hanfeng's super system is installed. The next time is to start it up to see if it can run smoothly as expected.
Restarting the system is a process that even Han Feng himself feels a bit psychologically shady. After all, the feeling of self-examination of various organs in the body is really uncomfortable.
What should come will always come, and you can't escape it.
Han Feng prepared in his heart, then gritted his teeth and issued the system startup command.
Chapter completed!