# Pipeline 題目解說
## :memo: What is pipeline?
## Intro:
* #### Pipeline是一種執行指令(instruction)的方法,一般指令分為5個階段(stage),使用pipeline的CPU會在執行完第一個階段時,同時載入下一階段的第一個stage,這就是其運作方式。
> ### 補充:
> 每個CPU都可能有不同的pipeline深度(stage數),比如intel的某顆CPU甚至做到了19個stage,完全是依照CPU的設計而有不同的數字
## Example:
:::info
#### A computer use pipeline to perform its instructions with five stages. How many clock cycles are needed to execute 5 instructions when each stage demands 1 clock cycle?
:::
#### solution:

* #### 我們可以從上面的解法得知相比傳統的執行方式,pipeline省下了許多時間,因其在執行完第一個stage時就載入了I2的stage,藉此節省了時間。
---
## 那麼這題呢? 試著以此類推看看。 答案是C,解答於1130前公布

###### tags: `作業系統`