CPU Flashcards
CPU
The Central Processing Unit of the computer. It has many components, like a central processing unit and a Arithmetic Logic Unit. It has a bunch of logic gates paired together for it to function.
Arithmetic Logic Unit
The ALU has direct access to input/output to the process controller, RAM and input/output devices. The input and outputs flow along a path called a bus.
The ALU can support processes like Addition, Subtract, Increment, Decrement, AND, OR, etc.
Usually Data is passed from the RAM via the bus and a operation command from the Central Control Unit (This receives the instruction from RAM). The Output can either be stored in a register or ignored. In the case it is ignored, the ALU just needs to tell the Control unit how the numbers compare through flags (A wire that turns on or off if a condition is true (Greater than, Smaller than, Equal, etc)).
Central Control Unit
It regulates and integrates operations of the computer. There are a bunch of registers attached to it to store temporary information.
Register
Temporary Information stores that are activated via enable (Send info) and set (Save info) wires. These are like ram but store a lot less info with way higher speeds.
Clock speed
In every CPU there is a wire that turns on and off to synchronize the on and off of the CPU. This is called the clock and the rate at which this turns on and off is called clock speed. In essence clock speed is how fast each transistor can turn on and off.
Clock Speed Measure
1 Hz (Hertz) → 1 time a second 1 MHz (Megahertz) → 1 million times a second 1 GHZ (Gigahertz) → 1 billion times a second
Physical Cores
The amount of actual cores that are in a processor.
Threads
Sequences of commands that are given to the core. If the CPU core has more than one thread, it can switch threads when the other thread has down time.
Logical Cores
Logical Cores are virtually created cores that depend on thread count and physical core count. For example, four cores and four threads (1 per core) is 4 logical cores (4x1=4) while 4 cores and 8 threads (2 per thread) is 8 logical cores (4x2=8).
Concurrent Operations
Concurrent operations mean that more than one task can be taken on but they are being switched in between very quickly to make progress on each task. This seems like it is concurrent while the application is doing one thing at a time but switching between tasks. Threads work
Parallel Operations
If the system can execute two or more operations in simultaneously.
Optcode vs Operand
Optcode contains the instruction (like add or subtract) and the operand contains that memory address for that instruction to perform upon.
Cache
Think of this as a tiny but very fast RAM built into the CPU. When the CPU requests an Address, that whole block of addresses can be transmitted to the Cache as the CPU does read in-order so it is most likely possible that it will read the next few addresses as well. It can also be used to store intermediate values when performing longer and more tedious calculations.
Instruction Pipeline
Fetch → Decode → Execute
Since each stages uses a different part of the CPU we can parallelize, While one is getting fetched, the next instruction can be getting decoded while the next can be Executed. Sometimes this will create bottlenecks so CPUs sometimes halt the process and wait for a certain stage to complete. Modern CPUs can dynamically reorder to loop for better efficiency.