Technique for using shared resources on a multi-threaded processor
First Claim
1. A method of handling conflicts between threads, including an initiating thread and at least one other thread, for at least one shared resource in a multi-threaded processing system having a processor and memory, comprising:
- (1) with the initiating thread, setting a location in memory for each other thread on the processor;
(2) with the initiating thread, signaling an inter-processor interrupt (IPI) to all other threads on the processor;
(3) for each other thread, initiating an interrupt handler where each other thread;
(a) acknowledges receipt of the interrupt; and
(b) proceeds to spin on the respective location in memory that was set in step (1), thereby guaranteeing that the respective other thread will not be using any shared resource of the processor;
(4) the initiating thread;
(a) waits for other threads on processor to acknowledge the inter-processor interrupt (IPI); and
(b) when all the other threads have acknowledged the inter-processor interrupt (IPI), the initiating thread proceeds to step (5);
(5) the initiating thread;
(a) saves the state of the shared resource in memory;
(b) sets the shared resource to the state wanted;
(c ) uses the shared resource; and
(d) restores the original state of the resource;
(6) the initiating thread releases the other threads from their spin by resetting the location in memory that was set in step (1); and
(7) all the threads proceed with their computations.
1 Assignment
0 Petitions
Accused Products
Abstract
A method of handling conflicts between threads, including an initiating thread and at least one other thread, for at least one shared resource in a multi-threaded processing system having a processor and memory includes setting a location in memory for each other thread on the processor with the initiating thread. The initiating thread signals an inter-processor interrupt (IPI) to all other threads on the processor. For each other thread, an interrupt handler is initiated where each other thread: acknowledges receipt of the interrupt, and proceeds to spin on the respective location in memory that was set, thereby guaranteeing that the respective other thread will not be using any shared resource of the processor. The initiating thread waits for other threads on processor to acknowledge the inter-processor interrupt (IPI), and when all the other threads have acknowledged the inter-processor interrupt (IPI), the initiating thread proceeds to save the state of the shared resource in memory, sets the shared resource to the state wanted, uses the shared resource, and restores the original state of the resource. The initiating thread then releases the other threads from their spin by resetting the location in memory that was set above. All the threads then proceed with their computations.
30 Citations
18 Claims
-
1. A method of handling conflicts between threads, including an initiating thread and at least one other thread, for at least one shared resource in a multi-threaded processing system having a processor and memory, comprising:
-
(1) with the initiating thread, setting a location in memory for each other thread on the processor;
(2) with the initiating thread, signaling an inter-processor interrupt (IPI) to all other threads on the processor;
(3) for each other thread, initiating an interrupt handler where each other thread;
(a) acknowledges receipt of the interrupt; and
(b) proceeds to spin on the respective location in memory that was set in step (1), thereby guaranteeing that the respective other thread will not be using any shared resource of the processor;
(4) the initiating thread;
(a) waits for other threads on processor to acknowledge the inter-processor interrupt (IPI); and
(b) when all the other threads have acknowledged the inter-processor interrupt (IPI), the initiating thread proceeds to step (5);
(5) the initiating thread;
(a) saves the state of the shared resource in memory;
(b) sets the shared resource to the state wanted;
(c ) uses the shared resource; and
(d) restores the original state of the resource;
(6) the initiating thread releases the other threads from their spin by resetting the location in memory that was set in step (1); and
(7) all the threads proceed with their computations. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
Specification