A Static Characterization of Af?nity in a Distributed Program
Shivali Agarwal, Rajkishore Barik, Rudrapatna K. Shyamasundar · 2008
The performance of parallel programs can be largely affected by the latency of remote memory references. The notion of affinity has been used extensively for scheduling programmer defined threads to reduce remote communication costs. The most popular approach has been to schedule the thread as close to the data as possible. Most of the existing techniques expect the programmer to annotate affinity related information used by the scheduler. In this paper, we propose a framework that qualifies and quantifies various possible affinities playing a role in memory access latency in a system comprising of threads, processor nodes and data objects. We propose a technique based on cost functions to arrive at affinity information that can be used for reducing latencies. The affinity information thus obtained can be used in a number of ways such as: (1) transform the user program automatically (i.e., oblivious to the programmer); (2) highlight the user code in the integrated development toolkit used by the programmer; and (3) provide annotations that can be understood by the scheduler in making dynamic decisions of allocating objects and assigning threads to nodes. We support our framework and algorithm with the case studies/experiments done so far.