COMPUTER ARCH INTERVIEW QUESTIONS

1. Memory Hierarchy 

register --> cache(normally integrated in CPU) --> memory(DRAM) --> disk --> tape

2. cache hit: Data found in cache

    cache miss: not found in cache, Processor  loads data from memory. This result in extra delay, called miss penalty 

3. Cache placement policies:

  • Direct mapped cache fill
  • 2-way associative cache
  • fully associative cache:  Every mom block can go any slot, need LRU replacement policy when caceh is full. Fewest conflict misses for a given cache capacity, but they require more hardware for additional tag comparisons. They are best suited to relatively small caches because of the large number of comparators.

                Each cache slot holds block data, tag, valid bit, and dirty bit(dirty bit is only for write-back)

4. LRU cache

5. Cache coherence

AMD uses MOESI, Intel core i7 uses MESIF

MOESI

Benefits: MOESI allows sending dirty cache lines directly between caches instead of writing back to a shared outer cache and then reading from there. The linked wiki article has a bit more detail, but it's basically about sharing dirty data. The Owned state keeps track of which cache is responsible for writing back dirty the data.

MESIF allows caches to Forward a copy of a clean cache line to another cache, instead of other caches having to re-read it from memory to get another Shared copy.

MOESI VS MESI: MOESI is almost always superior to MESI in terms of absolute performance. However, MESI only requires 2 bits per cache line to hold the state, while MOESI requires 3 bits per cache line. MOESI might be too expensive for low-energy/low-performance/small processors.

6. Dynamic scheduling of instructions

  • ScoreBoarding: solves RAW hazard. 
  • Tomasulo: 

Renaming of registers • Avoids WAW and WAR hazards

Tomasulo’s algorithm is a computer architecture hardware algorithm for dynamic scheduling of instructions that allows out-of-order execution and enables more efficient use of multiple execution units.

Reservation station(RS) registers holds the value of 2 target and the op and the tag that gonna stores in the register file.

With re-order buffer:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值