IP Library › Granted Patent US 12,504,975
Granted Patent B2
US 12,504,975 · App. 18/525,316 · Granted Dec 23, 2025

Efficient utilization of synchronization primitives in a multiprocessor computing system

Inventors: Kevin Cadieux (Port Orchard, WA); Ian M. Bearman (Seattle, WA); Kirsten J. Lee (Redmond, WA); Mohana Tandyala (Fremont, CA); Gabriel Campbell (Redmond, WA)
Assignee: Microsoft Technology Licensing, LLC
G06F9/3838G06F9/5044
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 12,504,975
App. No.
18/525,316
Granted
Dec 23, 2025
Kind
B2
Abstract

A compiler creates a dependency graph for a function in an input program. The dependency graph includes nodes corresponding to commands in the function and edges that correspond to dependencies between the commands. The compiler performs a forward reachability analysis on the dependency graph to eliminate redundant dependencies. The compiler also adds a minimized set of back-edges to the dependency graph to enforce loop-carried resource dependencies in the input program. The compiler then allocates synchronization primitives provided by a multiprocessor computing system, such as semaphores, to the commands in the function of the input program based on the contents of the dependency graph.

Claims (39)

1 . A computer-implemented method, comprising:

minimizing edges in a dependency graph for a function in an input program, the dependency graph comprising nodes corresponding to commands in the function and edges corresponding to dependencies between the nodes;

adding a minimized set of back-edges to the dependency graph to enforce loop-carried resource dependencies in the input program; and

allocating synchronization primitives provided by a multiprocessor computing system to the commands in the function of the input program based on the dependency graph.

2 . The computer-implemented method of claim 1 , wherein the dependencies between the nodes are identified using a shared queue analysis that creates an edge in the dependency graph between a first node corresponding to a first command and a second node corresponding to a second command, the first command and the second command having a same command type.

3 . The computer-implemented method of claim 1 , wherein the dependencies between the nodes are identified using an input/output analysis that creates an edge in the dependency graph between a first node corresponding to a first command that uses a buffer and a second node corresponding to a second command that uses the buffer.

4 . The computer-implemented method of claim 1 , wherein the dependencies between the nodes are identified using an allocation overlap analysis that creates an edge in the dependency graph between a first node corresponding to a first command that uses a range of memory addresses and a second node corresponding to a second command that all or a portion of the range of memory addresses.

5 . The computer-implemented method of claim 1 , wherein minimizing the edges corresponding to the dependencies between the nodes in the dependency graph comprises:

performing a forward reachability analysis on the dependency graph to eliminate one or more dependencies; and

adding edges to the dependency graph for dependencies other than artificial dependencies that remain following the forward reachability analysis.

6 . The computer-implemented method of claim 1 , wherein the minimized set of back-edges comprises a first back-edge from a leaf node in a dependency graph for a loop to a first root node in the dependency graph for the loop and a second back-edge from the leaf node to a second root node in the dependency graph for the loop.

7 . The computer-implemented method of claim 1 , wherein the synchronization primitives provided by a multiprocessor computing system comprise semaphores.

8 . A computer-readable storage medium having computer-executable instructions stored thereupon which, when executed by a processing system, cause the processing system to:

create a dependency graph for a function in an input program, the dependency graph comprising nodes corresponding to commands in the function and edges corresponding to dependencies between the nodes;

eliminate at least one of the edges from the dependency graph;

add at least one back-edge to the dependency graph to enforce a loop-carried resource dependency in the input program; and

allocate synchronization primitives provided by a multiprocessor computing system to the commands in the function of the input program based on the dependency graph.

9 . The computer-readable storage medium of claim 8 , wherein the dependencies between the nodes are identified using a shared queue analysis that creates an edge in the dependency graph between a first node corresponding to a first command and a second node corresponding to a second command, the first command and the second command having a same command type.

10 . The computer-readable storage medium of claim 8 , wherein the dependencies between the nodes are identified using an input/output analysis that creates an edge in the dependency graph between a first node corresponding to a first command that uses a buffer and a second node corresponding to a second command that uses the buffer.

