Complete Detailed Solutions · 2023 & 2024 Papers
(i) Define Superscalar.
Superscalar is a processor architecture that uses multiple parallel execution units (integer ALUs, FP units, load/store units) to issue and execute more than one instruction per clock cycle. Unlike a simple pipelined processor that completes at most one instruction per cycle, a 4-issue superscalar can theoretically retire up to 4 instructions every cycle.
(ii) Define Cluster Computer.
A Cluster is a collection of commodity computers (called nodes) interconnected through a high-speed network (like Ethernet or InfiniBand) that work together as a unified computing resource. Each node has its own private memory and OS instance. They communicate via message passing (e.g., MPI). Clusters are the foundation of modern supercomputers and cloud data centres.
(iii) Define Dataflow Architecture.
Dataflow architecture is a non-von Neumann computing paradigm where an instruction is executed as soon as all of its required input operands (data tokens) are available — there is no centralized Program Counter. Execution order is entirely determined by data dependencies, which naturally exposes maximum parallelism. Data tokens flow along edges of a dataflow graph from producer instructions to consumer instructions.
(iv) Define Instruction Pipelining.
Instruction Pipelining is a processor implementation technique where the execution of each instruction is broken into distinct stages (IF → ID → EX → MEM → WB) and multiple instructions are overlapped in execution — each stage processes a different instruction simultaneously, much like an assembly line.
(v) What is the primary goal of exception handling?
To ensure graceful recovery and prevent system failure when unexpected events occur during instruction execution (e.g., arithmetic overflow, page fault, illegal opcode). The processor must save the precise architectural state, invoke the OS exception handler, and resume execution correctly after the event has been handled.
(vi) What policy in virtual memory decides which page to remove?
The Page Replacement policy (algorithms like LRU, FIFO, Optimal, Clock) decides which existing page to evict from physical memory when a new page needs to be loaded and all frames are occupied.
(vii) What is a superpipelined processor?
A superpipelined processor divides the execution pipeline into a much larger number of finer-grained stages than a conventional pipeline. This allows the clock frequency to increase proportionally (since each stage has less combinational logic delay). For example, while a standard pipeline might have 5 stages, a superpipelined design might have 12–20+ stages, enabling a much higher clock rate but increasing branch misprediction penalties.
(viii) What is synchronization in a centralized shared-memory architecture?
Synchronization is the coordination mechanism that ensures mutual exclusion when multiple processors access shared data. It prevents race conditions and ensures data consistency. Common synchronization primitives include:
Test-and-Set, Compare-and-Swap that execute indivisibly.(ix) What is exception handling in computer architecture?
The hardware/software mechanism for responding to exceptions — anomalous or exceptional conditions (like arithmetic overflow, undefined opcode, page fault, or external interrupts) that arise during program execution. The processor interrupts the current instruction stream, saves the program counter and machine state, and transfers control to a predefined OS exception handler routine.
(x) What are memory replacement policies?
Algorithms used to decide which page in physical memory to evict when a page fault occurs and all frames are occupied. Key policies:
(xi) What is a memory replacement policy?
An algorithm (like LRU, FIFO, or Clock) used to choose a specific page to be removed from main memory when a page fault occurs and no free frames exist. The goal is to minimize the total number of future page faults.
(xii) What is a VLIW processor?
Very Long Instruction Word (VLIW) is a processor architecture where each instruction word is very wide (e.g., 128–1024 bits) and contains multiple independent operations (e.g., an integer add, an FP multiply, a load, a branch) packed together by the compiler. The hardware does not need dynamic scheduling logic — it simply dispatches each operation to its designated functional unit. Examples: Intel Itanium (IA-64), TI C6000 DSPs.
Cache Memory is a small, very fast memory placed between the CPU and Main Memory. It stores copies of the most frequently accessed data and instructions from main memory, so that the CPU can access them in just 1–3 clock cycles instead of waiting 50–100+ cycles for main memory.
Key Differences from Main Memory:
A superscalar processor aims to achieve IPC (Instructions Per Cycle) > 1 by issuing multiple instructions simultaneously. However, this introduces several critical design trade-offs:
Data Hazards occur in pipelined processors when instructions that are close together in the instruction stream have data dependencies — one instruction needs a value that hasn't been produced yet by a preceding instruction.
Types of Data Hazards:
ADD R1, R2, R3 followed by SUB R4, R1, R5. The SUB needs R1's new value before ADD has written it back.Resolution Techniques:
A Cache Miss occurs when the CPU requests data (or an instruction) that is not currently present in the cache memory. The processor must then fetch the data from the slower main memory (or a lower-level cache like L2/L3), incurring a significant latency penalty called the miss penalty (typically 50–200 clock cycles).
The 3 C's Classification of Cache Misses:
A fourth "C" is sometimes added: Coherence Misses — misses caused by cache invalidation due to writes from other processors in a multiprocessor system.
The Memory Management Unit (MMU) is a critical hardware component (usually integrated into the CPU) that acts as the bridge between the CPU's virtual address space and the physical memory hardware. Its roles include:
In a pipelined processor, a Hazard is a situation that prevents the next instruction in the instruction stream from executing during its designated clock cycle, forcing a pipeline stall (bubble). Hazards are the primary reason real pipelines never achieve the theoretical speedup of k (number of stages).
1. Structural Hazards (Resource Conflicts):
2. Data Hazards (Data Dependencies):
ADD R1, R2, R3 (writes R1 in WB — cycle 5)SUB R4, R1, R5 (reads R1 in ID — cycle 3)3. Control Hazards (Branch Hazards):
The design goal is to minimize every stall component through the techniques above, bringing the Effective CPI as close to 1.0 (or below 1.0 in superscalar designs) as possible.
(a) Concept of Virtual Memory:
Virtual Memory is a memory management technique that creates an illusion to users and programs that the computer has a very large, contiguous, and private main memory — even if the actual physical RAM is much smaller.
(b) Implementation in Modern Systems:
Virtual memory is implemented using a combination of hardware (MMU, TLB) and OS software (page tables, page replacement algorithms).
Step 1 — Paging:
[Virtual Page Number (VPN) | Page Offset].Step 2 — Page Table:
Step 3 — Translation Lookaside Buffer (TLB):
Step 4 — Page Fault Handling:
Cache Coherence is the problem of ensuring that all processors in a multiprocessor system see a consistent view of shared memory. When Processor A writes to a memory location cached by Processor B, B's cached copy becomes stale. If B reads the stale value, the program produces incorrect results.
Cache Coherence Miss Penalty:
1. Snoopy Bus Protocols (for Bus-Based Multiprocessors):
2. MESI Protocol (Detailed):
The most widely used snoopy protocol. Each cache line is in one of four states:
How MESI reduces penalty: The Exclusive state allows a single-reader to write without bus traffic. The Modified state enables cache-to-cache transfers — when another processor requests a Modified block, the owning cache can supply the data directly (intervention), which is faster than going to main memory.
3. Directory-Based Protocols (for Scalable Multiprocessors):
4. Additional Techniques to Reduce Coherence Penalty:
Both Superscalar and VLIW architectures aim to execute multiple operations per clock cycle, but they take fundamentally different approaches to achieving this goal.
Superscalar Architecture:
VLIW Architecture:
Summary Comparison Table:
| Aspect | Superscalar | VLIW |
|---|---|---|
| Scheduling | Dynamic (hardware) | Static (compiler) |
| HW Complexity | Very High | Low |
| Compiler Complexity | Low | Very High |
| Binary Compat. | Excellent | Poor |
| Code Size | Normal | Large (NOP padding) |
| Power | High | Low |
| Best Suited For | General-purpose | DSP, Embedded, Scientific |
Question: A system has a 64-bit virtual address space and a 4 KB page size. The page table is stored in main memory, which has a memory access time of 100 ns. The TLB has a hit rate of 90%, and a TLB miss takes 500 ns to service. What is the effective memory access time?
Step 1 — Identify Given Values:
Step 2 — Understand the Two Scenarios:
Step 3 — Calculate EMAT:
Substituting values:
EMAT = 0.90 × (0 + 100) + 0.10 × (0 + 500 + 100)
EMAT = 0.90 × 100 + 0.10 × 600
EMAT = 90 + 60
Step 4 — Analysis: