如何計算多核處理器的處理器速度?

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,它是一個由Q&a網站組成的社群驅動分組。...

如何計算多核處理器的處理器速度?The advent of economical c***umer grade multi-core processors raises the question for many users: how do you effectively calculate the real speed of a multi-core system? Is a 4-core 3Ghz system really 12Ghz? Read on as we investigate.

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,它是一個由Q&a網站組成的社群驅動分組。

問題

超級使用者讀者nreligh很好奇如何計算多核系統的處理器速度:

Is it correct to say, for example, that a processor with four cores each running at 3GHz is in fact a processor running at 12GHz?

I once got into a “Mac vs. PC” argument (which by the way is NOT the focus of this topic… that was back in middle school) with an acquaintance who insisted that Macs were only being advertised as 1Ghz machines because they were dual-processor G4s each running at 500MHz.

At the time I knew this to be hogwash for reas*** I think are apparent to most people, but I just saw a comment on this website to the effect of “6 cores x 0.2GHz = 1.2Ghz” and that got me thinking again about whether there’s a real answer to this.

So, this is a more-or-less philosophical/deep technical question about the semantics of clock speed calculation. I see two possibilities:

  1. Each core is in fact doing x calculati*** per second, thus the total number of calculati*** is x(cores).
  2. Clock speed is rather a count of the number of cycles the processor goes through in the space of a second, so as long as all cores are running at the same speed, the speed of each clock cycle stays the same no matter how many cores exist. In other words, Hz = (core1Hz+core2Hz+…)/cores.

那麼,什麼是表示總時鐘速度的合適方法呢?更重要的是,在多核系統上使用單核速度術語是否可能?

答案

超級使用者貢獻者Mokubai幫助解決問題。他寫道:

The main reason why a quad-core 3GHz processor is never as fast as a 12GHz single core is to do with how the task running on that processor works, i.e. single-threaded or multi-threaded. Amdahl’s Law is important when c***idering the types of tasks you are running.

If you have a task that is inherently linear and has to be done precisely step-by-step such as (a grossly simple program)

10: a = a + 1 20: goto 10

Then the task depends highly on the result of the previous pass and cannot run multiple copies of itself without corrupting the value of 'a' as each copy would be getting the value of 'a' at different times and writing it back differently. This restricts the task to a single thread and thus the task can only ever be running on a single core at any given time, if it were to run on multiple cores then the synchronisation corruption would happen. This limits it to 1/2 of the cpu power of a dual core system, or 1/4 in a quad core system.

Now take a task such as:

10: a = a + 1 20: b = b + 1 30: c = c + 1 40: d = d + 1 50: goto 10

All of these lines are independent and could be split into 4 separate programs like the first and run at the same time, each one able to make effective use of the full power of one of the cores without any synchronisation problem, this is where Amdahl’s Law comes into it.

So if you have a single threaded application doing brute force calculati*** the single 12GHz processor would win hands down, if you can somehow make the task split into separate parts and multi-threaded then the 4 cores could come close to, but not quite reach, the same performance, as per Amdahl’s Law.

The main thing that a multi CPU system gives you is resp***iveness. On a single core machine that is working hard the system can seem sluggish as most of the time could be being used by one task and the other tasks only run in short bursts in between the larger task, resulting in a system that seems sluggish or juddery. On a multi-core system the heavy task gets one core and all the other tasks play on the other cores, doing their jobs quickly and efficiently.

The argument of “6 cores x 0.2GHz = 1.2Ghz” is rubbish in every situation except where tasks are perfectly parallel and independant. There are a good number of tasks that are highly parallel, but they still require some form of synchr***ation. Handbrake is a video trancoder that is very good at using all the CPUs available but it does require a core process to keep the other threads filled with data and collect the data that they are done with.

  1. Each core is in fact doing x calculati*** per second, thus the total number of calculati*** is x(cores).

Each core is capable of doing x calculati*** per second, assuming the workload is suitable parallel, on a linear program all you have is 1 core.

  1. Clock speed is rather a count of the number of cycles the processor goes through in the space of a second, so as long as all cores are running at the same speed, the speed of each clock cycle stays the same no matter how many cores exist. In other words, Hz = (core1Hz+core2Hz+…)/cores.

I think it is a fallacy to think that 4 x 3GHz = 12GHz, granted the maths works, but you’re comparing apples to oranges and the sums just aren’t right, GHz can’t simply be added together for every situation. I would change it to 4 x 3GHz = 4 x 3GHz.

有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。

  • 發表於 2021-04-12 04:49
  • 閱讀 ( 35 )
  • 分類:網際網路

你可能感興趣的文章

核心(core)和處理器(processor)的區別

核心與處理器 若你們不懂計算機,處理器和核心之間的區別可能是一個令人費解的話題。處理器或CPU就像計算機系統的大腦。它負責所有的核心功能,如算術、邏輯和控制操作。傳統處理器(如奔騰處理器)內部只有一個核...

  • 發佈於 2020-10-26 19:06
  • 閲讀 ( 61 )

amd公司(amd)和英特爾(intel)的區別

...md處理器及相關產品 AMD代表先進的微型裝置,是一家生產計算機處理器和相關產品的美國公司。它早在1969年由傑瑞·桑德斯創立。AMD生產處理器、圖形處理器、晶片組、記憶體和SSD等產品。除了這些矽基產品,AMD還生產膝上型電...

  • 發佈於 2020-10-29 07:30
  • 閲讀 ( 37 )

如果英特爾停止生產奔騰g4560,您應該購買哪種處理器?

... 在Anandtech測試中,3850在多核基準測試中表現溫和。另一方面,其整合GPU效能占主導地位。簡而言之,與英特爾的Atom處理器相比,AMD Sempron 3850憑藉其適中的CPU效能和一流的圖形輸出而大放異彩。...

  • 發佈於 2021-03-13 13:07
  • 閲讀 ( 64 )

什麼使英特爾酷睿i9成為最快的處理器?你應該買它嗎?

...司工作了一段時間,你可能會發現這兩家公司在10年前是如何以時鐘速度進行競爭的。 ...

  • 發佈於 2021-03-14 04:57
  • 閲讀 ( 49 )

什麼是cpu?它做什麼?

... 它們是如何工作的? ...

  • 發佈於 2021-03-17 18:33
  • 閲讀 ( 56 )

更快、更薄、更便宜:庫米定律是新摩爾定律嗎?

... 摩爾定律如何繼續下去 ...

  • 發佈於 2021-03-28 23:53
  • 閲讀 ( 56 )

amd與英特爾:什麼是最好的遊戲cpu?

...奪霸主地位,爭奪普通使用者和遊戲玩家的注意力。結果如何?這是PC遊戲玩家的黃金時代,兩大CPU**商進一步推動開發,加快邊界移動,最重要的是保持價格可及。 ...

  • 發佈於 2021-03-30 01:00
  • 閲讀 ( 52 )

至強vs.酷睿:英特爾昂貴的CPU值高價嗎?

...趣,或者您需要24/7正常執行時間,而不需要在幾周內對計算機進行油炸,那麼Xeon值得一看。如果更多的是關於遊戲的話,你花了很多錢卻幾乎沒有回報。 當評論家們在2019年初對價值3000美元的Xeon W-3175X“桌面”CPU進行評估時,...

  • 發佈於 2021-04-03 08:48
  • 閲讀 ( 58 )

cpu基礎知識:多cpu、核心和超執行緒

基本上,計算機中的中央處理器(CPU)在執行程式時進行計算工作。但是現代的cpu提供了多核和超執行緒等特性。有些PC甚至使用多個CPU。我們是來幫忙解決這一切的。 相關:為什麼不能用CPU時鐘速度來比較計算機效能 在比較...

  • 發佈於 2021-04-07 16:27
  • 閲讀 ( 40 )

ti在基準測試中展示OMAP5雙核晶片擊敗四核a9

德州儀器公司釋出了一段影片,展示了第五代OMAP智慧多核處理器的速度。影片將omap5與一個四核armcortex-A9處理器(很可能是tegra3)進行對比,比較兩個處理器在同時播放mp3和下載影片的情況下呈現HTML5網頁的速度。在瀏覽圖形豐...

  • 發佈於 2021-04-21 10:39
  • 閲讀 ( 34 )
nyj48002
nyj48002

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