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
26 changes: 26 additions & 0 deletions jiangruohong_notes/W12D2/W12D2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
### Distributed Shared Memory

#### DHT/Chord

Files are stored on distributed systems.

$Hash(IP)$ is node's id.

Suppose $suc_i$ is the next available node from $i$.

Finger Table: maintain $suc_{u+2^i}$ for every node $u$. Time complexity lowered to $O(\log n)$.

File is hashed to a number $x$, and is stored in several successors after $x$. Any machine can quickly get $suc_x$ and ask the machine for the file.

Some machines may go offline. Every machine's finger table is self-maintained.

When a machine enter the system, notify other machines to update finger table.

#### Distributed Systems
Chip: SoC (System on Chip)

Board: SMP (Symmetric Pultiprocessing)

LAN: Cluster

Internet: Grid $\to$ Cloud
36 changes: 36 additions & 0 deletions jiangruohong_notes/W4D2/W4D2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
### Memory Management

Reallocation, Swapping, Overlay, Replacement

#### Swapping
Memory <- exchange processes -> disk storage

#### Virtual Memory & Paging

Consider a part of disk as extension of memory

#### Page replacement algorithms

Optimal algorithm is based on the future

- NRU (not recently used) algorithm

Referenced bit and Modified bit

- FIFO algorithm
- Second-chance algorithm
- Clock algorithm
- LRU (least recently used) algorithm
- Working set algorithm

#### Physical Memory Management
Buddy System (UNIX)

Maintain lists of blocks of $2^i$ size.

Breaks large blocks into 2 smaller blocks when allocating.

Merge requirements:
- same size
- next to each other
- after merging into a $2^{i+1}$ size block, the beginning of block should be a multple of $2^{i+1}$
17 changes: 17 additions & 0 deletions jiangruohong_notes/W8D2/W8D2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### Security

#### Buffer Overflow Attacks

The attack is able to bypass the canary and modify the return address directly.

![](p1.png)

#### Code Reuse Attacks

![](p2.png)

#### Format String Attacks

If not enough args provided, compiler will reserve space for these args. These can be used to either leak information or modify registers.

![](p3.png)
Binary file added jiangruohong_notes/W8D2/p1.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 jiangruohong_notes/W8D2/p2.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 jiangruohong_notes/W8D2/p3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.