US5946711AExpiredUtility

System for locking data in a shared cache

Assignee: ORACLE CORPPriority: May 30, 1997Filed: May 30, 1997Granted: Aug 31, 1999
Est. expiryMay 30, 2017(expired)· nominal 20-yr term from priority
G06F 12/0842G06F 9/52
84
PatentIndex Score
130
Cited by
24
References
34
Claims

Abstract

In a multi-threaded computing system, a locking system is utilized to cooperatively manage a shared cache between a plurality of user threads and a paging manager thread. To manage the locks, the paging manager maintains pointers between a process memory space assigned to each user thread, a global system data structure assigned to each user thread, and a page control block for each locked page in memory. These pointers and additional flags identify locked pages and their owners, and facilitates cleanup of stale locks.

Claims

exact text as granted — not AI-modified
The invention claimed is: 
     
       1. In a computer, a method of managing a virtual memory system, comprising the steps of: storing a block of data in a memory buffer which is locked by a first accessor to access the data stored therein;   from a second accessor, requesting the lock on the memory buffer; in response to the lock request, transferring the lock from the first accessor to the second accessor while the first accessor continues accessing the data stored in the memory buffer; and   allowing the first accessor to continue accessing the data stored in the memory buffer after the second accessor receives ownership of the lock.   
     
     
       2. The method of claim 1 wherein the second accessor locks the memory buffer to swap the stored data out of the memory buffer. 
     
     
       3. The method of claim 1 wherein the first and second accessors are threads in a multi-threaded computing system. 
     
     
       4. The method of claim 1 further comprising the steps of: from the first accessor, requesting data from a block of data; and   in response to a data request, removing an access mechanism between the first accessor and the memory buffer.   
     
     
       5. The method of claim 4 wherein the step of requesting data comprises requesting data from the block of data which is stored in the memory buffer. 
     
     
       6. The method of claim 1 further comprising the steps of: storing lock data for the first accessor in a global memory structure, the lock data including a first data field referencing the memory buffer and a second data field referencing the first accessor; and   storing a private buffer pointer to the memory buffer in a private memory structure of the first accessor.   
     
     
       7. The method of claim 6 wherein the step of transferring the lock comprises modifying a third data field in the global memory structure. 
     
     
       8. The method of claim 6 wherein the step of transferring the lock comprises removing a reference to the global memory structure from a control data field associated with the memory buffer. 
     
     
       9. In a computer, a method of locking a page of data in memory, comprising the steps of: in a computer, allocating a cache memory area having a plurality of buffers, each buffer associated with a respective control block;   storing pages of data in respective buffers;   from a first user accessor having a respective first accessor memory in the computer, requesting a lock on a first buffer;   in response to the lock request, performing locking steps comprising: setting a buffer pointer in the first accessor memory to reference the control block associated with the first buffer;   setting a global accessor pointer associated with the first user accessor to reference the buffer pointer; and   setting an owner pointer in the control block associated with the first buffer to reference a global data field associated with the first user accessor.     
     
     
       10. The method of claim 9 wherein the first user accessor is a thread in a multi-threaded computing system. 
     
     
       11. The method of claim 9 further comprising the step of maintaining the accessibility of buffers by the first user accessor based on a setting of the global data field. 
     
     
       12. The method of claim 11 wherein the step of maintaining comprises clearing the global accessor pointer and the buffer pointer when the owner pointer does not reference the global data field. 
     
     
       13. The method of claim 9 wherein the locking steps are executed by a manager having access to a first block of global memory associated with the first user accessor, the first block of global memory including the global accessor pointer and the global data field. 
     
     
       14. The method of claim 13 wherein the first block of global memory includes a lock list for identifying buffers locked by the first user accessor. 
     
     
       15. The method of claim 12 wherein the lock list includes a list entry for each buffer accessible by the first user accessor, each list entry including a respective global accessor pointer referencing a respective buffer pointer in the first accessor memory. 
     
     
       16. The method of claim 15 further comprising the steps of: locking the first buffer in response to a request from a second user accessor; and   subsequently accessing the first buffer from the first user accessor.   
     
     
       17. A virtual memory system for a computer, comprising: a block of data stored in a memory buffer which is locked by a first accessor to access the data stored therein;   a second accessor requesting the lock on the memory buffer;   a mechanism to transfer the lock from the first accessor to the second accessor while the first accessor continues accessing the data stored in the memory buffer; and   a mechanism to allow the first accessor to continue accessing the data stored in the memory buffer after the second accessor receives ownership of the lock.   
     
     
       18. A computer system for locking a page of data in memory, comprising the steps of: in a computer, a cache memory area having a plurality of buffers, each buffer associated with a respective control block;   pages of data stored in respective buffers;   a locking mechanism responsive to a request to lock a first buffer from a first user accessor having a respective first accessor memory in the computer, the locking mechanism comprising: a buffer pointer in the first accessor memory referencing the control block associated with the first buffer;   a global accessor pointer associated with the first user accessor referencing the buffer pointer; and   an owner pointer in the control block associated with the first buffer referencing a global data field associated with the first user accessor.     
     
     
       19. An article of manufacture comprising: a computer-readable medium for use in a computer having a virtual memory system;   a computer-implementable program recorded on the medium to manage the virtual memory system, the program comprising the steps of: storing a block of data in a memory buffer which is locked by a first accessor to access the data stored therein;   from a second accessor, requesting the lock on the memory buffer;   in response to the lock request, transferring the lock from the first accessor to the second accessor while the first accessor continues accessing the data stored in the memory buffer; and   allowing the first accessor to continue accessing the data stored in the memory buffer after the second accessor receives ownership of the lock.     
     
     
       20. The article of claim 19 wherein the second accessor locks the memory buffer to swap the stored data out of the memory buffer. 
     
     
       21. The article of claim 19 wherein the first and second accessors are threads in a multi-threaded computing system. 
     
     
       22. The article of claim 19 wherein the program further comprises the steps of: from the first accessor, requesting data from a block of data; and   in response to a data request, removing an access mechanism between the first accessor and the memory buffer.   
     
     
       23. The article of claim 22 wherein the step of requesting data comprises requesting data from the block of data which is stored in the memory buffer. 
     
     
       24. The article of claim 19 wherein the program further comprises the steps of: storing lock data for the first accessor in a global memory structure, the lock data including a first data field referencing the memory buffer and a second data field referencing the first accessor; and   storing a private buffer pointer to the memory buffer in a private memory structure of the first accessor.   
     
     
       25. The article of claim 24 wherein the step of transferring the lock comprises modifying a third data field in the global memory structure. 
     
     
       26. The article of claim 24 wherein the step of transferring the lock comprises removing a reference to the global memory structure from a control data field associated with the memory buffer. 
     
     
       27. An article of manufacture comprising: a computer-readable medium for use in a computer;   a computer-implementable program recorded on the medium for locking a page of data in memory, the program comprising the steps of: in a computer, allocating a cache memory area having a plurality of buffers, each buffer associated with a respective control block;     storing pages of data in respective buffers; from a first user accessor having a respective first accessor memory in the computer, requesting a lock on a first buffer;   in response to the lock request, performing locking steps comprising: setting a buffer pointer in the first accessor memory to reference the control block associated with the first buffer;   setting a global accessor pointer associated with the first user accessor to reference the buffer pointer; and   setting an owner pointer in the control block associated with the first buffer to reference a global data field associated with the first user accessor.       
     
     
       28. The article of claim 27 wherein the first user accessor is a thread in a multi-threaded computing system. 
     
     
       29. The article of claim 27 wherein the program further comprises the step of maintaining the accessibility of buffers by the first user accessor based on a setting of the global data field. 
     
     
       30. The article of claim 29 wherein the step of maintaining comprises clearing the global accessor pointer and the buffer pointer when the owner pointer does not reference the global data field. 
     
     
       31. The article of claim 27 wherein the locking steps are executed by a manager having access to a first block of global memory associated with the first user accessor, the first block of global memory including the global accessor pointer and the global data field. 
     
     
       32. The article of claim 31 wherein the first block of global memory includes a lock list for identifying buffers locked by the first user accessor. 
     
     
       33. The article of claim 32 wherein the lock list includes a list entry for each buffer accessible by the first user accessor, each list entry including a respective global accessor pointer referencing a respective buffer pointer in the first accessor memory. 
     
     
       34. The article of claim 33 wherein the program further comprises the steps of: locking the first buffer in response to a request from a second user accessor; and   subsequently accessing the first buffer from the first user accessor.

Join the waitlist — get patent alerts

Track US5946711A — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.