Geoscience Reference
In-Depth Information
attempt was also made to improve the performance by introducing message buffers,
which are attached to the scheduler, but this did not help to resolve the problem.
9.3.2.2
Failed Attempt 2: Multiple Scheduler Queues
In order to try to solve the problem with the single scheduler queue, separate
scheduler queues per thread are defined. Different threads still need to synchronize
to ensure data consistency, e.g., when vehicles move between network partitions.
Furthermore, periodical synchronization between border links at predefined inter-
vals is needed to ensure that one thread does not advance the simulation too much.
This synchronization interval is determined by the travel time needed to travel
between two partitions. This method is almost identical to how the parallelization
of DEQSim is performed.
Unfortunately, this approach does not perform well because of the periodical
synchronization between threads and the waiting time involved; whenever one
thread is too far ahead, it has to wait on the other thread. This issue could be
improved by applying a different method, which is described in the next section.
9.3.2.3
Successful Parallelization: Decoupling of Executor Threads
The main problem detected with the multiple scheduler queues approach is that the
synchronization between threads happens too often, thus hindering parallelization.
A new approach in this regard is implemented which successfully decouples the
threads, as shown in Fig. 9.2 . Instead of periodically synchronizing between network
Thread A
Thread B
Scheduler Queue
Scheduler Queue
most
messages
scheduled
inside same
partition
Outgoing Message Buffer
(for Thread B)
buffered messages transferred
periodically (with synchronized
access)
messages for links in
neighboring partition are
buffered locally
Network Partition A
Network Partition B
Fig. 9.2
Parallelization of JDEQSim
Search WWH ::




Custom Search