26.08.2013 Views

3.1 MB - Evernote

3.1 MB - Evernote

3.1 MB - Evernote

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Implementation<br />

mode. A cancelback strategy was already mentioned by David Jefferson [17] but the<br />

cancelback strategy used here will differ slightly from the one suggested by him. When<br />

the LP operates in cancelback mode then it will still respond to control messages and<br />

will still receive Transactions from other LPs but it will stop moving or processing any<br />

local Transaction so that no simulation progress is made by the LP and no simulation<br />

state information are saved as a result. Further the LP will attempt to cancel back<br />

Transactions that it received from other LPs in order to free memory or at least stop<br />

memory usage growing further. To cancelback a Transaction means that all local traces<br />

that a Transaction was received are removed and the Transaction is sent back to its<br />

original sender that will rollback to the move time of that Transaction. The main<br />

methods involved with the cancelback mechanism are the method<br />

LogicalProcess.needToCancelBackTransactions() which is called by an LP that is in<br />

cancelback mode and the method LogicalProcess.cancelBackTransaction() which is<br />

used to send a cancelled Transaction back to the sender LP. This cancelback mechanism<br />

of the parallel simulator is not only used for the general memory management but also<br />

when the Actuator value of the LPCC has been exceeded.<br />

5.3.5 Logging<br />

The parallel simulator uses the Java logging library log4j [3] for its logging and<br />

standard user output. It is the same logging library that is used by ProActive. The log4j<br />

library makes it possible to enable or disable parts or all of the logging or to change the<br />

detail of logging by means of a configuration file without any changes to the Java code.<br />

To utilise the same logging library for ProActive and the parallel simulator means that<br />

only a single configuration file can be used to configure the logging output for both. A<br />

hierarchical structure of loggers combined with inheritance between loggers makes it<br />

very easy and fast to configure the logging of the simulator. A detailed description of the<br />

log4j library and its configuration can be found at [3]. The specific loggers used by the<br />

parallel simulator are described in Appendix C.<br />

As mentioned above the parallel simulator will use the same log4j configuration file like<br />

ProActive. By default this is the file proactive-log4j but a different file can be specified<br />

as described in the ProActive documentation [15]. The log4j root logger for all output<br />

from the parallel simulator is parallelJavaGpssSimulator (in the log4j configuration file<br />

all loggers have to be prefixed with “log4j.logger.” so that this logger would appear as<br />

69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!