Information Technology Reference
In-Depth Information
Some changes of technical nature to a model are necessary and
concern specific synchronization issues which are partially introduced
by the chosen programming language. This situation is pointed out
excellently by Brian Gotz et al.:
'When concurrency is introduced into an application by
a framework, it is usually impossible to restrict the con-
currency-awareness to the framework code, because frame-
works by their nature make callbacks to application com-
ponents that in turn access application state.' [45, p. 9]
First of all, implementation of node-level partitioning strategies re-
quires the representation of model partitions. The interface Partition
defines a basic set of operations for creating and updating partitions of
a set of agents. Figure 9.10 gives an overview of the extended package
diagram containing the simulation engines as well as additionally
required interfaces and classes.
The Partition -interface resembles closely the approach specified in
Section 8.1.4. The class AgentStatic realizes the uninformed node-
level partitioning strategy as described in Section 8.1.3 (i.e., static
partitioning on a per-agent basis). Given a set of agents and a set
of execution threads, this partitioning strategy does not take any
information into account. The agents are distributed randomly and
uniformly onto the available execution threads.
Using static partitioning strategies
The adaptation of the event-driven simulation engine is shown in
Algorithm 4 (shaded area highlight differences to single-threaded
simulation engine). As a great amount of computation occurs when an
action is executed successfully (namely, the associated state changes),
only this part of the algorithm is actually executed in parallel. This
partitioning strategy ensures that state changes related to successful
execution of a number of actions are computed in parallel.
Synchronization is straight-forward to handle in this case: Only if an
action is executed successfully (see Chapter 6.6.5), the corresponding
Search WWH ::




Custom Search