IP Library Granted Patent US 7,392,513
Granted Patent B2
US 7,392,513 · App. 10/804,735 · Granted Jun 24, 2008

Methods and apparatus for merging critical sections

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 7,392,513
App. No.
10/804,735
Granted
Jun 24, 2008
Kind
B2
Abstract

Methods and apparatus for merging critical sections are disclosed. An example disclosed system estimates the cost of merging a first critical section and a second critical section using a dataflow analysis on the first and second critical sections. In the example system, the first critical section and the second critical section are merged based on a least expensive cost of merging critical sections.

Claims (52)

1. A method comprising:

estimating a cost of merging a first set of instructions and a second set of instructions using a dataflow analysis; and

merging the first and second sets of instructions to form a merged set of instructions based on the cost of merging the first and second sets of instructions, wherein the cost of merging the first and second sets of instructions is associated with instructions that belong to only the first set of instructions and instructions that belong to only the second set of instructions;

wherein estimating the cost of merging the first and second sets of instructions comprises:

creating a first vector based on the dataflow analysis, wherein elements of the first vector comprise instructions contained in at least one of the first and second sets of instructions; and

creating a cost matrix based on the first vector, wherein the cost matrix contains the cost of merging the first and second sets of instructions.

2. A method as defined in claim 1 , further comprising:

estimating a cost of merging the first set of instructions and a third set of instructions; and

estimating a cost of merging the second set of instructions and the third set of instructions.

3. A method as defined in claim 2 , wherein the cost of merging the first and third sets of instructions and the cost of merging the second and third sets of instructions are greater than the cost of merging the first and second sets of instructions.

4. A method as defined in claim 2 , wherein the third set of instructions comprises a critical section of instructions.

5. A method as defined in claim 2 , wherein the third set of instructions is associated with a critical section.

6. A method as defined in claim 1 , further comprising:

removing redundant instructions from the merged set of instructions; and

assigning a physical mutual exclusion lock to the merged set of instructions.

7. A method as defined in claim 6 , wherein the redundant instructions comprise instructions used for at least one of entering a set of instructions and exiting the set of instructions.

8. A method as defined in claim 1 , wherein the first and second sets of instructions are associated with respective first and second critical sections.

9. A method as defined in claim 1 , wherein at least one of the first and second sets of instructions is associated with a critical section.

10. A method as defined in claim 1 , wherein the dataflow analysis comprises a forward disjunctive dataflow analysis.

11. A method as defined in claim 1 , further comprising creating a second vector having elements comprising a redundancy indicator after merging the first and the second set of instructions.

12. A method as defined in claim 1 , wherein the cost of merging the first and second sets of instructions is a least expensive element in the cost matrix.

13. A method as defined in claim 1 , further comprising updating the first vector and the cost matrix after merging the first and second sets of instructions.

14. A method as defined in claim 1 , further comprising creating a partition including the first and the second sets of instructions before the first and second sets of instructions are merged.

15. An apparatus comprising:

a central processor unit; and

a memory including:

an instruction analysis module configured to perform a dataflow analysis;

a cost estimation module configured to determine an estimated cost of merging a first set of instructions and a second set of instructions to form a merged set of instructions;

a partition generator configured to merge the first and second sets of instructions based on the estimated cost of merging the first and second sets of instructions, wherein the cost of merging the first and second sets of instructions is associated with instructions that belong to only the first set of instructions and instructions that belong to only the second set of instructions;

a redundant instruction module configured to remove redundant instructions from the merged set of instructions; and

a mutual exclusion lock module configured to assign a first physical mutual exclusion lock to the merged set of instructions;

wherein the redundant instruction module is configured to create a vector having elements in the vector comprising a redundancy indicator.

16. An apparatus as defined in claim 15 , wherein the redundant instruction module is configured to remove redundant instructions comprising instructions for at least one of entering a set of instructions and exiting the set of instructions.

17. An apparatus as defined in claim 15 , wherein the instruction analysis module is configured to perform a forward disjunctive dataflow analysis.

18. An apparatus as defined in claim 15 , wherein the partition generator is configured to create a partition including the first and second sets of instructions before the first and second sets of instructions are merged.

19. An apparatus as defined in claim 15 , wherein the cost estimation module is configured to:

create a first vector based on the dataflow analysis, wherein the elements of the first vector comprise instructions contained in at least one of the first set of instructions and the second set of instructions; and

create a cost matrix based on the first vector, wherein the cost matrix comprises the cost of merging the first and second sets of instructions.

20. An apparatus as defined in claim 19 , wherein the partition generator is configured to determine a least expensive merge operation in the cost matrix.

21. A machine readable medium having instructions stored thereon that, when executed, cause a machine to:

estimate a cost of merging a first set of instructions and a second set of instructions using a dataflow analysis;

merge the first and the second sets of instructions to form a merged set of instructions based on the cost of merging the first and second sets of instructions, wherein the cost of merging the first and second sets of instructions is associated with instructions that belong to only the first set of instructions and instructions that belong to only the second set of instructions;

create a first vector based on the dataflow analysis, wherein elements in the first vector comprise instructions contained in at least one of the first and second sets of instructions; and

create a cost matrix based on the first vector, the cost matrix contains the cost of merging the first and second sets of instructions.

22. A machine readable medium, as defined in claim 21 , having instructions stored thereon that, when executed, cause the machine to:

estimate a cost of merging the first set of instructions and a third set of instructions; and

estimate a cost of merging the second set of instructions and the third set of instructions.

23. A machine readable medium, as defined in claim 21 , having instructions stored thereon that, when executed, cause the machine to:

remove redundant instructions from the merged set of instructions; and

assign a physical mutual exclusion lock to the merged set of instructions.

24. A machine readable medium, as defined in claim 21 , having instructions stored thereon that, when executed, cause the machine to update the first vector and the cost matrix after merging the first and second sets of instructions.

25. A machine readable medium, as defined in claim 21 , having instructions stored thereon that, when executed, cause the machine to create a partition including the first and second sets of instructions before the first and second sets of instructions are merged.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 8, 2016
From: INTEL CORPORATION
To: BEIJING XIAOMI MOBILE SOFTWARE CO., LTD.
Reel/Frame 037733/0440 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 20, 2004
From: LI, LONG; HUANG, BO; DAI, JINQUAN
To: INTEL CORPORATION, INC.
Reel/Frame 015344/0355 →