Wait-free parallel data cache
AssigneeSap SE
InventorIvan Schreter
Life of this patent
Estimating the term…
Abstract
A system and method for managing a data cache in a central processing unit (CPU) of a database system. A method executed by a system includes the processing steps of adding an ID of a page p into a page holder queue of the data cache, executing a memory barrier store-load operation on the CPU, and looking-up page p in the data cache based on the ID of the page p in the page holder queue. The method further includes the steps of, if page p is found, accessing the page p from the data cache, and adding the ID of the page p into a least-recently-used queue.
Claims15
A method for managing a data cache in a central processing unit (CPU) of a database system, the method comprising:
- locking a least-recently-used (LRU) queue of the data cache;
- selecting a number of pages from the LRU queue;
- marking a set of the selected number of pages with an expiration flag;
- unlocking the LRU queue;
- loading a list of used pages from the selected number of pages that have been marked for expiration;
- for each page p in the selected number of pages, removing the expiration flag if the page p is contained in the list of used pages and removing this page from a list of the selected number of pages;
- and
- locking the LRU queue and removing pages with an expiration flag from the LRU queue.
A computer program product comprising a machine-readable non-transitory medium storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising:
- lock a least-recently-used (LRU) queue of a data cache in a central processing unit (CPU) of a database system;
- select a number of pages from the LRU queue;
- mark a set of the selected number of pages with an expiration flag;
- unlock the LRU queue;
- load a list of used pages from the selected number of pages that have been marked for expiration;
- for each page p in the selected number of pages, remove the expiration flag if the page p is contained in the list of used pages and removing this page from a list of the selected number of pages;
- and
- lock the LRU queue and removing pages with an expiration flag from the LRU queue.
A method for managing a data cache in a central processing unit (CPU) of a database system, the method comprising:
- locking a least-recently-used (LRU) queue of the data cache;
- selecting a number of pages from the LRU queue to be marked with an expiration flag;
- unlocking the LRU queue;
- for each page p in the selected number of pages that have been marked with the expiration flag, removing the expiration flag if the page p is contained in the list of used pages and removing this page from a list of the selected number of pages;
- and loading the selected number of pages into the data cache in the CPU;
- and locking the LRU queue;
- and removing any pages with an expiration flag from the LRU queue.
Dependencies are inferred from the claim text.