发明名称 System and method for synchronizing static variable initialization and reference under a multi-threaded computer environment
摘要 The present invention is a system and method to avoid static variable initialization and reference conflicts in a multi-threaded computer system. There are four major problems that arise with computer programs containing static variable references and static variable initializations on a computer system with a multi-threaded operating system: (1) premature references made on an uninitialized static variable; (2) side effects caused by initialization competition among threads; (3) multiple initialization of the same static variable; and (4) server control of static variable reference and initialization. Each of these four problems is eliminated by the system and method of this invention. The invention operates by locking the CPU during identification of the first thread seeking to initiate a static variable operation, maintaining all other threads in a wait state, and unlocking the CPU thus releasing the waiting threads from their wait state. Another component of the invention provides an additional control mechanism to invoke the disclosed static variable controller to eliminate potential static variable conflicts among competing threads.
申请公布号 US5771382(A) 申请公布日期 1998.06.23
申请号 US19970911187 申请日期 1997.08.14
申请人 INTERNATIONAL BUSINESS MACHINES CORPORATION 发明人 WANG, I-SHIN ANDY;KORENSHTEIN, RONI
分类号 G06F9/46;(IPC1-7):G06F9/44 主分类号 G06F9/46
代理机构 代理人
主权项
地址