Parallel and Distributed Compilations in Loosely-Coupled Systems: A Case Study

One application of large-grain parallelism is the use of parallel and distributed compilations by make , running under UNIX.† The original version of make executes its compilation commands successively. An increase in efficiency may be achieved by a parallel version of make , which tries to execute the compilations simultaneously. A parallel, nondistributed, version of make turns out to be inefficient. The compilations, which are mainly cpu-bound, slow each other down due to degradation of the processor’s performance. A solution may be found in the idea of boarding out (part of the) compilations to other processors. This resulted in a study of how to do compilations in a distributed manner. The aspect of having a system of loosely-coupled processors is an important issue in the field of distributed compilations. The relatively high cost of doing transactions (compared to local actions) in a loosely-coupled system makes the use of low-level inter-processor communication (e.g., the execution of system calls on another processor) inefficient. A UNIX network system like the Amoeba Connection turns out to be unsuitable for doing distributed compilations. It is shown that much overhead results from the communication between the system that contains the source code to be compiled and the system that does the compilation. Another possibility is to copy the source code to the other processor’s data space, execute a local compilation on that processor and send the results back; this greatly reduces the communication overhead. The time needed to send the source to and receive the code from the remote processor is negligible compared with the overhead mentioned earlier. In order to create a parallel and distributed make , I adapted the original ’make’ program by adding a module for finding out which compilations can be executed in parallel, depending on the actions to be taken, the actions already finished, and the present files. Furthermore, I created various versions of the UNIX C compiler cc in order to perform some measurements. hhhhhhhhhhhhhhhhhh † UNIX is a trademark of Bell Laboratories.