diff --git a/W11D1/w11d1note_jiangruohong.md b/W11D1/w11d1note_jiangruohong.md new file mode 100644 index 0000000..97400d4 --- /dev/null +++ b/W11D1/w11d1note_jiangruohong.md @@ -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 \ No newline at end of file diff --git a/W14D2/w14d2note_jiangruohong.md b/W14D2/w14d2note_jiangruohong.md new file mode 100644 index 0000000..55e4ed7 --- /dev/null +++ b/W14D2/w14d2note_jiangruohong.md @@ -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. \ No newline at end of file diff --git a/W14D2/w14d2note_jiangruohong_pic1.png b/W14D2/w14d2note_jiangruohong_pic1.png new file mode 100644 index 0000000..520225f Binary files /dev/null and b/W14D2/w14d2note_jiangruohong_pic1.png differ diff --git a/W14D2/w14d2note_jiangruohong_pic2.png b/W14D2/w14d2note_jiangruohong_pic2.png new file mode 100644 index 0000000..7e48ebb Binary files /dev/null and b/W14D2/w14d2note_jiangruohong_pic2.png differ