Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 2 fuera de 6 páginas
Examen

Computer Architecture: Performance, Pipelining & Memory Exam Q&A

Document preview thumbnail
Vista previa 2 fuera de 6 páginas

Contains 25 questions with verified step-by-step answers covering all major topics tested in undergraduate CS architecture exams. Topics covered: - Amdahl's Law calculations with full working - CPU Time formula (IC × CPI × Clock Cycle Time) - Pipeline stages and hazard types (structural, data, control) - Forwarding and branch prediction - MIPS assembly language instructions (srl, andi, sub.s) - IEEE 754 floating-point conversion to decimal - Cache memory: EMAT, hit rate, miss rate calculations - Memory hierarchy and locality - Parallel processing: SIMD, MIMD, SMT, Hyper-Threading - Speedup, scalability, and GFLOPS calculations All questions include full step-by-step working. Ideal for last-minute exam revision

Vista previa del contenido

Computer Architecture
Performance, Pipelining, Assembly & Memory

Computer Organization & Architecture | Undergraduate CS
Questions & Verified Answers

, 25 questions covering Amdahl's Law, CPU time, pipeline hazards, assembly, IEEE 754, cache, and
parallel processing.


Q1. What is Amdahl's Law and what is its formula?
Answer: Speedup = 1 / [(1 - P) + (P / S)], where P is the fraction of the program that can be
parallelized and S is the speedup of that parallelizable portion.
Key insight: the non-parallelizable fraction (1-P) is the bottleneck.
As S approaches infinity, the maximum speedup approaches 1/(1-P).
Example: if 90% of a program is parallelized (P=0.9) and S=10, speedup = 1/(0.1+0.09) ≈ 5.26×
Q2. What is the CPU Time formula?
Answer: CPU Time = Instruction Count × CPI × Clock Cycle Time, or equivalently: CPU Time
= IC × CPI / Clock Frequency.
IC = number of instructions executed
CPI = average clock cycles per instruction
To improve performance: reduce IC, reduce CPI, or increase clock frequency
Q3. What are the three types of pipeline hazards?
Answer: Structural hazards (resource conflict), data hazards (instruction dependency, most
commonly RAW — Read After Write), and control hazards (branch instructions causing
uncertainty about the next fetch).
Structural: solved by stalling or duplicating hardware.
Data (RAW): solved by forwarding/bypassing or inserting NOP stalls.
Control: solved by branch prediction (static/dynamic) or delayed branching.
Q4. Given $t0 = 0xAAAAAAAA, what is $t2 after: srl $t2, $t0, 3 then andi $t2, $t2, 0xFFFF?
Answer: $t2 = 0x00005555
Step 1 — srl $t2, $t0, 3: logical right shift 0xAAAAAAAA by 3 bits.
0xAAAAAAAA binary = 1010 1010 ... (repeating). Shift right 3: 0x15555555
Step 2 — andi $t2, $t2, 0xFFFF: AND with 0x0000FFFF keeps only lower 16 bits.
0x15555555 AND 0x0000FFFF = 0x00005555
Q5. For the C code float f2c(float fahr){ return ((5.0/9.0)*(fahr-32.0)); }, what is the next instruction
compiled by an optimized compiler assuming all constants are already loaded?
A. muls $f0, $f16, $f18
B. sub.s $f18, $f12, $f18
C. lwcl $f18, const32($gp)
D. div.s $f16, $f16, $f18
Answer: B. sub.s $f18, $f12, $f18
The formula requires fahr-32.0 before multiplication.
Since all constants are already loaded, the optimized compiler computes the subtraction first.
sub.s is the MIPS single-precision floating-point subtraction instruction.

Q6. Calculate (8.33×10¹) + (3.87×10⁰) with 3 significant decimal digits. With guard/round digits vs
without — by how many ulp do the answers differ?
Answer: 1
Exact sum: 83.3 + 3.87 = 87.17
With guard and round digits: round to 3 significant digits → 87.2 (digit after 3rd is 7 ≥ 5, round up)

Información del documento

Subido en
13 de mayo de 2026
Número de páginas
6
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$8.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
1
Seguidores
0
Artículos
38
Última venta
2 meses hace


Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes