210 likes | 340 Views
An Efficient Lock Protocol for Home-based Lazy Release Consistency. Electronics and Telecommunications Research Institute (ETRI) 2001/5/16 HeeChul Yun. Contents. Introduction Motivation Our Approach Performance Evaluation Conclusion. Proc1. Proc2. Proc3. ProcN. Introduction (1/2).
E N D
An Efficient Lock Protocol for Home-based Lazy Release Consistency Electronics and Telecommunications Research Institute (ETRI) 2001/5/16 HeeChul Yun
Contents • Introduction • Motivation • Our Approach • Performance Evaluation • Conclusion
Proc1 Proc2 Proc3 ProcN Introduction (1/2) • SVM(Shared Virtual Memory) • Page based software DSM • Cost effective but performance is limited Mem1 Mem2 Mem3 MemN Network Shared memory abstraction
Introduction (2/2) • Lazy Release Consistency (LRC) • Most popular • Allow multiple writer for a page using diff mechanism • Home-based LRC (HLRC) • Home is assigned for each page
HLRC (1/2) P0 P1 P0 P1 P2(home) Acq(L) Acq(L) W(X) make twin W(X) make twin Rel(L) Rel(L) Acq(L) create diff create diff Acq(L) apply diff Invalidate Invalidate R(X) R(X) fetch diff fetch page LRC HLRC
HLRC (2/2) • Advantage • No diff creation at Home • Short lifetime of diff (low memory overhead) • Problems • Home assignment is important for performance • Fetching a whole page on page fault Poor lock performance
Motivation (1/2) • Characteristics of lock protected data • Migratory pattern • Modification is small (fine grained) • Poor lock performance of HLRC • Proper fixed home assignment is difficult • Migration schemes are not effective • Fetching a whole page for small modification
Motivation (2/2) P2(home) P0 P1 Acq(L) W(X) Rel(L) Apply diff Acq(L) Invalidate R(X) 4KB Fetch page X(4byte)
Our Approach (1/5) • Update small lock protected data • Removing page fetching overhead • Selectively piggyback diffs in lock grant message • Diff selection metric • Acquirer’s access history inside critical section • Diff granularity
P0 P1 P2(home) P0 P1 P2(home) Acq(L) Acq(L) W(a) W(a) create diff create diff Rel(L) Rel(L) apply diff apply diff Acq(L) Acq(L) send diff apply diff R(a) R(a) fetch page HLRC Ours Our Approach (2/5) Page X a
Our Approach (3/5) P0 P1 • Hint • Access history • Filter • Only select small diff • Apply Diff • Lazy until fault occurs W(a) W(b) Hint (X, Y) Rel(L) Acq(L) ACQ(X,Y) Filter Y Diff(X0) Apply Diff(a) Page X Page Y R(a) b Fetch page(Y) a R(b)
Our Approach (4/5) • Goodness • No additional messages • Lower message amount • diff size < page size • Avoid page requests inside critical section • Small diff application is much faster than remote page fetching • Minimize lock serialization
Our Approach (5/5) • Overhead • Home page diff creation • Only for hinted page • Stop if size is bigger than threshold • Memory overhead for maintaining diffs • Only for hinted page • Simply free old diffs at some interval • do not affect correctness small overhead
Performance Evaluation • Platform • 8 node PIII 500Mhz Linux cluster • 100Mbps switched Ethernet • Implementation • KDSM (KAIST Distributed Shared Memory) • Base HLRC • KDSM + Ours • Application • From SPLASH2 • TSP, Water, Raytrace(o), Raytrace(r), IS
Conclusion • Lock is inefficient in HLRC • Home is at fixed location • Whole page must be fetched on page fault • Our Protocol • Removing page fetching overhead for small data • Improve lock performance with negligible overhead
Diff Creation Twin: Encode Changes Diff Create Twin X: X: X: Release Write(x)