Andre Rauber Du Bois PhD Thesis Abstract


In mobile programs computations can move, or be moved, over a network to better utilise the available resources. Mobile languages may be implicit or explicit. In implicit mobile languages computations are moved automatically by the runtime system of the language. This kind of mobility is usually exploited in small distributed systems, e.g., parallel systems running on a cluster of machines. In explicit mobile languages the programmer has control over the placement of active computations and execute on open networks where programs can join and leave the distributed system at any time. In this dissertation we investigate the use of purely functional languages for writing mobile programs.

The contributions of this dissertation are:

A system for implicit mobility based on a purely functional language: Semi-explicit parallel functional languages usually have automatic mechanisms for the distribution of potential work, i.e., unevaluated expressions. In this systems, often happens the situation in which there is no more work to be distributed and some processors are idle while others have many runnable threads. The performance of these systems can be improved if besides potential work, threads could also be migrated. GUM (Graph reduction for a Unified Machine model), is the runtime system that underlies the implementation of a number of Haskell extensions for parallel programming (i.e., GPH, Eden and GDH). We have extended the GUM runtime system with a mechanism for the migration of threads. Migrating a thread incurs significant execution cost and the system implemented uses a sophisticated mechanism to choose when to migrate threads. The examples demonstrate that a poor load balancing in the begining of the evaluation can be corrected using thread migration. Measurements of nontrivial programs on a high-latency cluster architecture show that thread migration can improve the performance of data-parallel and divide-and-conquer programs with low processor utilisation.

A purely functional language for explicit mobility: mHaskell is a Haskell extension for writing distributed mobile software. It is the first explicit mobile language based on a purely functional language. It extends Concurrent Haskell with a set of low-level primitives for communication and mobile channels (MChannels). MChannels are higher-order, single-reader communication channels that allow the communication of any Haskell value including functions and channels. Programming with MChannels can be seen as system level programming: the programmer has to worry about things such as communication and synchornisation of computations, and if mobile values are not carefullly managed, e.g., using dynamic types, type errors may appear at runtime. Haskell is a purely functional language in which stateful computations are encapsulated in a IO mondad. Stateful computations are firs-class values in the language hence they can be manipulated and new high level abstractions over computations can be defined. Using this characterisc, MChannels, and the support for monadic programming available in Haskell, it is possible to define traditional abstractions for mobile computation such as remote thread creation, remote evaluation and strong mobility and new abstractions called mobility skeletons that are higher-order functions that encapsulate common patterns of mobile computation. Although many functional languages are based on functional programming languages, as far as we know this is the first time common communication behaviours in mobile programming were specified as higher order functions or skeletons. Furthermore, we have used this abstractions to implement some tradicional mobile applications such as a distributed meeting planner, a stateless web-server and a system that supports mobile agents.