Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions W13D2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Spooying 拓展

## MESI Protocol

将MSI中的Shared分为Exclusive(只有自己有copy)和Shared(多个有copy)。

### 优势

Exclusive状态的数据被写时,自己变为Modified,不用广播将其他的置为Invalid。



miss之后,从memory读取数据,之后应该进入Exclusive还是Shared?



## Berkeley Protocal

添加Owned状态:拥有被共享的数据的一份copy,且拥有对这份数据的唯一更改权。



原先,如果一个结点发read miss,会发出一个向memory要数据的请求。如果有一份Exclusive的copy在某个结点里面,这个结点会中断这个访存请求,然后把数据给它,自己变成Shared。如果有多份Shared的copy,无法决定由谁来提供数据(地位平等,都发数据会冲突),不能中断访存由这些结点来提供数据。

使用Owned状态后,这个Shared的数据会由Owned状态的提供。

而且,可以在Owned状态的数据被写后,发广播让其他Shared的将copy改掉(dirty sharing)。





# 复习

principal of performance

## parallelism

pipeline

- 拆成N阶段,加速情况
- 如果出现中间某个阶段需要的时间节拍特别长
1. 将这一阶段进一步拆分(可能存在不好拆的问题)
2. 将这一阶段并发(superscalar)。例:tomasulo

- hazard

- structural

元件复制。例:icache+dcache

- data

- true:RAW

拉距离

减短距离:forwarding

- pseudo:WAW、WAR

renaming:tomasulo

- control



## locality

cache
Binary file added W5D1note.pdf
Binary file not shown.
Binary file added W9D2note.pdf
Binary file not shown.