IP Library Granted Patent US 9,396,044
Granted Patent B2
US 9,396,044 · App. 14/262,033 · Granted Jul 19, 2016

Memory efficient thread-level speculation

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 9,396,044
App. No.
14/262,033
Granted
Jul 19, 2016
Kind
B2
Abstract

A processor device executes program code in one or more threads. The processor device detects a call of a function in one of the threads and executes the function in a further thread. Further, the processor device performs a selection between saving a state of the processor device when starting execution of the function in the further thread and not saving the state of the processor device when starting execution of the function in the further thread. In response to a conflict related to the execution of the function in the further thread, the processor device may perform a rollback to a last saved state of the processor device and execute the function in the thread in which it was called.

Claims (55)

1. A method, comprising:

a processor device executing program code in one or more threads,

the processor device detecting a call of a function in one of the one or more threads;

the processor device executing the function in a further thread;

the processor device determining a plurality of functions which are currently being executed by the processor device;

the processor device creating a sorted list of depths of the plurality of functions;

the processor device selecting a depth from the sorted list of depths depending on its position in the sorted list of depths,

wherein, as a number of performed rollbacks to a last saved state of the processor device increases, the position moves towards an end of the sorted list of depths which corresponds to higher depths; and

the processor device performing a selection between saving a state of the processor device when starting execution of the function in the further thread and not saving the state of the processor device when starting execution of the function in the further thread,

wherein the selection depends on a comparison of a depth of the function to the depth selected from the sorted list of depths.

2. The method according to claim 1 ,

in response to a conflict related to said execution of the function in the further thread, performing a rollback to the last saved state of the processor device and executing the function in the thread in which it was called.

3. The method according to claim 2 , wherein said selection depends on a number of performed rollbacks.

4. The method according to claim 1 , wherein said selection depends on a number of functions which are currently being executed by the processor device.

5. The method according to claim 4 ,

in response to said number of functions being smaller than a threshold value, the processor device selecting said saving of the state; and

in response to said number of functions being equal to or larger than the threshold value, the processor device selecting said not saving of the state.

6. The method according to claim 5 ,

wherein said threshold value is 3.

7. The method according to claim 1 ,

wherein said selection depends on a depth of the function.

8. The method according to claim 1 ,

in response to a conflict related to said execution of the function in the further thread, performing a rollback to the last saved state of the processor device and executing the function in the thread in which it was called; and

wherein said position in the sorted list of depths depends on a number of performed rollbacks.

9. The method according to claim 1 , comprising:

in response to the depth of the function being smaller than the depth selected from the sorted list of depths, the processor device selecting said saving of the state; and

in response to the depth of the function being equal to or larger than the depth selected from the sorted list of depths, the processor device selecting said not saving of the state.

10. The method according to claim 1 ,

wherein said program code is a script-based web application.

11. An apparatus, comprising:

a memory operable to store program code; and

a processor device operable to execute the program code in one or more threads; wherein the processor device is configured to:

detect a call of a function in one of the one or more threads,

execute the function in a further thread,

determine a plurality of functions which are currently being executed by the processor device;

create a sorted list of depths of the plurality of functions;

select a depth from the sorted list of depths depending on its position in the sorted list of depths,

wherein, as a number of performed rollbacks to a last saved state of the processor device increases, the position moves towards an end of the sorted list of depths which corresponds to higher depths; and

perform a selection between saving a state of the processor device when starting execution of the function in the further thread and not saving the state of the processor device when starting execution of the function in the further thread,

wherein the selection depends on a comparison of a depth of the function to the depth selected from the sorted list of depths.

12. The apparatus according to claim 11 , wherein the processor device is configured to:

in response to a conflict related to said execution of the function in the further thread, perform a rollback to the last saved state of the processor device and execute the function in the thread in which it was called.

13. The apparatus according to claim 12 , wherein said selection depends on a number of performed rollbacks.

14. The apparatus according to claim 11 , wherein said selection depends on a number of functions which are currently being executed by the processor device.

15. The apparatus according to claim 14 , wherein said processor device is configured to:

in response to said number of functions being smaller than a threshold value, select said saving of the state, and

in response to said number of functions being equal to or larger than the threshold value, select said not saving of the state.

16. The apparatus according to claim 11 , wherein said selection depends on the depth of the function.

17. The apparatus according to claim 11 , wherein the processor device is configured to:

in response to a conflict related to said execution of the function in the further thread, perform a rollback to the last saved state of the processor device and execute the function in the thread in which it was called; and

wherein said position in the list depends on a number of performed rollbacks.

18. The apparatus according to claim 11 , comprising:

wherein the processor device is configured to:

in response to the depth of the function being smaller than the depth selected from the sorted list of depths, select said saving of the state, and

in response to the depth of the function being equal to or larger than the depth selected from the sorted list of depths, select said not saving of the state.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 25, 2019
From: SONY MOBILE COMMUNICATIONS, INC.
To: SONY CORPORATION
Reel/Frame 048691/0134 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 27, 2016
From: SONY CORPORATION
To: SONY MOBILE COMMUNICATIONS INC.
Reel/Frame 038542/0224 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 7, 2014
From: SUNDSTROM, HENRIK; ISBERG, ANDERS; GRAHN, HAKAN; MARTINSEN, JAN KASPER
To: SONY CORPORATION
Reel/Frame 032842/0556 →