Sangman Kim, Michael Z. Lee, Alan M. Dunn, Owen S. Hofmann, Xuan Wang, Emmett Witchel, Donald E. Porter
1
Owen S. Hofmann, Xuan Wang, Emmett Witchel, Donald E. Porter 1 - - PowerPoint PPT Presentation
Sangman Kim , Michael Z. Lee, Alan M. Dunn, Owen S. Hofmann, Xuan Wang, Emmett Witchel, Donald E. Porter 1 Fine-grained locking - Bug-prone, hard to maintain Parallelism - OS provides poor support Coarse-grained locking - Reduced
1
2
3
System Transaction
[Porter et al., SOSP 2009]
4
TxOS system calls Middleware state sharing
[Porter et al., SOSP 2009]
5
TxOS system calls Synchronization primitives Middleware state sharing
[Porter et al., SOSP 2009]
6
TxOS system calls
Synchronization primitives Middleware state sharing
7
8
9
inode header
inum lock … inode data size mode … Copy of inode data
10
11
12
13
14
From MAILER-DAEMON Wed Apr 11 09:32:28 2012 From: Sangman Kim <sangmank@cs.utexas.edu> To: EuroSys 2012 audience Subject: mbox needs file lock. Maildir hides message. ….. From MAILER-DAEMON Wed Apr 11 09:34:51 2012 From: Sangman Kim <sangmank@cs.utexas.edu> To: EuroSys 2012 audience Subject: System transactions good, file locks bad! ….
Maildir/cur 00000000.00201.host:2,T 00001000.00305.host:2,R 00002000.02619.host:2,T 00010000.08919.host:2,S 00015000.10019.host:2,S Trashed Replied Trashed Seen Seen
15
if (access(“043:2,S”)): rename(“043:2,S”, “043:2,R”)
while (f = readdir(“Maildir/cur”)): print f.name
16
018:2,S 021:2,S 052:2,S 061:2,S
Seen
“Maildir/cur” directory
Seen
043:2,S
Seen Seen Seen
043:2,R
Replied
if (access(“043:2,S”)): rename(“043:2,S”, “043:2,R”)
while (f = readdir(“Maildir/cur”)): print f.name
17
018:2,S 021:2,S 052:2,S 061:2,S
Seen
“Maildir/cur” directory
Seen
043:2,S
Seen Seen Seen Process 1 Result 018:2,S 021:2,S 052:2,S 061:2,S
Message missing!
18
PROCESS 2 (MESSAGE LISTING)
19
20
21
In Transaction xbegin(); p1 = malloc(); xabort(); p2 = malloc(); *p2 = 1;
22
Middleware (libc) Kernel mmap() Heap Transactional object for heap p1
In Transaction xbegin(); p1 = malloc(); xabort(); p2 = malloc(); *p2 = 1;
23
Middleware (libc) Kernel Transactional object for heap Heap
p1 p2
User changes system state
System state changed as
Middleware state shared
24
25
(garbage collection)
26
27
28
29
30
500 1000 1500 2000 2500 3000 3500 4000 10 20 30 40 50 60 70 80 90 100 TxOS, dense Linux,dense TxOS,sparse Linux,sparse Throughput (req/s) Dense graph: 88% tput Sparse graph: 11% tput Work to add/delete edges small compared to scheduling overhead
31
Write ratio (%) BFT graph server
32
10 20 30 40 50 60 70 80 90
33
34