Previous allocators unsuitable for multithreaded apps
Serialized heap
Protected by lock
Allocator-induced false sharing
Poor space bounds: blowup
O(P), O(T), or unbounded increase in memory
processor 0 processor 1 = in use , processor 0 = free , on heap 1 Key: free(x1) x2= malloc(1) free(x2) x1= malloc(1) x3= malloc(1) free(x3) “ pure private heaps” (STL, Cilk, others)
Hoard Memory Allocator
Hoard
Scalable heap
Provably low synch overhead
Optimal space consumption: blowup = O(1)
Avoids false sharing
www.hoard.org
40,000+ downloads
AOL, BT, Philips, Credit Suisse, Novell, etc.
The Cores Have Arrived
Hurray! Now what?
Multithreading problems:
Data races
Deadlock & livelock
Scalability bottlenecks
Automatic Parallelization?
Exploit Multicores Now!
Taking advantage of multicores without rewriting a line of code :
Build scalable applications from parts
Flux: “glue” language for easily building highly-concurrent servers [USENIX 06]
Increase reliability
DieHard: lets C/C++ programs run correctly in face of memory errors with high probability [PLDI 06]
Flux A Language for Programming High-Performance Servers joint work with Brendan Burns, Kevin Grimaldi, Alex Kostadinov, Mark Corner University of Massachusetts Amherst
Motivating Example: Image Server
Client
Requests image @ desired quality, size
Server
Images: RAW
Compresses to JPG
Caches requests
Sends to client
http://server/Easter-bunny/ 200x100/75 not found client image server
Problem: Concurrency
Could write sequential code but…
More clients (latency)
Bigger server
Multicores , multiprocessors
One approach: threads
Risk deadlock, etc.
Mixes program logic & concurrency control – ties to runtime (threads?!)
Multiple core CPUs are here. Conventional wisdom ho more
Multiple core CPUs are here. Conventional wisdom holds that, to take best advantage of these processors, we now need to rewrite sequential applications to make them multithreaded. Because of the difficulty of programming correct and efficient multithreaded applications (e.g., race conditions, deadlocks, and scalability bottlenecks), this is a major challenge.
This talk presents two alternative approaches that bring the power of multiple cores to today's software. The first approach focuses on building highly-concurrent client-server applications from legacy code. I present a system called Flux that allows users to take unmodified off-the-shelf *sequential* C and C++ code and build concurrent applications. The Flux compiler combines the Flux program and the sequential code to generate a deadlock-free, high-concurrency server. Flux also generates discrete event simulators that accurately predict actual server performance under load. While the Flux language was initially targeted at servers, we have found it to be a useful abstraction for sensor networks, and I will briefly talk about our use of an energy-aware variant of Flux in a deployment on the backs of endangered turtles. The second approach uses the extra processing power of multicore CPUs to make legacy C/C++ applications more reliable. I present a system called DieHard that uses randomization and replication to transparently harden programs against a wide range of errors, including buffer overflows and dangling pointers. Instead of crashing or running amok, DieHard lets programs continue to run correctly in the face of memory errors with high probability. This is joint work with Brendan Burns, Kevin Grimaldi, Alex Kostadinov, Jacob Sorber, and Mark Corner (University of Massachusetts Amherst), and Ben Zorn (Microsoft Research). less
1 comments
Comments 1 - 1 of 1 previous next Post a comment