摘要:
A computer-implementable method, system and computer-usable medium. One or more objects among a plurality of objects can be processed utilizing a data-processing apparatus/system. One or more lock reservations can be applied among a group of lock reservations over a multiple sequential lock operations with respect the particular object. Thereafter, the lock reservation can be cancelled with respect to the last monitor exit operation in order to eliminate lock operations where traditional lock coarsening cannot be applied.
摘要:
A computer-implementable method, system and computer-usable medium. One or more objects among a plurality of objects can be processed utilizing a data-processing apparatus/system. One or more lock reservations can be applied among a group of lock reservations over a multiple sequential lock operations with respect the particular object. Thereafter, the lock reservation can be cancelled with respect to the last monitor exit operation in order to eliminate lock operations where traditional lock coarsening cannot be applied.
摘要:
Automatic memory management with a generational copy collector garbage collection algorithm running on parallel threads to perform simultaneous and independent copying and scanning. An object is scanned. It is determined whether an object referenced within the slot of the object being scanned may be copied to the same generation as the scanned object. A mark may be made to indicate that the referenced object may be copied to a different generation than the scanned object. The mark defers the copying of the referenced object.
摘要:
Under the present invention, a locking primitive associated with a shared data object is automatically transformed to allow multiple read-only locks if certain conditions are met. To this extent, when a read-only lock on a shared data object is desired, a thread identifier of an object header lock word (hereinafter “lock word”) associated with the shared data object is examined to determine if a read-write lock on the shared data object already exists. If not, then the thread identifier is set to a predetermined value indicative of read-only locks, and a thread count in the lock word is incremented. If another thread attempts a read-only lock, the thread identifier will be examined for the predetermined value. If it is present, the thread count will be incremented again, and a second read-only lock will be simultaneously established.
摘要:
A method for lock reservation using cooperative multithreading is provided. The method includes analyzing code containing async points to support cooperative multithreading. The method also includes identifying a class of code as a candidate for reservation via determining locking properties within the code as a function of locations of async points within the code, and generating reserving code that reserves the shared object when code performing the reservation is considered hot code. The method further includes performing runtime monitoring of reservation performance to detect a contention level for the shared object, and removing the reservation when the runtime monitoring determines that a low level of contention exists. A method for lightweight single reader reserved locks is also provided, including identifying a candidate for reservation containing a read-only locking sequence, conditionally marling the sequence, and generating code using an artificial dependency to control execution order of out-of-line code.
摘要:
A way to use multiple-reader locks for those paths where no writes occur is provided. Only if one of the writing paths executes will a full writer lock be acquired. Two copies of the critical section comprising a reading version and a writing version are created. The default execution leads to the reader version, which only acquires a reader-lock. The reader version of the code executes prior to execution of the writer lock only version, otherwise bypassing the writer lock only version. If the execution leads to a path in which a write would occur, the reader only version branches to the beginning of the writer version. The writer version is identical to the original code and obtains a full writer lock. If execution in the reader lock does not lead to a path that writes, then only the reader lock is acquired.
摘要:
Methods and systems for generating a hashcode for a hash table are provided to improve the hash table performance. A particular method includes receiving an input of a key; applying a hash function to the key to generate an incoming hashcode of the key; encoding a key type into the incoming hashcode to generate a first hashcode; and storing the first hashcode. A particular method includes encoding the key type into at least one bit of a bucket index portion of the incoming hashcode.
摘要:
Under the present invention, a locking primitive associated with a shared data object is automatically transformed to allow multiple read-only locks if certain conditions are met. To this extent, when a read-only lock on a shared data object is desired, a thread identifier of an object header lock word (hereinafter “lock word”) associated with the shared data object is examined to determine if a read-write lock on the shared data object already exists. If not, then the thread identifier is set to a predetermined value indicative of read-only locks, and a thread count in the lock word is incremented. If another thread attempts a read-only lock, the thread identifier will be examined for the predetermined value. If it is present, the thread count will be incremented again, and a second read-only lock will be simultaneously established.
摘要:
An improved system and computer programming product for acquisition and release of locks within a software program is disclosed. In an exemplary embodiment, a lock within a loop is transformed by relocating acquisition and release instructions from within the loop to positions outside the loop. This may significantly decrease unnecessarily lock acquisition and release during execution of the software program. In order to avoid contention problems which may arise from acquiring and keeping a lock on an object over a relatively long period of time, a contention test may be inserted into the loop. Such a contention test may temporarily release the lock if another thread in the software program requires access to the locked object.
摘要:
Automatic memory management with a generational copy collector garbage collection algorithm running on parallel threads to perform simultaneous and independent copying and scanning. An object is scanned. It is determined whether an object referenced within the slot of the object being scanned may be copied to the same generation as the scanned object. A mark may be made to indicate that the referenced object may be copied to a different generation than the scanned object. The mark defers the copying of the referenced object.