Chapter 134: Upgrade Details

Yang Zhiqiu asked, "Is Xiaofeng often like this?"

After hearing that Han Feng often didn't go to class for many days to play missing, Han Feng's parents were very surprised, because all along, Han Feng gave them the impression that he was a very well-behaved son, and from this point of view, this kind of thing would definitely not happen. However, after going to college, why did it change so much?

Han De also belongs to the kind of person who talks less, so he is like a bystander along the way, rarely speaking, basically Yang Zhiqiu is asking questions.

Yang Cheng said with a smile: "Sister, Xiaofeng's child's affairs, you don't have to worry so much, he is really not ordinary, with the title of 'genius boy', I think I underestimate him." ”

Liu Yueshuang saw that her godmother seemed to be a little angry, and hurriedly helped Han Feng say good things: "Godmother, my uncle is right. Brother Feng's performance in school is very good, and he also won the 'Elite Medal' in elite military training! By the way, last time the teacher of their academy published a paper in the scientific journal "Nature", the teacher also signed his name, saying that Brother Feng had made a lot of efforts. ”

Han De couldn't help but be moved when he heard the news, as far as he knew, Han Feng had just transferred to a new major, how could he do it so quickly? He looked at Yang Cheng with suspicious eyes, wanting to find the answer from him.

When Yang Cheng saw him looking at him, he shrugged helplessly: "This thing is true, so I said that this kid is very human! I will also tell you a good news, Hua Lao has now officially accepted Xiaofeng as a closed disciple, and his old man has stayed in Beijing for a long time for Xiaofeng." ”

"Hua Lao?" Han De asked again movingly. "Divine Doctor Hua Tiansheng?"

Yang Cheng sighed: "Isn't it!"

Seeing his brother-in-law's current appearance, Yang Cheng smiled secretly in his heart, his son can't understand it, he usually looks like an old god, he has no temper, and when it comes to his son, I don't care if you care.

"Although Xiaofeng has only been here for a few months, he has done a lot of things, and if he really wants to talk about it, he really can't say it for a while. Ask himself again when you have time. ”

"What house is he in?" Yang Zhiqiu is only concerned about Han Fengdi's safety now, and he doesn't care about anything else.

Yang Chengdao: "It's almost there." It's the one in the middle over there. ”

Several people came to Han Feng's residence, and the door was locked. Rang the doorbell for a while, it didn't ring, it didn't seem to be here.

Yang Cheng said: "I have the key here, let's go in and have a look." ”

In two days and two nights, Han Feng has already encapsulated the control function of the "hardware abstraction layer", which is the result of the expected preparation and packaging that he has spent a lot of time before, otherwise. If encapsulation is made temporarily. This little time is certainly not enough.

After that, he was actually able to exercise some simple control over his body. For example, if you send a function command directly to this layer, you can also control your body. However, due to the complexity of the instructions. There are still a lot of nerve impulses involved, so it takes a lot of time to control, and every time you want to do something, you have to think about it before you can do it, and it takes a lot of mental energy.

The first real kernel of the super system, Han Feng has already written it, and what he wants to do now is just 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 this kernel is still based on the law from simple to complex.

Han Feng temporarily designed it as a single-threaded structure, that is, only one executable is allowed to run in the kernel at a time, and it will not be interrupted by the scheduler to run other tasks, this kind of kernel is called "non-preemptive". According to Han Feng's processing, he processes the nerve impulse signals in his body as if they were a single processor, so the advantage of this is that it is relatively simple, and there are no concurrent tasks in the core, thus avoiding many complex synchronization problems.

Of course, this kind of "non-preemptive" kernel also has a very prominent disadvantage, that is, it is likely to delay the response speed of the system, and the new task must wait for the current task to be launched by the kernel executor before it can be run.

Han Feng is also very aware of the hidden dangers of this shortcoming, but if he wants to achieve "non-preemption", the complexity of the kernel will be greatly increased, which is not in his consideration for the time being, and it is just a goal to upgrade in the future. After all, the CPU of the "nerve center" is actually quite powerful, and Han Feng has used a specially optimized scheduling algorithm to solve this problem to a certain extent. The principle is also very simple, he divides the execution time of each thread into n multiple time slices, and each thread performs "cross" execution in time slices, so that from a macro point of view, it seems that several threads are running at the same time, and on a micro level, there is still only one thread running at each moment.

This kernel adopts a "modular" approach to both device drivers and file systems, that is, it can be dynamically loaded at any time when needed, and can be dynamically uninstalled when not needed. Some of the body must control the driver, fei = Teng = en = learn to play by hand. For example, for the control drivers of some major organs and parts, Hanfeng pre-compiled them into the kernel, and these drivers cannot be unloaded at will, while some extended functions for body parts, such as increasing the frequency range that the ears can hear, are made into "dynamic modules", which can be dynamically loaded and unloaded.

Although there are still many functions in the kernel that have not been completed, Han Feng has left them with an expandable position, which will be added when they are upgraded in the future, for example, Han Feng even left the "network management" function interface, he is looking forward to when his super system can be connected to the real Internet and realize the Internet, after all, this is theoretically feasible. Of course, as for how to make a connection with the Internet, Han Feng has not thought of an effective way for the time being.

In addition, Han Feng also implemented a very high-precision timer (timer) in the kernel, reaching the millisecond level, this thing is like the pulse of the super system, the more accurate the better, and it can't be interrupted, it must continue to work normally, to put it bluntly, this is the life counter of the super system, it is the time work benchmark of the entire system, and the execution of all instruction sequences is strictly in accordance with this time. In order to realize the "hardware" foundation of the timer, Han Feng also spent a lot of thought, and finally found a very stable circulatory pathway for nerve impulses to be generated.

It was only at this time that Han Feng's super system really reached the level of accuracy of a computer.

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 previous so-called "applications" were actually just a collection of instructions, and could not be called real applications, and these programs were written by Han Feng in a specialized high-level language invented by himself.

Han Feng's realization of this graphical desktop application is completely influenced by the Linux operating system, adding a visual shell to the outside of the kernel, but it is just a matter of habit, in order to control the image point, it is more convenient.

The graphics mentioned here are the subtle control of the "optic nerve" by Han Feng, so as to realize the image of an LCD monitor in front of your eyes. This kind of visual effect even Han Feng himself felt very shocked! Because this "monitor" actually does not exist, it was "created" by himself out of thin air, but its visual effect is like a real monitor placed in front of you, it exists in front of you, touch it with your hands, but you can't touch anything.

Han Feng attaches great importance to this aspect of programming, just like the graphic display function of the computer, Han Feng has also set aside a graphic display interface in the "hardware abstraction layer", but because the control involved is very complex, the function completed now is still very simple, the color is only black and white, and the displayed graphics are still very rough, a bit similar to the early days after the invention of the computer, only the characters can be displayed. But now that he has reached this step, Han Feng is already very satisfied. He even couldn't resist the urge in his heart to focus on developing this feature.

Of course, Han Feng didn't do this in the end, and the meal still had to be eaten one bite at a time, and he couldn't expect to be able to eat one bite and become a fat man.

Add the app, and Hanfeng's super system is installed, and the next time is to start it up and see if it works smoothly as expected.

And restarting the system is a process that even Han Feng himself feels a little psychological, after all, the feeling of self-examination of various organs in the body is too uncomfortable.

What should come is always coming, and there is no escape.

Han Feng prepared in his heart, then gritted his teeth and gave the system start command.

Suddenly, Han Feng's whole person was like a sudden "sheep madness", and he trembled violently......