发明名称 EFFICIENT LOCKING FOR THREAD-SAFE SELF-MODIFYING CODE
摘要 A locking mechanism for use in a multi-thread environment supporting self- modifying code in which modifications to the code are made at runtime. The locking mechanism having associated helper code accessed by a call from the first instruction address in the code block . The helper code calculating the binary encoding for the call instruction and using an atomic compare and exchange instruction to compare the calculated binary encoding with the actual conten ts of the first instruction address. Where there is a match, a self loop instruction is written to the first instruction address to lock the specified code block for subsequent threads. The helper code contai ns instructions to resolve the references in the specified block. The last such instruction is an atomic store operation to replace the self loop instruction at the first instruction address with t he appropriate modified instruction.
申请公布号 CA2346766(A1) 申请公布日期 2002.11.07
申请号 CA20012346766 申请日期 2001.05.07
申请人 IBM CANADA LIMITED-IBM CANADA LIMITEE 发明人 STOODLEY, KEVIN A.;LOW, ANDREW
分类号 G06F9/445;G06F9/46;(IPC1-7):G06F9/46 主分类号 G06F9/445
代理机构 代理人
主权项
地址