Non-blocking caching technique
First Claim
1. A method performed by executing software instructions with a processor, the method comprising:
- receiving lookup requests from calling threads to obtain requested data items from a software cache data structure having a plurality of slots;
mapping the requested data items to individual slots of the software cache data structure based on characteristics of the requested data items;
performing access checks to determine whether the individual slots of the software cache data structure are being used by other threads; and
after performing the access checks, selectively checking whether the requested data items are stored in the individual slots of the software cache data structure based on whether the individual slots are being used by the other threads, the selectively checking comprising;
for first lookup requests from first calling threads where the individual slots are being used by the other threads, returning to the first calling threads without checking whether corresponding requested first data items are stored in the software cache data structure, andfor second lookup requests from second calling threads where the individual slots are not being used by the other threads, checking whether corresponding requested second data items are stored in the software cache data structure.
3 Assignments
0 Petitions
Accused Products
Abstract
The described implementations relate to processing of electronic data. One implementation is manifested as a system that can include a cache module and at least one processing device configured to execute the cache module. The cache module can be configured to store data items in slots of a cache structure, receive a request for an individual data item that maps to an individual slot of the cache structure, and, when the individual slot of the cache structure is not available, return without further processing the request. For example, the request can be received from a calling application or thread that can proceed without blocking irrespective of whether the request is fulfilled by the cache module.
-
Citations
20 Claims
-
1. A method performed by executing software instructions with a processor, the method comprising:
-
receiving lookup requests from calling threads to obtain requested data items from a software cache data structure having a plurality of slots; mapping the requested data items to individual slots of the software cache data structure based on characteristics of the requested data items; performing access checks to determine whether the individual slots of the software cache data structure are being used by other threads; and after performing the access checks, selectively checking whether the requested data items are stored in the individual slots of the software cache data structure based on whether the individual slots are being used by the other threads, the selectively checking comprising; for first lookup requests from first calling threads where the individual slots are being used by the other threads, returning to the first calling threads without checking whether corresponding requested first data items are stored in the software cache data structure, and for second lookup requests from second calling threads where the individual slots are not being used by the other threads, checking whether corresponding requested second data items are stored in the software cache data structure. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computing device comprising:
-
a processor; and a memory or storage device storing software instructions which, when executed by the processor, cause the processor to; receive an insertion request from a calling thread to insert a data item into a software cache data structure having a plurality of slots; map the data item to an individual slot of the software cache data structure by applying a hashing function to an identifier of the data item to obtain a hash value, the individual slot being identified by bits of the hash value; perform an access check to determine whether the individual slot of the software cache data structure is available; and in an instance when the individual slot is not available, return to the calling thread without inserting the data item into the software cache data structure, wherein the software cache data structure has a number of slots that is based on a number of the bits of the hash value that are used to identify the individual slot. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A system comprising:
-
a cache module comprising software instructions; a processor configured to execute the software instructions of the cache module; and a memory or storage, wherein the software instructions of the cache module cause the processor to; store a plurality of data items in a plurality of slots of a cache data structure, the cache data structure being stored in the memory or storage; receive, from a calling thread, a lookup request to retrieve a requested data item that maps to an individual slot of the cache data structure; perform an access check to determine whether the individual slot is in use; when the access check indicates the individual slot is not in use, check whether the requested data item is present in the cache data structure; and when the access check indicates the individual slot is in use, return to the calling thread without checking whether the requested data item is present in the cache data structure. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification