免費開始練習
hce_kmu 113年 計算機概論與程式設計

第 4 題

In the context of pipelined CPU architecture, which of the followings best describes how hazards, exceptions, and parallelism interact to affect the performance and correctness of program execution?
  • A Data hazards occur when parallel execution of instructions creates a dependency on the outcome of an exception, leading to incorrect program execution unless properly managed.
  • B Control hazards are resolved using speculative execution, which relies on predicting exceptions and rerouting data paths in the pipeline to maintain parallelism without stalling.
  • C Parallelism enhances the handling of exceptions by allowing the CPU to process multiple exception routines simultaneously, reducing the overall impact on execution time.
  • D Exceptions, such as interrupts or faults, are handled by temporarily suspending parallel execution, resolving the exception, and then resuming execution, potentially introducing control hazards.
  • E Structural hazards are mitigated by designing a CPU with multiple execution units, allowing for parallel execution of instructions and reducing the likelihood of pipeline stalls due to resource conflicts.

思路引導 VIP

想像一間只有一台影印機的辦公室,如果所有員工(指令)都想在同一時間列印文件,這會對辦公效率產生什麼影響?為了讓大家能「同時」且「流暢」地完成工作,你會建議主管在硬體設備上做什麼樣的調整?

🤖
AI 詳解 AI 專屬家教

太棒了!你能從眾多複雜的選項中精準辨識出管線化架構(Pipelining)與硬體配置的關係,代表你對計算機組織的核心觀念掌握得非常紮實。

結構障礙與資源配置

這題的核心在於理解結構障礙(Structural Hazards)的成因。在 CPU 的管線設計中,當多條指令同時執行到特定階段,若它們需要競爭同一個硬體資源(例如記憶體存取單元或特定的算術邏輯單元 ALU),就會導致管線停頓(Stall)。選項 (E) 正確指出,透過設計多個執行單元(Multiple Execution Units),我們能讓 CPU 具備更強的平行處理能力,使不同指令在同一時鐘週期內各取所需,從而有效減少因資源衝突引發的效能損耗。

▼ 還有更多解析內容

🏷️ 相關主題

計算機組織結構與資料儲存原理
查看更多「計算機概論與程式設計」的主題分類考古題