Title: MigThread : Heterogeneous Thread Migration
1MigThread Heterogeneous Thread Migration
- Parallel and Distributed Computing Laboratory
- Department of Electrical and Computer Engineering
- Wayne State University, Detroit MI 48202
2Idle Cycle Utilization on NOWs
- Research results from University of Maryland
- Equivalent Parallel Machine (EPM) computed by
determining the size of the parallel machine that
would be required to complete the execution in
the same time
College Park (39)
Berkeley (52)
Wisconsin (277) EPM 29 (74)
EPM 25 (48)
EPM 91 (33)
Research indicated A large fraction of
workstations on NOWs are unused for a large
fraction of time
3How to Harness Idle Cycles
- Process Migration basic migration scheme
- All-or-Nothing scenario the whole job occupies
or evicts from computer completely - Cannot handle parallel jobs well
- Such as Condor, DQS, CODINE, LSF
- One alternative In-Between scenario
- Foreign jobs do not evict completely right away
- Stay longer with lower priority to steal
fine-grained idle cycles - Such as Linger-Longer
- Thread Migration real In-Between
- Split computation into smaller units threads
- Migrate threads instead of the whole process
- Such as MigThread
Migrate all together, or, stay all together
Migrate all together, or, stay with low priority
Migrate individually, or, stay individually
Threads
Process
4Implementation Styles
- Kernel-Level Migration Approaches
- Rely on distributed OS or network OS
- Good transparency and flexibility, high
complexity - MOSIX, Sprite
- User-Level Migration Approaches
- Libraries linked to applications at compile time
- Good transparency, less powerful
- Condor, Ariadne
- Application-Level Migration Approaches
- Parts of applications
- Good portability, less transparency
- Tui, Arachne
Application
Library
Kernel
5How to Migrate Threads
- Pause computation
- Migrate the state of threads (from libraries or
kernels) - Pack, transfer, unpack, and restore thread state
(process, computation, communication) - Resume computation
migration
Threads
Threads
6Adaptation Point
- Adaptation points possible migration points
- Too close need to avoid migration overhead
- Too far away insensitive to environments
- Sequential consistency model DSM
- Systems are in consistent state all the time
- Migration can take place at any time
- Relaxed consistency model DSM
- Systems are in consistent state only at
synchronization points (barriers) - Strings uses release consistency model
- Require pseudo-barriers (synchronize only
progress, not the data)
7Heterogeneous Thread Migration (HTM)
Designed and implemented in PDCL
- Abstract thread state up to language level
- Source-to-source translation
- No restriction on sizes of stacks and heap
(user-level management) - Virtually unlimited threads
- Support different Operating Systems
- All UNIX variants Linux, Solaris,
- Accept new OS in plug-and-play fashion (no
setup required)
- Support different Operating Systems
- All UNIX variants Linux, Solaris,
- Accept new OS in plug-and-play fashion (no
setup required)
- Support different Operating Systems
- All UNIX variants Linux, Solaris,
- Accept new OS in plug-and-play fashion (no
setup required) - Apply one-time receiver-makes-right instead of
costly XDR (External Data Representation)
- Pointer casting
- Casting to/from integral types, such as integer,
long
- Pointer casting
- Casting to/from integral types, such as integer,
long
- Pointer casting
- Casting to/from integral types, such as integer,
long - Pointers in Union type
- Pointer detection
- Pointer casting
- Casting to/from integral types, such as integer,
long - Pointers in Union type
- Pointer detection
- Library calls
- Warning for possible memory leakage
- Pointer casting
- Casting to/from integral types, such as integer,
long - Pointers in Union type
- Pointer detection
- Library calls
- Warning for possible memory leakage
- State-carrying instructions
- Break down into serials of stateless or
re-entrant sub-instructions
- Application-level Migration
- Application-level Migration
- Pointers in Union type
- Pointer detection
- Apply one-time receiver-makes-right instead of
costly XDR (External Data Representation)
- Library calls
- Warning for possible memory leakage
- Portability
- (Heterogeneity)
- Portability
- (Heterogeneity)
- Translation on the fly
- Different byte orders
- Different data sizes and alignments
- Different address spaces
- Pointer translation
- Warning for incompatible migration
- State-carrying instructions
- Break down into serials of stateless or
re-entrant sub-instructions
- Applicability
- (Migration Safety)
- Apply one-time receiver-makes-right instead of
costly XDR (External Data Representation)
More programs become qualified for thread
migration.
8Layout of MigThread
- MigThread consists of
- Preprocessor at compile time
- Runtime support module
- Preprocessor
- Input compiled C/C code
- Output Augmented C/C code ready for
recompilation with common C/C compilers - Runtime support module
- Linked as a library
- Exchange information with the augmented code at
runtime - User-level management of stack and memory
Compiled C/C code
MigThreads Preprocessor
Augmented C/C code
MigThreads Runtime Support Module
Workstation Pools
9MigThread Package
- Working platforms All UNIX variants
- Website http//www.pdcl.eng.wayne.edu
- Team
- Prof. Vipin Chaudhary and Hai Jiang
- Sponsors Sun Microsystems and National Science
Foundation (NSF)