Microprocessor Module-5 Question Answers
Microprocessor Module-5 Question Answers
Module - 5
Pentium Processor
May-2023
1) Explain in brief cache organization of Pentium processor. (5m)
2) Explain MESI protocol. (10m)
December 2022
1) Explain the Floating-point pipeline of Pentium processor. (5m)
2) Explain the Branch Prediction Mechanism of Pentium processor. (10m)
December 2019
1) Explain how flushing of pipeline problem is minimized in Pentium architecture.
(10m)
May-2019
1) Explain an instruction issue algorithm of Pentium processor. (5m)
2) Explain cache organization of Pentium processor. (10m)
December-2018
1) Explain the Branch Prediction logic used in Pentium processor. (10m)
2) Explain an instruction issue algorithm of Pentium processor. (5m)
Module - 5
Pentium Processor
Q1) Explain in brief cache organization of Pentium processor.
Ans - The data cache organization of a Pentium processor typically involves the following
aspects:
Cache Hierarchy: Pentium processors usually feature a multi-level cache hierarchy,
including L1, L2, and potentially L3 caches. The data cache organization ensures that
frequently accessed data is stored in these caches, closer to the processor cores, to minimize
memory access latency.
L1 Data Cache (L1D): The L1 data cache is the closest and fastest cache to the processor
cores. It stores recently accessed data from memory to speed up subsequent accesses. The
size of the L1 data cache in Pentium processors varies depending on the specific model but
typically ranges from 32KB to 64KB per core. It operates on a principle of temporal and
spatial locality, meaning it caches data that is frequently accessed or located close together in
memory.
Cache Associativity: The L1 data cache in Pentium processors typically has a set-associative
or higher associativity, allowing for more flexibility in storing and retrieving data. Higher
associativity helps reduce cache conflicts and improves cache hit rates.
Cache Coherency: In multi-core processors, ensuring cache coherency is essential to
maintain data consistency across different cores. Pentium processors employ various cache
coherency protocols, such as MESI (Modified, Exclusive, Shared, Invalid), to manage data
consistency between caches in a multi-core environment.
Write Policies: Pentium processors may employ different write policies for the data cache,
such as write-through or write-back. Write-through immediately updates data in both the
cache and main memory, while write-back caches store data only in the cache until it is
replaced or invalidated, reducing memory traffic but requiring additional logic to manage
dirty data.
Overall, the data cache organization in Pentium processors is designed to optimize
memory access performance by efficiently storing and managing frequently accessed data,
minimizing latency, and enhancing overall system performance.
• Certain rules are provided for instruction pairing. Not all instructions are pairable.
• If the two instructions can be paired, the first one is given to the U pipe and the
second one to the V pipe. If not, then the first one is given to the U pipe and the
second one is held back and then paired with the forthcoming instruction.
Stage-3: Instruction Decode 2 or Address Generation Stage
• It performs address generation where it generates the physical address of the required
memory operand using segment translation and page translation.
• Even protection checks are performed at this stage.
• The address calculation is fast due to segment descriptor caches and TLB.
• In most cases the address translation is performed in 1 cycle itself.
Stage-4: Execution Stage
• The Execution stage mainly uses the ALU.
• The U pipeline’s ALU has a barrel shifter, while the V pipeline’s does not.
• Instructions involving shifting like MUL, DIV etc. can only be done by U pipeline.
• Operands are either provided by registers or by data cache.
• Both U and V pipes can access the data cache simultaneously.
• During execution, if the U pipe instruction stalls, the V pipe one must also stall.
• But if the V pipe instruction stalls, the U pipe one can continue.
Stage-5: Write-Back Stage
• As the name suggests, the result is written back into the appropriate registers.
• The flags are updated accordingly.
The MESI protocol, which stands for Modified, Exclusive, Shared, and Invalid, is a cache
coherence protocol used in many modern processors, including some Pentium processors. It's
designed to maintain cache coherence between multiple caches in a multi-core processor
system. Here's an explanation of each state in the MESI protocol:
Modified (M):
When a cache line is in the Modified state, it means that the cache holds a copy of the data
that has been modified compared to the data in main memory. This state indicates that the
data in the cache is the most up-to-date, and no other caches hold a copy of this data. If
another cache requests this data, the cache holding it in the Modified state must write it back
to main memory before fulfilling the request.
Exclusive (E):
In the Exclusive state, the cache holds a clean copy of the data that matches the data in main
memory, and no other caches in the system hold a copy of this data. This state is similar to the
Modified state, but the data has not been modified in this cache. If the processor modifies this
data, it transitions to the Modified state. If another cache requests this data, it can be provided
directly without needing to write it back to main memory.
Shared (S):
The Shared state indicates that the cache line is present in multiple caches, and the data
matches the data in main memory. This state allows multiple processors to read the data
concurrently without causing inconsistencies. If a processor modifies the data in a cache
holding it in the Shared state, it must invalidate other caches holding the same data to
maintain coherence.
Invalid (I):
In the Invalid state, the cache line is not valid, meaning it does not contain a copy of any
meaningful data. This state is typically entered when a cache line is evicted or when the
processor determines that the data is stale and needs to be reloaded from main memory.
Processors in the Invalid state cannot fulfill read or write requests for the associated data.
The MESI protocol ensures cache coherence by governing the transitions between these
states based on cache operations and communication between caches in a multi-core system.
By maintaining coherence, the MESI protocol allows multiple processors to share data
efficiently while ensuring data integrity and consistency.
Based on the above Register Contentions, we can formulate the instruction issue algorithm as
below –
Consider two consecutive instructions I1 and I2, decoded by the microprocessor …..
If all the following are true:
I1 is a Simple instruction.
I2 is a Simple instruction.
I1 is not a Jump instruction.
Destination o I1 not the same as Source of I2
Destination o I1 not the same as Destination of I2
Then
Issue I1 to U-Pipe and I2 to V-Pipe
Else
Issue I1 to U-Pipe