Jan 15 (clock, pipeline) Flashcards
What is clock?
Anything that can be turned on and off(e.g. CPU)
List 5 things how to speed up instruction execution(“wish list”)
- All instructions should be directly executed by hardware (but complex and expensive)
- Issue instructions as fast as possible (but complex and expensive)
- Instructions should be easy to decode.
- Only LOAD and STORE instructions should reference main memory(RAM)
- Provide lots of registers (but expensive)
What does RISC stand for?
Reduce Instruction Set Computer: fewer and simpler instructions (e.g. 3+3+3+3+3 = 15)
What does CISC stand for?
Complex Instruction Set Computer: more, and more complex instructions (e.g. 3 * 5 = 15)
True or false?
“Our computer is a mix; mostly CISC with some RISC.”
False. Our computer is a mix; mostly RISC with some CISC.
What is the principle of spatial locality and how do we make use of it?
Spatial locality means that if you use a piece of data, you’ll probably need the data next to it soon. To make things faster, cache systems don’t just get the data you asked for; they also grab the nearby data and keep it ready.
What is the principle of temporal locality and how do we make use of it?
Temporal locality is when a word is requested by the CPU, it is probable that the same word will be requested again. We make use of it by keeping that word available in cache memory for fast access.
What is the difference between spatial and temporal locality?
Spatial locality is when a word is requested by the CPU, it is probable that the surrounding words will be requested by the CPU soon.
Temporal locality is when a word is requested by the CPU, it is probable that the same word will be requested again by the CPU soon.
(They both are relevant to what words end up in cache)
What is a pipeline? Also, what is its purpose?
A pipeline is a set of multiple hardware devices working together to maximize improving instructional bandwidth. It utilizes the principles of FDE. It works in parallel and in series. Its purpose is to process instructions by fetching, decoding, and executing.
Describe what happens when a CPU fetches a word from memory
First, the cache checks if it already has that data. If it does, the cache quicly gives the data to CPU. If cache doesn’t have the data, it asks the main memory for the data. But instead of getting just that word, the cache gets a block containing the word and store them in the cache. After that, the cache sends the requested data to the CPU. This process helps make everything faster.
latecyの単位
〇〇 時間 / instruction
〇〇:同じ時間単位に直してそれを全部足す
bandwithの単位
1 instruction / 〇〇 時間(e.g min)
〇〇に入るのは同じ時間単位に直した時の一番大きい数字