Docsity

Advance computer architecture Question Answers,, Exams of Computer Science

Toggle sidebar
bg1
Advance computer architecture Question Answers, Exams of Advanced
Computer Architecture 2026
Structural, data and control - ANSWERName the three different types of
hazards
A structural hazard occurs when two (or more) instructions that are already
in pipeline need the same resource - ANSWERWhat is a structural hazard?
A control hazard occurs when deciding on control action depends on previous
instruction - ANSWERWhat is a control hazard?
A data hazard occurs when an instruction depends on the result of a prior
instruction still in the pipeline - ANSWERWhat is a data hazard?
Temporal locality refers to the reuse of specific data, and/or resources, within
a short time. - ANSWERWhat is temporal locality?
Spatial locality refers to the use of data elements within relatively close
storage locations. - ANSWERWhat is spatial locality?
More comparators and an output multiplexer are needed - ANSWERWhy is an
associative cache slower than a direct mapped cache?
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Advance computer architecture Question Answers, and more Exams Computer Science in PDF only on Docsity!

Advance computer architecture Question Answers, Exams of Advanced Computer Architecture 2026 Structural, data and control - ANSWERName the three different types of hazards A structural hazard occurs when two (or more) instructions that are already in pipeline need the same resource - ANSWERWhat is a structural hazard? A control hazard occurs when deciding on control action depends on previous instruction - ANSWERWhat is a control hazard? A data hazard occurs when an instruction depends on the result of a prior instruction still in the pipeline - ANSWERWhat is a data hazard? Temporal locality refers to the reuse of specific data, and/or resources, within a short time. - ANSWERWhat is temporal locality? Spatial locality refers to the use of data elements within relatively close storage locations. - ANSWERWhat is spatial locality? More comparators and an output multiplexer are needed - ANSWERWhy is an associative cache slower than a direct mapped cache?

Because the slowest pipeline stage determines the maximum speed of the whole pipeline, and main memory is very slow - ANSWERWhy are caches needed in a pipelined architecture? Compulsory, Capacity and Conflict - ANSWERName the three types of cache misses AMAT = HitTime + MissRate * MissPenalty - ANSWERGive an expression for the Average Memory Access Time of a cache

  1. Larger block size
  2. Higher associativity
  3. Use a victim buffer
  4. Hardware prefetching
  5. Use a skewed associative cache - ANSWERName (five) ways to reduce the cache miss rate in hardware Compulsory - ANSWERWhich of the cache miss types does a larger block size reduce? Conflict - ANSWERWhich of the cache miss types does higher associativity reduce? Conflict - ANSWERWhich of the cache miss types does a victim buffer reduce?

Loop fusion, Blocking/tiling - ANSWERGive two examples of Iteration Space Optimisations to reduce cache misses Write-through and write-back - ANSWERName two distinct cache write strategies

  • Avoids needing to write on a read miss
  • Simpler architecture than write-back
  • Simplifies cache coherency
  • No need for dirty bit - ANSWERName two advantages of using a write- through cache Write-through caches eliminate the need for a "Dirty" states, since the copy in the next-level cache is always up-to-date with the current copy, unless it has been invalidated - ANSWERWhy does a write-through cache simplify the maintenance of cache coherency? Write-allocate reads the written line into the cache when a write miss occurs, non-write-allocate doesn't - ANSWERWhat's the difference between write- allocate and non-write-allocate?
  • Reduces memory traffic to next-level cache
  • Better tolerance to high-latency memory - ANSWERName an advantage of using a write-back cache
  1. Read Priority Over Write on Miss
  1. Early Restart
  2. Critical Word First
  3. Add a second-level cache - ANSWERName 4 ways of reducing the cache miss penalty This optimisation allows reads to read from main memory before the write buffer has been emptied (as long as no conflicts occur) - ANSWERWhat does "Read Priority Over Write on Miss" mean?
  4. Virtually indexed, virtually tagged
  5. Virtually indexed, physically tagged - ANSWERName two approaches to avoid translating addresses when accessing a cache, in order to reduce hit time
  • The possibility of synonym and homonym virtual addresses - ANSWERWhat is the issue with a VIVT cache design?
  1. Pipeline cache access
  2. Parallel access (separate cache into banks)
  3. Use a non-blocking cache - ANSWERName three ways to increase cache bandwidth Simple, wide and interleaved - ANSWERName the three different kinds of memory hierarchies Simple => CPU, bus, cache and memory all have same width Wide => Cache, bus and memory are wider than the CPU

Register renaming - ANSWERHow can name and output dependences often be solved in hardware? Functional units broadcast their result on the CDB when finished, so that reservation stations that depend upon their result can receive it - ANSWERWhat is the CDB in Tomasulo's algorithm? The tag of the functional unit which will produce the value - ANSWERIn Tomasulo's algorithm, what is stored in the reservation station's operand fields if the values are not yet ready?

  • Complexity
  • CDB bottleneck
  • Non-precise interrupts - ANSWERName three drawbacks of Tomasulo's algorithm By adding a commit stage, to perform operations which are necessarily ordered - ANSWERHow is the non-precise interrupt problem of Tomasulo fixed in modern architectures? At the issue stage - ANSWERWhen is an entry added to a ROB?
  1. Writes results to commit-side registers (?)
  2. Releases stores from the LSQ - ANSWERWhat happens to an instruction at the commit stage when a ROB is used?

A Register Update Unit is a circular buffer that acts as both a ROB and as reservation stations for the functional units. - ANSWERWhat is a Register Update Unit?

  1. Increased pipeline depth
  2. Increased area + power consumption
  3. Complexity
  4. Harder to predict program performance - ANSWERName 3 drawbacks of dynamic scheduling WAR - ANSWERWhich kind of hazard is caused by a name dependency? WAW - ANSWERWhich kind of hazard is caused by an output dependency? RAW - ANSWERWhich kind of hazard is caused by a data dependency? To mitigate control hazards - ANSWERWhy is branch prediction important?
  5. Branch Delay Slots
  6. Predication
  7. Run enough threads that control stalls don't matter - ANSWERName two ways to avoid branch prediction?
  • Can avoid costly branches for small sections of code
  • Avoids misprediction penalty
  • Complicates hardware

Instead of using an indirect branch, overwrite the current return address with the target and use a "return". This will use the RAS to make a prediction. - ANSWERHow does a retpoline work? In critical places where speculation should be restricted to avoid side- channels - ANSWERWhen should retpolines be used? Software pipelining can be used to optimize loops by removing dependencies. It is similar to dynamic scheduling, except it is done statically by the compiler instead of dynamically by the processor. - ANSWERWhat is software pipelining? Usually, the loop is unrolled multiple times first. Potential places for pipelining are then identified. - ANSWERHow is software pipelining performed? Very Long Instruction Word - an instruction codes for multiple separate sub- operations - ANSWERWhat is VLIW? Instructions which are independent can be coded for by the same VLIW instruction. This means we can compress unrolled loops into very few instructions. - ANSWERHow can VLIW be used in combination with software pipelining? Trace scheduling is a way to identify commonly taken paths in a program, so they can be compressed into VLIW instructions. - ANSWERWhat is trace scheduling?

  1. Selection (statically or by profiling)
  1. Compression - ANSWERWhat are the two stages of trace scheduling? Fixup code is generated to handle these cases - ANSWERWhat if a VLIW program doesn't take the path identified by the trace scheduler?
  • Larger window of operations can be examined to find ILP
  • Reduced hardware cost, power consumption, etc etc
  • Elaborate speculation is easier, based on large-scale program patterns - ANSWERGive 3 advantages of VLIW over dynamic scheduling
  • No need for fixup code in case trace scheduling goes wrong
  • Easier to disambiguate memory addresses at runtime
  • Branch prediction is better
  • Precise exception model
  • Software portability - ANSWERGive 3 advantages of dynamic scheduling over VLIW EPIC exposes parallelism while maintaining binary compatibility - ANSWERWhat's the difference between VLIW and EPIC? Instructions are grouped. Instructions in the same group can be executed in parallel. - ANSWERWhat is a group in EPIC? A template specifies which group each of the individual components of the EPIC instruction are part of - ANSWERWhat is a template in an EPIC instruction?

