Smarter Compilation: A Step Towards Automated Distribution Nickolas J. G. Falkner and Michael J. Oudshoorn Department of Computer Science The University of Adelaide South Australia 5005 AUSTRALIA {jnick,michael}@cs.adelaide.edu.au Abstract: Key decisions in any efficient distribution scheme include both the granularity of the distribution and the allocation of distributed processes to available processing resources. Metrics may be established for an automated distribution system that permit these distribution decisions to be made based on a range of increasingly complex, and more accurate, estimators based on the computational complexity of the source program and heuristic rules. A ‘smart compilation’ system, in this context, is introduced as a system where these metrics are combined with an integrated distribution management scheme to provide a viable distribution mechanism for source programs that have not been explicitly targeted for distributed systems. A simple example of such a system is given and its conformity to, and diversion from, the stated model, is discussed. 1. Introduction The following key questions must be considered when dealing with any system for the distribution of computation within a multi-processing node environment [1,2,5]: • What is the smallest unit of the code that may be distributed as a separate entity to the processing nodes in the distributed processing environment? • How are individual computing tasks within the distributed program allocated to nodes within the distributed system? One of the major difficulties in achieving efficient distribution is finding a set of acceptable answers to the questions above. If a distributed program is distributed by excessively finely- grained components then the communication costs between nodes, due to the requirements of both transferring the code to the node and intercommunication between code fragments of distinct nodes, become the dominant costs and performance suffers accordingly. If the distributed program is appropriately fragmented but the assignment of these fragments to processing nodes is arbitrary or unwise then performance may also suffer. This is due mostly to the allocation of large computing tasks to nodes that are either physically incapable of performing such tasks quickly or have already received a large quanta of the distributed processes. A system of metrics may be used for distributed systems in order to make efficient and non- arbitrary decisions regarding granularity and task allocation. These metrics may be used by a programmer when writing a distributed program although the system of metrics may not have been formally defined. Consider the situation where tasks are allocated to nodes based on a formal task structure, such as that advocated by Ada95 [6]. The granularity of the distribution may be based on the task entity and the programmer may choose to assign the most complex