Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

VPE SIM: Simulated Device Deadlock Detection and Correction

IP.com Disclosure Number: IPCOM000214903D
Publication Date: 2012-Feb-10
Document File: 3 page(s) / 63K

Publishing Venue

The IP.com Prior Art Database

Abstract

This article describes a method to prevent contention in multi-thread simulated environments. Contention in the simulated system is recorded and the information is used to reorder subsequent tasks being dispatched by the simulator in order to improve performance.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 51% of the total text.

Page 01 of 3

VPE SIM: Simulated Device Deadlock Detection and Correction

Whole-system simulation in a multi-threaded environment offers a unique set of challenges for workload distribution and scheduling. Although the "guest" being simulated may not be aware of them, concurrency issues exist when multiple guest objects contend for some shared resource.

In simulation, time is measured in two different ways:


1. Guest time - time as it appears to advance within the "guest" device (i.e. simulated time, which is allowed to be slightly-inaccurate, and is controllable)


2. Wall-clock time - real-time within the host system (i.e. reality)

If an "exclusive" process takes a large amount of wall-clock time, but consumes very little "guest" time, the entire simulation must wait some period of time while accesses to the exclusive process are serialized. This in turn impacts the performance of the simulation as a whole. If the simulation model has concurrency bugs this can also lead to deadlocks that can hang the entire simulation.

Proposed is a method of detecting these points of contention for shared resources based on the fact that the simulation system may detect contention at the guest level as well as the host level (simulation environment itself).

As guests are dispatched (each advancing time forward at slightly different rates), the underlying simulation dispatcher may detect that one or more guests is constantly contending for a resource owned by another guest. Rather than blocking the offending request on a host thread, proposed is a method for re-ordering execution, and scheduling different, non-contending work, allowing the simulation to advance more quickly according to wall-clock time.

As an example, if 8 units of work all need to advance time from 0 to 100 in 2 host threads, and due to bad ordering, a lock is needed in both threads, one of the threads will serialize waiting on the lock, wasting wall-clock time. Proposed is a mechanism where this contention is detected, and the ordering of the work is dynamically-corrected in future dispatches such that the host threads may continue to work in parallel, preventing this contention for some shared resource

1



Page 02 of 3

In a multi-thread simulation environment, host threads (threads created by the simulation environment) dispatch work/jobs (guest threa...