SMT refers to executing multiple threads in the same cycle on a processor - ANSWERWhat is SMT? Amount of registers - ANSWERWhat limits the number of threads when using SMT?

  1. Resource contention
  2. Scheduling
  3. Side-channels (?) - ANSWERName 3 issues with SMT
  4. More register maps (one for each thread)
  5. Ability to fetch from multiple locations in one cycle
  6. More registers (probably) - ANSWERWhat needs to be added to a non-SMT dynamically scheduled OoO processor to support SMT? SIMD - ANSWERDoes vectorization refer to SIMD or SIMT?
  7. Array size not nice (can be fixed with loop peeling)
  8. Memory allignment (can be fixed with special malloc)
  9. Bad access patterns
  10. Branch divergence - ANSWERName 4 issues with vectorization Either:
  • The implementation uses n-wide ALUs to execute n-wide vector instructions
  • The implementation uses uop-decomposition
  • The implementation uses vector pipelining - ANSWERHow is a vector instruction actually executed? Because there are so many threads waiting with useful work to do at all times
  • ANSWERWhy might GPUs not need speculation? By running many threads to fill cycles lost to memory latency - ANSWERHow do GPUs hide memory latency A GPU has much smaller control units and caches, and has many more functional units - ANSWERCompare the components of a CPU with those of a GPU In SIMD, each thread may include vector instructions. In SIMT, there is one thread per lane of each vector instruction. - ANSWERWhat's the difference between SIMD and SIMT? SIMD: Make sure adjacent iterations access adjacent data SIMT: Make sure adjacent threads access adjacent data - ANSWERWhen considering spatial locality, what approaches should a programmer take in SIMD and SIMT to improve performance? SIMD: Hope that the processor predicts the branches well... SIMT: Make sure that adjacent threads in warp branch the same way - ANSWERWhen considering control locality, what approaches should a programmer take in SIMD and SIMT to improve performance?

The other core will detect the core's request by snooping, and then will send over the requested data. That other core will change its copy's state to shared-dirty. - ANSWERHow does a core get data on a cache miss when the cache is dirty in another core's private cache? The bus and CPU will contend against each other to check the tags of cache entries - ANSWERName an issue with snooping-based cache coherency protocols

  1. Duplicate tags to allow parallel access to bus and CPU at same time
  2. If MLI is used, we can "filter" invalidations using the L2 cache. If the L2 tag doesn't match, don't bother checking L1. - ANSWERName 2 solutions to the bus being a bottleneck in snooping-based cache coherency protocols
  3. Atomic exchange
  4. Test-and-set
  5. Fetch-and-increment - ANSWERName three ways to fetch/update memory atomically Using load-linked and store-conditional. - ANSWERName a way that atomic memory fetches/updates can be implemented Try to read first, to avoid spamming invalidations for the lock. If the read succeeds, then try to atomically exchange. - ANSWERIn spinlocks, what should be done before an atomic exchange is performed on the lock, in order to improve performance?

Weak memory model is faster in many cases, and usually doesn't cause issues in explicitly synchronized programs - ANSWERCompare the sequential and weak memory models There is a centralized directory that tracks the location of each cache line. This approach can be extended to distributed memory (where snooping no longer works) - in that case, each cache will have its own directory. This solves the issue of the bus being a bottleneck. - ANSWERWhat is a directory-based cache coherency protocol?