# A Survey on Malleability Solutions for High-Performance Distributed Computing
## 6 Other Malleability Solutions
### Invasive Malleability  
Invasive computing paradigm [54] suggest a resource-aware programming model, where the application can dynamically fit to the available resources, e.g., processing elements, memory, and network connections. The request of these resources is named _invade_. Such resources invasion can be indicated by constraints. Next, application uses the invaded resources for a certain computation. This action is named _infect_. When the resources are not needed anymore, application frees them. This is known as _retreat_. Applications developed by this paradigm must be extended in three ways: (i) applications must state its constraints and give hints to resource manager, (ii) resource adaptations must be supported by the application, and (iii) application must handle data migration, which results from resource adaptations. A resource manager is necessary to make decisions on how to allocate resources based on application constraints during execution. Originally, invasive computing ([[http://www.invasic.de](http://www.invasic.de)]([http://www.invasic.de](http://www.invasic.de)) (accessed on 13 April 2022)) was applied on a multiprocessor system-on-chip, with custom hardware [55] and operating system [56]. Its main goal is to write applications in a cooperating and resource-aware manner, where resource requirements are explicitly communicated to the system. Leveraging its global view, the system decides for the best action, and order the hardware and applications to adapt. Most of these works have been developed using the programming language X10. _X10_[57] is an object-oriented programming language in the _PGAS family_[58] that supplies important tools to support the field of scientific computing with parallelization considered from the very beginning. One of its most interesting feature for malleability is the flexible treatment of concurrency, distribution, and locality, within an integrated type system. X10 also extends the PGAS model with asynchrony, yielding the _APGAS programming model_[59]. This feature introduces _places_ as an abstraction for a computational context with a locally synchronous view of shared memory. An X10 computation runs over a large collection of _places_. Each place hosts some data and runs one or more _activities_. The main features of X10 are as follows:  
* Activities within the same place use shared memory, whereas elsewhere activities must communicate with other means. * An activity may synchronously (and atomically) use one or more memory locations in the place in which it resides, leveraging current symmetric multiprocessor (SMP) technology. * An activity may shift to another place to execute a statement block. X10 provides weaker ordering guarantees for inter-place data access, enabling applications to scale. * Multiple memory locations in multiple places cannot be accessed atomically. Immutable data need no consistency management and may be freely copied by the implementation between places. * One or more clocks may be used to order activities running in multiple places. Distributed arrays, DistArrays, may be distributed across multiple places and support parallel collective operations. Authors in [60] have developed an invasive application near to malleable applications using this programming language. It consists of a resource manager, as well as a multigrid solver, with dynamical resource demands. It can be executed on common HPC many-core and cluster systems. Such a solver has to modify its scalability behavior during the execution and requires data migration upon reallocation due to distributed memory systems, in the same way as a malleable application behaves. Their experimental results reflect improved application throughput thanks to the dynamic adaptation of resources. An invasive application features three steps [61] as it is shown in Listing 8:  
1. A call to invade claims resources specified by various _constraints_. This set of resources is called a _claim_. 2. A call to infect uses claimed resources for executing _i-lets_ on them.