System and method for synchronizing static variable initialization and reference under a multi-threaded computer environment
Abstract
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.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 2 · Forward citations: 42.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
In a computer system having a central processing unit (CPU) and an operating system, a computer implemented method for controlling static variable operations including initialization and reference, said method adapted for use in a multi-threaded computer system, the method comprising the steps of: receiving a lock request from a first thread, wherein said first thread is the first thread to request CPU processing of at least one static variable operation; switching said CPU to a single thread mode, wherein only said first thread is processed by said CPU during the single thread mode; label
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 42 total)
References Cited — Backward Prior Art (2)
Non-Patent Literature (5)
- "Programming under Mach" by Joseph Boykin. Addison-Wesley-Publishing Company, 1993.
- Advanced Windows NT Jeffrey Rizhter, Microsoft Press, 1993.
- Programming under Mach by Joseph Boykin. Addison Wesley Publishing Company, 1993.
- Rex Jaeschle, "Let's C Now: Recursion, Variable Classes and Scope," The DEC Professional, vol. 3, No. 4, Jul. 1984, pp. 84-93.
- Rex Jaeschle, Let s C Now: Recursion, Variable Classes and Scope, The DEC Professional, vol. 3, No. 4, Jul. 1984, pp. 84 93.