2 - x86 Processor Architecture Flashcards
What does the CPU do and have?
It is where calculations and logical operations take place. It has:
- Limited number of storage locations (registers)
- Clock to synchronize internal CPU operations with system
- Control Unit (CU) to coordinate sequence of steps when executing instructions
- Arithmetic Logic Unit (ALU) to perform arithmetic (add, subtracting) and logic operations (AND, OR, NOT).
How is the CPU attached to the rest of the computer?
The CPU is attached to the CPU socket in the computer’s motherboard. Most pins connect to the data bus, the control bus, and the address bus, all of which connect to everything else.
What is the memory storage unit?
Where instructions and data are held while a computer program is running. The storage unit receives requests for data from the CPU, transfers data from RAM to the CPU (to process all data), and transfers data from the CPU into memory.
What is a “bus”?
A group of parallel wires that transfer data from one part of the computer to another.
- Data bus transfers instructions and data between CPU and memory.
- I/O bus transfers data between CPU and system input/output devices.
- Control bus uses binary signals to synchronize actions of all devices attached to system bus.
- Address bus holds the addresses of instructions and data when the currently executing instruction transfers data between the CPU and memory.
What is a “machine cycle” or “clock cycle”?
The time required for one complete clock pulse (usually 1 billion ties per second).
Most machine require between 1-50 clocks. However, instructions needing memory access have empty clock cycles (wait states) because of the different speeds of the CPU, system bus, and memory circuits.
What are the steps of an instruction execution cycle?
- Fetch: the CPU has to fetch the instruction from an area of memory called the instruction queue.
- Decode: The CPU looks at the binary bit pattern. If operands are involved, the CPU fetches the operands from registers and memory (sometimes including address calculations).
- Execute: Executes the instruction, and if an output operand was part of the instruction, the CPU stores the result in the operand.
What is an operand?
A value that is either an input or an output to an operation.
For example, Z = X + Y has two input operators (X and Y) and a single output operand (Z).
What is the data flow within the typical CPU during the instruction execution cycle?
First, to read program instructions from memory, an address is placed on the address bus.
Next, the memory controller places the requested code on the data bus, making the code available in the code cache.
The instruction pointer’s value determines which instruction will be executed next, and the instruction is analyzed by the instruction decoder, causing digital signals to be sent to the control unit, which coordinates the ALU and floating-point unit.
What are the steps required to read from memory?
- Place the address of the value you want on the address bus
- Assert (change the value of) the processor’s RD (read) pin.
- Wait one clock cycle for the memory chips to respond.
- Copy the data from the data bus into the destination operand.
How does the cache speed up a computer?
The most recently used instructions and data are stored in high-speed memory (cache).
Also, when the CPU begins to execute a program, it can look ahead and load the next thousand instructions on the assumption that these instructions will be needed fairly soon.
What is a cache hit/miss?
A cache hit is if the processor is able to find its data in cache memory.
A cache miss is if the CPU tries to find something in cache and it’s not there.
What are the two types of cache memory in the x86 family?
Level-1 cache (primary cache) is stored right on the CPU.
Level-2 cache (secondary cache) is a little bit slower, and attached to the CPU by a high-speed data bus.
Why is cache memory faster than conventional RAM?
Cache memory is constructed from a special type of memory chip (static RAM) that is expensive, but does not have to be constantly refreshed to keep its contents.
Conventional RAM (dynamic RAM), must be refreshed constantly.
How is a program loaded and executed?
Before the program can run, it must be loaded into memory by a utility known as a program loader.
After loading, the operating system must point the CPU to the program’s entry point (the address at which the program is to begin execution).
Which two additional steps are required in the instruction execution cycle when a memory operand is used?
Fetch memory operands and store memory operands.
What are the three primary modes of operation of x86 processors?
- Protected mode (a sub mode of this is virtual-8086).
- Real-address mode
- System management mode