11 . The computer-readable storage medium of claim 8 , wherein the dependencies between the nodes are identified using an allocation overlap analysis that creates an edge in the dependency graph between a first node corresponding to a first command that uses a range of memory addresses and a second node corresponding to a second command that all or a portion of the range of memory addresses.

12 . The computer-readable storage medium of claim 8 , wherein eliminating at least one of the edges from the dependency graph comprises:

performing a forward reachability analysis on the dependency graph to eliminate one or more dependencies; and

adding edges to the dependency graph for dependencies other than artificial dependencies that remain following the forward reachability analysis.

13 . The computer-readable storage medium of claim 8 , wherein the at least one back-edge comprises a back-edge from a leaf node to a root node in the dependency graph.

14 . The computer-readable storage medium of claim 8 , wherein the synchronization primitives provided by a multiprocessor computing system comprise semaphores.

15 . A processing system, comprising:

a processor; and

a computer-readable storage medium having computer-executable instructions stored thereupon that, when executed by the processing system, cause the processing system to:

create a dependency graph for a function in an input program, the dependency graph comprising nodes corresponding to commands in the function and edges corresponding to dependencies between the nodes;

eliminate at least one of the edges from the dependency graph;

add at least one back-edge to the dependency graph to enforce a loop-carried resource dependency in the input program; and

allocate synchronization primitives provided by a multiprocessor computing system to the commands in the function of the input program based on the dependency graph.

16 . The processing system of claim 15 , wherein the dependencies between the nodes are identified using a shared queue analysis that creates an edge in the dependency graph between a first node corresponding to a first command and a second node corresponding to a second command, the first command and the second command having a same command type.

17 . The processing system of claim 15 , wherein the dependencies between the nodes are identified using an input/output analysis that creates an edge in the dependency graph between a first node corresponding to a first command that uses a buffer and a second node corresponding to a second command that uses the buffer.

18 . The processing system of claim 15 , wherein the dependencies between the nodes are identified using an allocation overlap analysis that creates an edge in the dependency graph between a first node corresponding to a first command that uses a range of memory addresses and a second node corresponding to a second command that all or a portion of the range of memory addresses.

19 . The processing system of claim 15 , wherein eliminating at least one of the edges from the dependency graph comprises:

performing a forward reachability analysis on the dependency graph to eliminate one or more dependencies; and

adding edges to the dependency graph for dependencies other than artificial dependencies that remain following the forward reachability analysis.

20 . The processing system of claim 15 , wherein the at least one back-edge comprises a back-edge from a leaf node to a root node in the dependency graph.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 14, 2023
From: CADIEUX, KEVIN; BEARMAN, IAN M.; LEE, KIRSTEN J.; TANDYALA, MOHANA; CAMPBELL, GABRIEL
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 065874/0124 →
Continuity (1)
Related Publication 20250181354A1 · Jun 5, 2025
References Cited (6)
US 11182715B2 · Voorhies · 2021 [cited by examiner]
US 12373441B1 · Bhat · 2025 [cited by examiner]
Dutta, et al., “Synchronization Validation for Cross-Thread Dependences in Parallel Programs”, International Journal of Parallel Programming, vol. 45, Oct. 28, 2016, pp. 1326-1365. [cited by applicant]
International Search Report and Written Opinion received for PCT Application No. PCT/US2024/051693, Jan. 30, 2025, 12 pages. [cited by applicant]
Li, et al., “Fine-Grained Synchronizations and Dataflow Programming on GPUs”, Proceedings of the 29th ACM on International Conference on Supercomputing, Jun. 8, 2015, pp. 109-118. [cited by applicant]
Nicolau, et al., “Techniques for efficient placement of synchronization primitives”, Proceedings of the 14th ACM SIGPLAN symposium on Principles and practice of parallel programming, Feb. 14, 2009, pp. 199-208. [cited by applicant]