A parallel simulator implementation multithreaded-simulator-impl,
An interface to users mtp-interface,
Logical-process to represent LPs in terms of parallel simulation.
mtp-interface:
All LPs and threads are stored in the mtp-interface. It controls the simulation progress, schedules LPs to threads and manages the lifecycles of LPs and threads.
The interface also provides some methods and options for users to tweak the simulation. (调整模拟)
logical-process:
Each LP's logic is implemented in logical-process.
It contains most of the methods of the default sequential simulator plus some auxiliary (辅助) methods for parallel simulation.
multithreaded-simulator-impl:
The simulator implementation multithreaded-simulator-impl is a derived class (派生类) from the base simulator.
It converts calls to the base simulator into calls to logical processes based on the context of the current thread.
It also provides a partition method for automatic fine-grained topology partition.
The reason behind Unison's fast speed is that it divides the network into multiple logical processes (LPs) with fine granularity and schedules them dynamically.
To get to know more details of such workflow, you can enable the following log component: