Computer-implemented method, system and program product for establishing multiple read-only locks on a shared data object
    1.
    发明申请
    Computer-implemented method, system and program product for establishing multiple read-only locks on a shared data object 有权
    用于在共享数据对象上建立多个只读锁的计算机实现的方法,系统和程序产品

    公开(公告)号:US20060168585A1

    公开(公告)日:2006-07-27

    申请号:US11042778

    申请日:2005-01-25

    IPC分类号: G06F9/46

    CPC分类号: G06F9/526 G06F2209/523

    摘要: 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.

    摘要翻译: 在本发明中,如果满足某些条件,则与共享数据对象相关联的锁定原语被自动转换以允许多个只读锁。 在这种情况下,当需要共享数据对象上的只读锁时,检查与共享数据对象相关联的对象头锁定字(以下称为“锁字”)的线程标识符,以确定是否读写锁 对共享数据对象已经存在。 如果不是,则将线程标识符设置为指示只读锁定的预定值,并且增加锁定字中的线程数。 如果另一个线程尝试只读锁,则将检查线程标识符的预定值。 如果它存在,则线程计数将再次递增,并且将同时建立第二个只读锁。

    Transforming code to expose glacial constants to a compiler
    2.
    发明申请
    Transforming code to expose glacial constants to a compiler 失效
    转换代码以将冰川常数暴露给编译器

    公开(公告)号:US20060200809A1

    公开(公告)日:2006-09-07

    申请号:US11071026

    申请日:2005-03-03

    IPC分类号: G06F9/45

    CPC分类号: G06F8/443

    摘要: Techniques for causing a compiler to organize code pertaining to data that is not constant, but that is unlikely to change except in relatively infrequent situations, in an improved manner. A class containing data that may have more than one value, but which will have a particular value in the typical case, is now split into two parts, a first class which uses the more-likely data value as a constant, and a second class (designed as a subclass of the first class) that uses the data value as a variable capable of having either the more-likely value or other, less-likely values. The compiler generates assembly code comprising instructions pertaining to the more-likely data value, and also generates assembly code capable of processing the less-likely data values. This latter code, however, is initially unreachable. The compiler-generated assembly code will be programmatically patched, at run time, if any of the less-likely data values occur, thereby dynamically making the code reachable. Once the initially-unreachable code becomes reachable, it will be used thereafter (regardless of the setting of the data value).

    摘要翻译: 用于使编译器组织与不是恒定的数据有关的代码的技术,但是除了在相对不频繁的情况下不可能改变,这种技术以改进的方式。 包含可能具有多个值但在典型情况下具有特定值的数据的类现在分为两部分,第一类使用较可能的数据值作为常数,第二类 (被设计为第一类的子类),其使用数据值作为能够具有更可能的值或其他较不可能的值的变量。 编译器生成包含与更可能的数据值相关的指令的汇编代码,并且还生成能够处理不太可能的数据值的汇编代码。 然而,后一代码最初无法访问。 编译器生成的汇编代码将在运行时以编程方式修补,如果出现任何不太可能的数据值,从而动态地使代码可以访问。 一旦最初无法访问的代码可达,它将被使用(不管数据值的设置)。

    Programmatic compiler optimization of glacial constants
    3.
    发明申请
    Programmatic compiler optimization of glacial constants 有权
    编程优化的冰川常数

    公开(公告)号:US20070240135A1

    公开(公告)日:2007-10-11

    申请号:US11371724

    申请日:2006-03-09

    IPC分类号: G06F9/45

    CPC分类号: G06F9/45516

    摘要: Optimizations are programmatically applied by a compiler (preferably, a just-in-time or “JIT” compiler), and enable achieving improved performance while a variable acts as a global constant, yet also allow code to execute correctly if the global constant's run-time value changes from the value on which the optimization was originally based. Code snippets that dynamically patch executable code are described, where these code snippets take corrective actions to enable correct program execution following a run-time change to the value of a glacial constant. A backup recovery path may also be maintained, where this path provides code that is executed in the event of a change to a glacial constant and that treats the glacial constant as a variable. Recompilation may also be used after a change to a glacial constant, where the originally-compiled code has made an assumption about the glacial constant's value that is no longer accurate. Combinations of these approaches may be used.

    摘要翻译: 优化由编译器(最好是即时或“JIT”编译器)以编程方式应用,并且当变量充当全局常量时,可以实现改进的性能,而且如果全局常量的运行 - 时间值从优化最初所基于的值变化。 描述了动态修补可执行代码的代码片段,其中这些代码段采取纠正措施,以便在运行时更改为冰川常数的值后启用正确的程序执行。 还可以维护备份恢复路径,其中该路径提供在对冰川常数变化的情况下执行的代码,并且将冰川常数作为变量来处理。 重新编译也可以在更改为冰川常数之后使用,其中原始编译的代码已经对不再准确的冰川常数的值作出假设。 可以使用这些方法的组合。

    Transforming locks in software loops
    4.
    发明申请
    Transforming locks in software loops 失效
    在软件循环中转换锁

    公开(公告)号:US20050081185A1

    公开(公告)日:2005-04-14

    申请号:US10845542

    申请日:2004-05-13

    CPC分类号: G06F8/443 Y10S707/99938

    摘要: An improved method and system 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.

    摘要翻译: 公开了用于在软件程序内采集和释放锁的改进的方法和系统。 在示例性实施例中,通过将采集和释放指令从循环内的位置重新定位到环路外的位置来变换环路内的锁定。 这可能会在执行软件程序时不必要地锁定获取和释放。 为了避免在相对长的时间段内获取和保持对象的锁定可能引起的争用问题,可以将竞争测试插入到循环中。 如果软件程序中的另一个线程需要访问被锁定的对象,则这样的争用测试可临时释放该锁。