Home  >  Article  >  What can a CPU do in a multiprogrammed computer system?

What can a CPU do in a multiprogrammed computer system?

青灯夜游
青灯夜游Original
2021-01-22 16:56:089934browse

In a multi-programmed computer system, the CPU can be occupied alternately by multiple programs. In a single-core CPU, a thread can only be locked and used by one process at a certain time; in multiple applications, a polling mechanism is generally used to divide time slices into multiple applications, and the CPU quickly switches between multiple application processes. , to achieve the purpose of multi-process work.

What can a CPU do in a multiprogrammed computer system?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

The central processing unit (CPU), as the computing and control core of the computer system, is the final execution unit for information processing and program execution.

In a multi-programmed computer system, the CPU can be occupied alternately by multiple programs.

In a single-core CPU, a thread can only be locked and used by one process at a certain time, and other processes cannot preempt it. As for multiple applications, if less core resources are used, the operating system is responsible. Generally, the polling mechanism is used to divide time slices into multiple applications, and the CPU quickly switches between multiple application processes to achieve the purpose of multi-process work.

In other words, the CPU can be occupied by multiple programs. However, the CPU cannot be occupied by multiple programs "simultaneously", but can be occupied "alternatively" by multiple programs.

What is the number of cores?

The number of cores is a term for the CPU series, which refers to the situation where the processor frequency cannot be increased, and Intel and AMD do not need to carry out large-scale development. Next, existing products will be developed into multi-core processor systems with more powerful theoretical performance.

The number of cores is equivalent to how many tasks the CPU can handle at the same time. If the CPU cluster is compared to a factory, then the number of cores is equivalent to the production line in the factory. With several cores, Able to operate several production lines simultaneously.

What can a CPU do in a multiprogrammed computer system?

What is the number of threads

The number of threads is a logical concept. Simply put, it is the simulated CPU core number. Just like the human brain, the core number 2 means that the CPU has two brains. The more brains you have, the faster you can solve problems. The higher the number of CPU cores, the higher the processing speed. In layman's terms, a core number of 2 is a dual-core CPU. But since the advent of hyper-threading technology, one core can have two threads at the same time. Increase CPU performance by 40%.

The number of threads is equivalent to how many tasks each production line can do at the same time. Some production lines do one thing at the same time, and some production lines can produce two things at the same time, so there are four cores and four threads. Some have four cores and eight threads.

Summary:

The number of cores and threads are important performance indicators of the computer CPU. The higher the number of cores of the CPU, the higher the processing speed. The greater the number of threads, the more conducive it is to running multiple programs at the same time, because the number of threads is equivalent to the number of tasks that the CPU can process in parallel at a certain moment.

Introduction to the advantages of CPU multi-core and multi-thread:

The multi-core technology of CPU was proposed by Stanford University in the United States, which can combine SMP (symmetrical multi-core technology) in large-scale parallel processors. Multi-processors) are integrated into the same chip, and each processor executes different processes in parallel. Relying on multiple CPUs to run programs in parallel at the same time is an important direction to achieve ultra-high-speed computing.

The multi-threading technology of the CPU can copy the structural state on the processor, allowing multiple threads on the same processor to execute simultaneously and share the execution resources of the processor, which can maximize wide launch and chaos. In-order superscalar processing improves the utilization of the processor's computing components and alleviates memory access delays caused by data dependencies or cache misses.

Related recommendations: "Programming Learning"

The above is the detailed content of What can a CPU do in a multiprogrammed computer system?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn