Shared Resource Lock and Expiration Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In software applications with multiple worker threads accessing shared resources like security tokens, inefficiencies arise when tokens are unavailable or expired, leading to resource contention, duplication of effort, and increased costs due to simultaneous token acquisition or refresh attempts.
Innovation Solution
Implementing a shared object with a lock and expiration time management mechanism, where threads coordinate to acquire or refresh the resource cooperatively, allowing one thread to lock, acquire, and update the resource, and then release it for others to use, and selecting a thread to refresh the resource when it's close to expiring.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If worker threads autonomously manage shared resources independently, then each thread can access resources without coordination overhead, but resource contention and duplication of effort increase significantly
Solution Approach 1:
The patent introduces a shared object as an intermediary between worker threads and shared resources. This shared object coordinates access by allowing threads to check resource availability and expiration status centrally, then selectively acquire or refresh tokens. The shared object mediates the conflict between autonomous thread operation and coordinated resource management, enabling threads to work independently while avoiding duplication of token acquisition efforts.
2Adaptability or versatility
If multiple threads attempt to acquire or refresh tokens simultaneously when resources are unavailable, then thread autonomy is maintained, but resource contention and load spikes occur
Solution Approach 1:
The patent implements preliminary action by having threads check the shared object's resource availability and expiration status before attempting token acquisition. Threads can see in advance whether a resource is already being acquired or refreshed by another thread, or whether a valid token is already available. This preliminary check prevents simultaneous token acquisition attempts, reducing resource contention and load spikes while maintaining thread independence.
3Ease of operation
If threads duplicate token acquisition and refresh efforts, then individual thread functionality is preserved, but computing resource usage and costs increase
Solution Approach 1:
The patent merges the token management functionality of multiple independent threads into a single coordinated operation through the shared object. When one thread acquires or refreshes a token, the shared object stores this information and makes it available to all other threads. This merging eliminates redundant token acquisition and refresh operations across the thread pool, significantly reducing computing resource consumption and associated costs while preserving each thread's ability to access shared resources.
Data Source
AI summary
Threads of a process require a shared resource to perform their work. The threads have a shared object, which might include a lock and an expiration time. When the resource has not been acquired and any one of the threads attempts to access the shared resource, that thread locks the lock, acquires the shared resource, sets the expiration time, releases the lock, and then uses the shared resource to perform its work. When any one of the threads requires the resource and the resource has been acquired but the expiration time is within a time threshold, only that thread refreshes the resource, resets the expiration time, and uses the resource to perform its work. When any of the threads require the resource and the resource is available and not expired, the thread uses the shared resource.


