IP Library Granted Patent US 8,201,179
Granted Patent B2
US 8,201,179 · App. 11/417,427 · Granted Jun 12, 2012

Multi-threaded shared state variable control

Assignee: Oracle America, Inc.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,201,179
App. No.
11/417,427
Granted
Jun 12, 2012
Kind
B2
Abstract

A method for controlling sharing of resources in a multi-threaded environment includes entering a finite state machine state sequence; controlling resource-sharing threads using the finite state machine state sequence; and exiting the finite state machine state sequence when shared resource control is complete. A multi-threaded shared resource control system includes a finite state machine configured to control multi-threaded access to shared resources; a plurality of producer threads regulated by the finite state machine; and a plurality of consumer threads regulated by the finite state machine. A non-transitory computer usable medium having computer readable program code embodied therein for causing a computer system to execute a method for controlling sharing of resources in a multi-threaded environment includes entering a finite state machine state sequence; controlling resource-sharing threads using the finite state machine state sequence; and exiting the finite state machine state sequence when shared resource control is complete.

Claims (40)

1. A method for controlling sharing of resources in a multi-threaded environment, comprising:

entering a finite state machine state sequence;

controlling resource-sharing threads using the finite state machine state sequence;

employing state sharing in the finite state machine state sequence, which comprises:

a plurality of control states, wherein only one thread, a privileged thread, has complete ownership of a control state; and

a plurality of ownership transfer states, wherein a plurality of threads each has ownership of an ownership transfer state;

exiting the finite state machine state sequence when shared resource control is complete;

providing a wake mode of a thread, wherein the thread checks for ownership of a current state of the finite state machine state sequence,

wherein the wake mode further comprises:

a non-ownership of the current state of the finite state machine state sequence by a thread, wherein the thread relinquishes control of the finite state machine; and

an ownership of the current state of the finite state machine state sequence by a thread, comprising:

performing of a control operation by the thread; and

updating of the current state; and

providing a sleep mode of a thread, wherein the thread is inactive.

2. The method of claim 1 , the resource-sharing threads further comprising:

a plurality of producer threads performing actions to control shared resources; and

a plurality of consumer threads responding to the producer threads performing actions to control shared resources.

3. The method of claim 1 , wherein a previous thread takes ownership of the current state when a new thread does not take control of the current state within a specified time period.

4. The method of claim 1 , wherein timeout conditions cause the finite state machine state sequence to return to a well-known state.

5. The method of claim 1 , wherein timeout conditions cause the finite state machine state sequence to return to a well-known state.

6. A non-transitory computer usable medium having computer readable program code embodied therein for causing a computer system to execute a method for controlling sharing of resources in a multi-threaded environment, comprising:

entering a finite state machine state sequence;

controlling resource-sharing threads using the finite state machine state sequence;

employing state sharing in the finite state machine state sequence, which comprises:

a plurality of control states, wherein only one thread, a privileged thread, has complete ownership of a control state; and

a plurality of ownership transfer states, wherein a plurality of threads each has ownership of an ownership transfer state;

exiting the finite state machine state sequence when shared resource control is complete;

providing a wake mode of a thread, wherein the thread checks for ownership of a current state of the finite state machine state sequence,

wherein the wake mode further comprises:

a non-ownership of the current state of the finite state machine state sequence, wherein the thread relinquishes control of the finite state machine; and

an ownership of the current state of the finite state machine state sequence, comprising:

performing of a control operation by the thread; and

updating of the current state; and

providing a sleep mode of a thread, wherein the thread is inactive.

7. The computer usable medium of claim 6 , the resource-sharing threads further comprising:

a plurality of producer threads performing actions to control shared resources; and

a plurality of consumer threads responding to the producer threads performing actions to control shared resources.

8. The computer usable medium of claim 6 , wherein a previous thread takes ownership of the current state when a new thread does not take control within a specified time period.

9. The computer usable medium of claim 6 , wherein timeout conditions cause the finite state machine state sequence to return to a well-known state.

10. The computer usable medium of claim 6 , wherein the finite state machine state sequence is executed on a single instance of a finite state machine.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037311/0171 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 4, 2006
From: DEARTH, GLENN A.; JAY, STEPHEN A.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 017880/0035 →
Continuity (1)
Related Publication 20070261057A1 · Nov 8, 2007