Framework for executing multiple threads and sharing resources in a multithreaded computer programming environment
First Claim
1. A method of protecting a shared resource in a multithreaded computing environments where multiple threads of execution (threads) can access said shared resource, said method comprising:
- associating a first thread of execution (first thread) with a first thread-specific execution context (first Worker) that can effectively provide the execution context for executing operational computer code for said first thread when said first thread effectively activates said operational code for execution;
associating a first shared resource with a first Exclusion Area (first EA) provided as logical lock to effectively protect said first shared resource from multiple threads that may try to access said shared resource at the same time;
determining whether said first Worker associated with said first thread is trying to visit (or enter) said first Exclusion Area (first EA), thereby determining whether said first thread is attempting to access said first shared resource effectively protected by said first Exclusion Area (first EA);
determining whether said first Exclusion Area (first EA) is being visited by another Worker associated with another thread when said determining determines that said first Worker is trying to visit said first Exclusion Area (first EA); and
not allowing said first Worker to visit said first Exclusion Area (first EA) when said determining determines that said first Exclusion Area (first EA) is being visited by said another Worker, thereby effectively preventing said first thread from accessing said first shared resource when said first shared resource is being accessed by said another thread.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques for execution of multiple threads in a multithreaded computing programming environment are disclosed. The techniques are especially well suited for environments that use multilayered programming architecture where a higher layer can build on the functions provided by a lower layer where the delay time is an important consideration. In one aspect, the conceptual notion of a “Worker” effectively serves to represent the thread-specific execution context for a thread of execution (“thread”) in a multithreaded computing environment. Another aspect, provides the notion of an Exclusion Area (EA) as logical lock that serves to protect shared resources in a multithreaded environment. The combination of the worker and EA are used to provide a powerful framework that, among other things, allows minimizing of the delay time.
55 Citations
13 Claims
-
1. A method of protecting a shared resource in a multithreaded computing environments where multiple threads of execution (threads) can access said shared resource, said method comprising:
-
associating a first thread of execution (first thread) with a first thread-specific execution context (first Worker) that can effectively provide the execution context for executing operational computer code for said first thread when said first thread effectively activates said operational code for execution; associating a first shared resource with a first Exclusion Area (first EA) provided as logical lock to effectively protect said first shared resource from multiple threads that may try to access said shared resource at the same time; determining whether said first Worker associated with said first thread is trying to visit (or enter) said first Exclusion Area (first EA), thereby determining whether said first thread is attempting to access said first shared resource effectively protected by said first Exclusion Area (first EA); determining whether said first Exclusion Area (first EA) is being visited by another Worker associated with another thread when said determining determines that said first Worker is trying to visit said first Exclusion Area (first EA); and not allowing said first Worker to visit said first Exclusion Area (first EA) when said determining determines that said first Exclusion Area (first EA) is being visited by said another Worker, thereby effectively preventing said first thread from accessing said first shared resource when said first shared resource is being accessed by said another thread. - View Dependent Claims (8, 9, 10, 11, 13)
-
-
2. A method as recited in 1, wherein said method further comprises:
- allowing said first Worker to visit said first Exclusion Area (first EA) when said determining determines that said first Exclusion Area (first EA) is not being visited by said another Worker, thereby effectively allowing said first thread to access said first shared resource when said first shared resource is not being accessed by said another thread.
- View Dependent Claims (3, 4, 5, 6, 7)
-
12. A non-transitory computer readable medium storing computer program code executed by a processor for protecting a shared resource in a multithreaded computing environments where multiple threads of execution (threads) can access said shared resource, said computer readable medium comprising:
-
computer program code for associating a first thread of execution (first thread) with a first thread-specific execution context (first Worker) that can effectively provide the execution context for executing operational computer code for said first thread when said first thread effectively activates said operational code for execution; computer program code for associating a first shared resource with a first Exclusion Area (first EA) provided as logical lock to effectively protect said first shared resource from multiple threads that may try to access said shared resource at the same time; computer program code for determining whether said first Worker associated with said first thread is trying to visit (or enter) said first Exclusion Area (first EA), thereby determining whether said first thread is attempting to access said first shared resource effectively protected by said first Exclusion Area (first EA); computer program code for determining whether said first Exclusion Area (first EA) is being visited by another Worker associated with another thread when said determining determines that said first Worker is trying to visit said first Exclusion Area (first EA); and computer program code for not allowing said first Worker to visit said first Exclusion Area (first EA) when said determining determines that said first Exclusion Area (first EA) is being visited by said another Worker, thereby effectively preventing said first thread form accessing said first shared resource when said first shared resource is being accessed by said another thread.
-
Specification