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
29 changes: 29 additions & 0 deletions W11D1/w11d1note_jiangruohong.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Out-of-order Execution
### History
1960s: Vector(or Array) vs Superscalar vs Pipeline+OoO
Scoreboarding(Thorton 1964) vs Tomasulo(IBM 1965)
### How to WAR/WAW
~~Scoreboarding~~
RAW: distance: forwarding/code movement

WAW/WAR(pseudo): renaming(tomasulo)
**Reservation Station**
- Op: operation in the unit
- Vj, Vk: Value of source operands
- Qj,Qk: id of reservation stations producing source registers (0 means value is ready)

### Challenges
- branch
- exception
- process context switching(multiprocess OS)

### Precise Interrupt
Tomasulo: In-order issue, out-of-order execution, and out-of-order completion
"fix" the out-of-order completion

Reorder Buffer(ROB): all instructions commit in order
- Use ROB number instead of RS when execution completes
- supplies operands between execution complete & commit
- inst commit, when inst commits, put result into register

easy to undo speculated inst/mispredicted branches/exceptions
24 changes: 24 additions & 0 deletions W14D2/w14d2note_jiangruohong.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
RAID 5

Small writes (write to one disk):
- Option 1: read other data disks, create new sum and write to Parity
Disk
- Option 2: since P has old sum, compare old data to new data, add
the difference to P
• Small writes are limited by Parity Disk: Write to D0, D5 both also write to P disk

![](w14d2note_jiangruohong_pic1.png)

### Hamming code
use $\log_2n$ extra parity bits
possible to find out wrong bit if one of the data bits flipped

(7,4) Hamming code
![](w14d2note_jiangruohong_pic2.png)

```
bit 001 010 011 100 101 110 111
p1 p2 d1 p3 d2 d3 d4
```

XOR sum in every circle should be 0.
Binary file added W14D2/w14d2note_jiangruohong_pic1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added W14D2/w14d2note_jiangruohong_pic2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.