Multithreading? This is a professional computer language. If you want to know what multithreading is, you must first know what thread is. After all, multithreading is just multiple threads.

Everyone knows the program, and every program running on the system is a process. A process cannot be completed at once. It needs to be separated and executed step by step. Each step can be called a thread.

By definition, a thread is a set of instructions, or a special segment of a program, which can be executed independently in the program. It can also be understood as the context in which the code runs.

The so-called multithreading refers to the technology of concurrent execution of multiple threads from software or hardware. Computers with multithreading capability can execute more than one thread at the same time because of hardware support, so as to improve the overall processing performance.

In terms of hardware, if the computer has two CPUs, or in later CPUs, a single CPU has several cores, all of which have this ability. However, if there is only one CPU and one CPU has only one core, such a program can still be carried out.

In short, a core can be allocated. For example, 100 clock cycles can be used to execute the instructions of a software thread, and then switch to another thread to execute the next 100 clock cycles; You can also extract instructions from one of the two threads in each clock cycle, take turns, and so on. From the appearance, it seems that there are two cores executing at the same time. In fact, it is similar to the early time-sharing multiplexing, but it takes a very early time.

In this era, computer programming is still a tall subject. Colleges and universities have just begun to set up this science. Programmers in society are the elite of the elite. However, Qin Guan came from a previous life, that is, in another time and space, programming is almost the basic course of many universities.

Of course, Qin Guan knows the meaning of multithreading. Then, what does Lisa mean by saying this to herself now?

The system in your brain is equivalent to a single core CPU, but now you have to move out both parts. In this way, you have to execute two programs.

If you move one alone and then the other, there are still two parts. What if you use this multithreading technology?

Two exchanges are carried out alternately, so that when the exchange is completed, one can be formed?

This method sounds very good, but is it reliable?

"I don't know. Before I succeed, I don't know the reliability. Now, you can choose to accept the attempt or wait." Lisa's voice is lazy: "my da Vinci is coming back soon. If you want to try, you have to decide as soon as possible."

Qin Guan clenched his teeth: "well, just use what you said."

If you don't succeed, it's a big deal to weld these two paragraphs by yourself! In short, this attempt is very meaningful. If it is successful, we can follow the same example and exchange the aircraft carrier that needs hundreds of millions of spirit points.

"Don't dream, because in the cemetery, the submarine is two halves. Unless you divide the aircraft carrier into ten sections in the cemetery, you can't finish it all your life alone." Lisa's voice came again.

"Open access, I need to modify some programs. You are ready to absorb new spirit points at any time."

Although it is multi-threaded concurrent execution, the total spiritual points required remain unchanged. When the upper limit of spiritual points remains unchanged, Qin Guan needs to constantly absorb spiritual points from the outside to make up for the consumption. In this way, he does not violate the needs of the system, but bypasses this limit.

"Yes," said Qin Guan.

Just then, Qin Guan heard Lisa's cry.

Hey, be serious!

Qin Guan didn't know what Lisa was doing. He always felt that Lisa was absent-minded. She seemed to be enjoying another happy thing? This finally made Qin Guan speechless.

However, Lisa used two things at once and modified the program very quickly. Fortunately, when Qin Guan was inside the system, the external time of Qin Guan's own space did not pass. It's no big deal to wait a little longer.

"Hey, can you not make such an attractive sound?"

Qin Guan didn't know how many times he complained. Finally, Lisa was relieved and became!

Qin Guan was relieved and started the exchange!

In the past, starting the exchange was a moment. The time and space outside came in and the exchange inside went out. But now, with Lisa's modification, the exchange process slowed down. Qin Guan can see that two and a half submarines are slowly disappearing.

At the same time, the steel outside and the goods exchanged for equivalent value are all slowly coming over.

The exchange process is decomposed to the thread level, and then carried out alternately.

"Hey, go on with the harvest and cheer up!" Lisa shouted.

At the same time, Qin Guan can shuttle back and forth between two time and space at the speed of threads, which Qin Guan has never experienced before.

Cheer up!

With the expansion of the spirit point scanning system, Qin Guan will harvest more and more. Now, in order to fill the vacancy of 10 million spirit points, Qin Guan needs to harvest many people.

Anyway, everyone is sleeping. Cheer up and come out after harvest. Qin Guan has nothing to worry about. Harvest in large quantities!

In this way, the speed of exchange was slowed down, and the threads continued to alternate, while the scholars outside also felt some strange things. This time, how did President Qin appear in a state of intermittent mental coma?

In fact, the flow rate of time was slowed down. The whole exchange process took a very short time. When the submarines in the two halves of the cemetery disappeared, the scholar saw a huge object next to their small boat. Through the dim light of the port, you can see that it was a super large submarine, with its exposed back, It's like a huge shark.

"Mr. Qin, it's done," said the scholar.

It was different in peacetime. After the exchange, Qin Guan felt that his brain was empty, as if he had been drained. He lay soft on the chair. Such hyper threading technology requires high-speed CPU operation. It seems that his brain is working at a high frequency, and now he is overworked.

The full power of the computer will make the internal heat seriously. Qin Guan divides the exchange process into two parts this time, which requires two brains. It is a very expensive calculation to insist on completing it with one of his brains.

"Scholar, inform people and take it to the cave." Qin Guan said, closing his eyes. He was so tired!

Tap the screen to use advanced tools Tip: You can use left and right keyboard keys to browse between chapters.

You'll Also Like