The difference between theory and reality, what is the bottleneck in multi-core chip software development?

The difference between theory and reality, what is the bottleneck in multi-core chip software development?

As competition in the mobile phone market intensifies, mobile phone chip designers have released CPUs with more than 8 cores in order to create differentiation. The number of cores in mobile phone chips has surpassed the 2 or 4 cores of mainstream laptops. However, do we really need so many cores? What is the reason that we cannot fully utilize the true power of the CPU?

The central processing unit (CPU), as the brain of the computer, controls all the programs running on the computer. In order to make the programs run faster and more stable, computer architects are constantly thinking about how to design a better CPU architecture so that users can enjoy a faster and more convenient computer.

In order to design a better CPU, engineers want to continuously improve the CPU's clock speed so that the CPU can execute more instructions in one second. With the development of technology, the clock speed has indeed been gradually improved as engineers wished. Since the 1990s, the CPU clock speed has been increased from 60MHz to 2000MHz in 2000. The magnitude of the improvement is amazing.

Development has reached a bottleneck, and the era of multi-core is coming?

By the turn of the millennium, the progress of the clock speed was no longer so smooth. When the CPU clock speed reached about 4GHz, engineers found that the heat generated by the CPU per second had exceeded the amount that ordinary household radiators could bear. In order to solve the engineering bottleneck, engineers began to focus on multi-core architecture. Therefore, Intel and AMD both released dual-core CPUs in 2005, hoping to break through the bottleneck of single-chip performance through dual-core technology.

However, the multi-core architecture did not develop into ultra-multi-core as originally expected. From 2005 to 2015, Intel’s CPUs sold in the general consumer market (excluding e-sports players) have progressed from dual-core to quad-core at most. As for AMD, even if it released an 8-core CPU on the market, its performance was at most comparable to the same-level 4-core Intel CPU of the same period.

What factors prevent the CPU core from soaring as fast as the clock speed?

The limit of application, multi-core is useless?

Without considering that adding too many cores to a single CPU will significantly increase the power consumption of the CPU, the main factor is that multi-core applications are not easy to develop, which makes computer architects decide to continue to study how to improve the performance of a core rather than developing a multi-core architecture. However, why is it difficult to develop multi-core applications? This must be seen from the applications commonly used by users.

In daily use, users mostly use web browsers, watch videos, and play games. These three are exactly three different types of applications.

When using a web browser, the computer is mostly waiting for new instructions from the user, such as typing and clicking links with the mouse, and then reading web page data from the remote end and drawing the user interface. The software can run in parallel on the CPU side is quite rare, and therefore, multi-core does not bring much benefit in simple web browsing.

When watching videos online, the computer will continuously receive video data from the server and send requests to the server. After receiving the data, it will be handed over to the graphics processing unit (GPU) for graphics calculation, converting the compressed encoded image file into the display screen. In this type of application, the workload is mainly on the GPU side, and the CPU can not be parallelized to a high degree.

The last application is playing games. When playing games, the computer will continuously receive instructions from the user, and then mark the scenery and movements around the player in the virtual world constructed by the computer. After that, the entire virtual world is handed over to the GPU to convert it into a display image. The detailed operation process of the graphics processor is here.

In this type of application, because the computer needs to constantly record the player's movement and the position of objects in the virtual world in the CPU, the CPU is more burdened than other applications. After all, it needs to read the terrain coordinates of the map and the player's position and movement from the hard disk. In addition, the CPU also needs to send a large amount of game data to the GPU. Therefore, compared with the aforementioned applications, the game can be more parallelized. However, 4 cores are enough to handle all requirements. Because the heaviest load is still the GPU.

The fundamental problem is that human thinking is linear

From the reasons mentioned above, we can know that the most fundamental problem is that humans can only think about one thing at a time. Computer programs are written by humans, which leads to the human way of thinking being brought into the computer when writing programs, so that in the early development of programs, only a single-core processor can be used to complete them.

In addition, if the current program is to be modified into a parallel program, because the human thinking process is linear, engineers need to spend a lot of effort to find the parts that can be parallelized and make major changes to the logic of the program, making it difficult to promote parallel programs.

Some people may argue that people can do two things at a time, such as working and listening to music at the same time, but that can only be called being able to quickly switch between two things rather than thinking at the same time. Unless someone can focus his eyes on more than two points at the same time, then it is possible to handle two things at once.

In addition, some users claim that they open multiple web pages at a time, which also requires a multi-core CPU. However, as mentioned before, unless someone can focus their eyes on two points and view two web pages at the same time, opening multiple pages will only take up a lot of memory, and multi-core will not be of much help in such applications.

The mobile era has arrived, and applications have undergone dramatic changes

However, after the release of smartphones, the situation began to change. With the rapid development of mobile phones and the diversity of applications, multi-core applications have gradually increased. For example, in 2013, Apple launched the iPhone 5s, which added a small processor to the original dual-core CPU to collect sensor data. In other mobile phones, ordinary CPU cores are used to handle this. This allows the original applications to have a new parallel task.

In addition, recent applications have also begun to improve their interactivity with the real world. Take the currently popular Pokémon GO as an example. When AR is turned on to interact with the real world, a large amount of computing resources are required to execute such applications. When looking for Pokémon, the phone needs to collect GPS signals, download map information and the location where Pokémon appears.

When Pokémon appears, the camera image needs to be combined with the Pokémon. At the same time, the motion sensor needs to be turned on to calculate the movement trajectory of the player's lens and determine where the Pokémon should appear on the screen; when throwing the ball, the direction of the ball and the sliding speed need to be calculated to calculate the distance of the ball. These applications can be run in parallel, opening up a new world for multi-core CPUs.

In addition, with the rise of autonomous driving and artificial intelligence, chips originally used in mobile phones have begun to expand into other fields. In other fields, because a large number of sensors are needed, the application of super-multi-cores has become possible. After all, the current 4-core CPU can no longer cope with just receiving a large amount of sensor data.

So, do we need a multi-core CPU? For general laptop and desktop users, the recent answer is no, after all, 4 cores can already meet the needs of users; but in the mobile application market, the answer is yes, because mobile devices have more and more applications and more and more sensors. Putting more cores in the CPU will quickly cope with the growing hardware requirements without spending a lot of manpower and financial resources to squeeze more performance from a single core.

<<:  Using OpenSSL to convert private keys and certificates

>>:  Comparing the pros and cons of Android and iPhone

Recommend

iPhone X first disassembled in China, dual batteries/mainboard reduced by half

For a long time, the disassembly of new iPhones h...

A must-have user growth map for new product developers

User growth is an eternal topic in the Internet c...

Create a TikTok video promotion ad in 5 minutes!

Come and check out the latest TikTok Ads product ...

How to use Baidu experience for online promotion?

We all know that there are many ways of online pr...

Musk becomes the world's richest man, is the secret the "first principles"?

Musk is the richest man in the world, and he owns...

Fission Methodology | Free Bait: Teach you how to swipe the screen like NetEase?

While I was busy this week, I was thinking about ...

How did people in the Ming and Qing dynasties do charity? ——Study Room No. 1

Study Room No. 1, learn about public welfare toge...

Can ginger, Polygonum multiflorum and black sesame really help grow dark hair?

“People born in the 1990s have already started lo...

Don’t thaw the meat in water anymore, there are only 3 correct ways to do it!

Do you have a lot of frozen meat in your refriger...