Can TM help in addressing the “ Multicore Software Scaling Problem? ” Microsoft TM Panel July 2007 Nir Shavit Tel Aviv University
Amdahl’s Law: Speedup = 1/(ParallelPart/N + SequentialPart) Pay for N = 8 cores SequentialPart = 25% Speedup = only 2.9 times! Must parallelize applications on a very fine grain! How do we make use of multicores?
Need Fine-Grained Locking 75% Unshared 25% Shared cc cc cc cc Coarse Grained c c c c c c c c cc cc cc cc Fine Grained c c c c c c c c The reason we get only 2.9 speedup 75% Unshared 25% Shared
Traditional Scaling Process User code Traditional Uniprocessor Speedup 1.8x 7x 3.6x Moore’s law c C C
Ideal Multicore Scaling Process cc cc cc cc cc cc cc User code Multicore Speedup 1.8x7x3.6x Only Wishful Thinking!
Lock-based Code Doesn ’ t Scale cc cc cc cc cc cc cc1.8x 2x 2.9x User code Multicore Speedup Vendors must rewrite code for each machine
Lock-based Code Doesn ’ t Scale olocks are an even bigger problem then we think oScalability today: oCode stays the same, CPUs get faster oSimple model for vendors oScalability tomorrow oLock-based synch code must be rewritten as number of cores increases oHigh costs for vendors
Is TM part of the answer oCan transactions help maintaining the traditional scaling process? oAt least smooth out the transition points … oWrite code once using transactions (short transactions?) oHave TM tuned for each machine oSo no need rewrite software oLike a VM for synchronization … oKey point: transactions are the abstraction that is missing …
Can TM Make Scaling Smoother? cc cc cc cc cc cc cc User code TM code Multicore Speedup 1.8x7x3.6x
Questions to ponder … oWhat needs to be added to the TM designs to make transactional code be “ machine independent? ” oWhat needs to be added to compilers? Languages?