IP Library Granted Patent US 10,387,161
Granted Patent B2
US 10,387,161 · App. 15/694,673 · Granted Aug 20, 2019

Techniques for capturing state information and performing actions for threads in a multi-threaded computing environment

Inventors: Yuandong Tian (Belmont, CA); Qucheng Gong (Daly City, CA); Yuxin Wu (Sunnyvale, CA)
Assignee: Facebook, Inc.
G06F9/3851G06F9/4881G06N20/00A63F13/67A63F13/79G06F9/3009G06F9/30123G06F9/44563G06F9/4843G06F9/544G06N5/025G06N20/10G06N20/20
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 10,387,161
App. No.
15/694,673
Granted
Aug 20, 2019
Kind
B2
Abstract

Techniques are disclosed for implementing an extensible, light-weight, flexible (ELF) processing platform that can efficiently capture state information from multiple threads during execution of instructions (e.g., an instance of a game). The ELF processing platform supports execution of multiple threads in a single process for parallel execution of multiple instances of the same or different program code or games. Upon capturing the state information, one or more threads may be executed in the ELF platform to compute one or more actions to perform at any state of execution by each of those threads. The threads can easily access the state information from a shared memory space and use the state information to implement rule-based and/or learning-based techniques for determining subsequent actions for execution for the threads.

Claims (77)

1. A computer-implemented method comprising:

executing, by one or more processors, a plurality of threads, the plurality of threads sharing a common memory space, the plurality of threads comprising:

a first thread executing a first set of instructions,

a second thread executing a second set of instructions, and

an action thread executing in a same process as the first thread and the second thread, wherein the action thread is configured to access the shared common memory space;

storing, by the first thread, in the common memory space, first state information for the first thread;

storing, by the second thread, in the common memory space, second state information for the second thread;

receiving, by the action thread, a signal identifying the first thread and the second thread;

responsive to receiving the signal, performing by the action thread:

reading the first state information for the first thread from the common memory space,

computing, based on the first state information, first data to be communicated to the first thread, the first data identifying a first action to be performed,

reading the second state information for the second thread from the common memory space, and

computing, based on the second state information, second data to be communicated to the second thread, the second data identifying a second action to be performed;

receiving, by the first thread and from the action thread, the first data computed by the action thread;

receiving, by the second thread and from the action thread, the second data computed by the action thread;

performing, by the first thread, the first action indicated in the first data; and

performing, by the second thread, the second action indicated in the second data.

2. The computer-implemented method of claim 1 , further comprising:

selecting, by a collector thread included in the plurality of threads, the first thread and the second thread for processing by the action thread; and

sending, by the collector thread, to the action thread, the signal identifying the first thread and the second thread.

3. The computer-implemented method of claim 1 , wherein the first set of instructions is different from the second set of instructions.

4. The computer-implemented method of claim 1 , wherein executing the first set of instructions comprises executing an instance of a first game, and wherein executing the second set of instructions comprises executing an instance of a second game.

5. The computer-implemented method of claim 1 , wherein the first set of instructions is identical to the second set of instructions, wherein the first thread executes the first set of instructions as an instance of the first set of instructions, and wherein the second thread executes the second set of instructions as an instance of the second set of instructions.

6. The computer-implemented method of claim 1 , wherein the first state information is different from the second state information.

7. The computer-implemented method of claim 1 , wherein the first state information is identical to the second state information.

8. The computer-implemented method of claim 1 , wherein the first state information indicates a first state of executing the first set of instructions, and wherein the second state information indicates a second state of executing the second set of instructions.

9. The computer-implemented method of claim 1 , wherein executing the first set of instructions comprises executing an instance of a game, and wherein the first state information indicates a state of execution for the instance of the game.

10. The computer-implemented method of claim 9 , wherein the state of execution for the instance of the game corresponds to a position in the instance of the game.

11. The computer-implemented method of claim 1 , wherein executing the first set of instructions comprises executing an instance of a game, wherein the first state information indicates a state of execution for the instance of the game, and wherein the first data includes a value related to movement at the state of execution for the instance of the game.

12. The computer-implemented method of claim 1 , wherein computing the first data comprises using, by the action thread, a set of rules to compute the first data, and wherein computing the second data comprises using, by the action thread, the set of rules to compute the second data.

13. The computer-implemented method of claim 1 , wherein computing the first data comprises using, by the action thread, a model to compute the first data, wherein the model is trained using historical data related to execution of the first set of instructions; and

computing the second data comprises using, by the action thread, the model to compute the second data.

14. The computer-implemented method of claim 13 , wherein the model is trained based on a machine learning technique.

15. The computer-implemented method of claim 1 , wherein computing the first data comprises using, by the action thread, a reinforcement learning technique to compute the first data, and wherein computing the second data comprises using, by the action thread, the reinforcement learning technique to compute the second data.

16. A system comprising:

one or more processors; and

a memory accessible to the one or more processors, the memory storing one or more instructions that, upon execution by the one or more processors, causes the one or more processors to:

execute a plurality of threads, the plurality of threads sharing a common memory space, the plurality of threads comprising:

a first thread executing a first set of instructions,

a second thread executing a second set of instructions, and

an action thread executing in a same process as the first thread and the second thread, wherein the action thread is configured to access the shared common memory space;

store, by the first thread, in the common memory space, first state information for the first thread;

store, by the second thread, in the common memory space, second state information for the second thread;

receive, by the action thread, a signal identifying the first thread and the second thread;

responsive to receiving the signal, perform by the action thread:

reading the first state information for the first thread from the common memory space,

computing, based on the first state information, first data to be communicated to the first thread, the first data identifying a first action to be performed,

reading the second state information for the second thread from the common memory space, and

computing, based on the second state information, second data to be communicated to the second thread, the second data identifying a second action to be performed;

receive, by the first thread and from the action thread, the first data computed by the action thread;

receive, by the second thread and from the action thread, the second data computed by the action thread;

perform, by the first thread, the first action indicated in the first data; and

perform, by the second thread, the second action indicated in the second data.

17. The system of claim 16 , wherein the one or more instructions which, upon execution by the one or more processors, further causes the one or more processors to:

select, by a collector thread included in the plurality of threads, the first thread and the second thread for processing by the action thread based on:

identifying, by the collector thread, a change in state of execution for the first thread; and

identifying, by the collector thread, a change in state of execution for the second thread; and

send, by the collector thread, to the action thread, the signal identifying the first thread and the second thread.

18. The system of claim 16 , wherein executing the first set of instructions comprises executing an instance of a first game, wherein executing the second set of instructions comprises executing an instance of a second game, and wherein the first game is different from the second game.

19. A non-transitory computer-readable storage medium storing instructions executable by one or more processors, the instructions, which upon execution by the one or more processors, cause the one or more processors to:

execute a plurality of threads, the plurality of threads sharing a common memory space, the plurality of threads comprising:

a first thread executing a first set of instructions,

a second thread executing a second set of instructions, and

an action thread executing in a same process as the first thread and the second thread, wherein the action thread is configured to access the shared common memory space;

store, by the first thread, in the common memory space, first state information for the first thread;

store, by the second thread, in the common memory space, second state information for the second thread;

receive, by the action thread, a signal identifying the first thread and the second thread;

responsive to receiving the signal, perform by the action thread:

reading the first state information for the first thread from the common memory space,

computing, based on the first state information, first data to be communicated to the first thread, the first data identifying a first action to be performed,

reading the second state information for the second thread from the common memory space, and

computing, based on the second state information, second data to be communicated to the second thread, the second data identifying a second action to be performed;

receive, by the first thread and from the action thread, the first data computed by the action thread;

receive, by the second thread and from the action thread, the second data computed by the action thread;

perform, by the first thread, the first action indicated in the first data; and

perform, by the second thread, the second action indicated in the second data.

20. The non-transitory computer-readable storage medium of claim 19 , wherein executing the first set of instructions comprises executing an instance of a game, wherein the first state information indicates a state of execution for the instance of the game, the state of execution in the game corresponding to a position in the instance of the game, and wherein the first data includes a value related to movement at the position in the instance of the game.

Assignments (2)
CHANGE OF NAME Recorded Dec 22, 2021
From: FACEBOOK, INC.
To: META PLATFORMS, INC.
Reel/Frame 058581/0334 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 7, 2017
From: TIAN, YUANDONG; GONG, QUCHENG; WU, YUXIN
To: FACEBOOK, INC.
Reel/Frame 044052/0587 →
Continuity (1)
Related Publication 20190073224A1 · Mar 7, 2019