Legal claims defining the scope of protection, as filed with the USPTO.
1. A method comprising: requesting a creation of a new thread by the process; allocating a new page table directory in a memory descriptor and creating a copy of an existing page table of at least one existing thread; granting access to a page to a first thread, wherein the access granted to the page by the first thread and any subsequent threads is mutually exclusive; modifying a page-present bit associated with an allocation of the page in physical memory in response to the granting access to a page to a first thread such that a page fault interrupt is generated when a second thread attempts to access the page by at least: setting the page-present bit associated with an allocation of the page in physical memory for the first thread to a first value in response to the granting access to a page to the first thread; and setting the page-present bit associated with an allocation of the page in physical memory for the second thread to a second value in response to the granting access to a page to the first thread; determining whether the page is present in memory and is writable when the page fault is generated, wherein whether the page is present in memory and is writable are indicated by two bits; and when the page is present in memory and is writable and the first thread is determined to be about to exit, granting to the second thread an access to the page and setting the two bits indicating that the page is present in memory and is writable, wherein the thread exit operation of a kernel is modified to release a page directory and a page table hierarchy associated with the exiting thread.
2. The method of claim 1 further comprising: after the step of determining whether a page is present in memory and is writable, if the page is not present or not writable, letting a kernel handle-the page fault; determining whether a new page after its creation by the kernel is writable by testing a corresponding bit, resetting a present bit of the new page if the new page is writable, propagating a page table entry created by the kernel to other page tables of all threads; and going to the step waiting for an event.
3. The method of claim 1 , further comprising: when a thread is scheduled, switching a hardware context of the memory to a page table of the thread which is going to be scheduled.
4. The method of claim 1 , further comprising: when a thread exits, releasing a page directory for this thread; and ending the memory access control for this thread.
5. The method of claim 1 , wherein the step of allocating a new page table directory in the memory descriptor and creating a copy of the existing page table of the at least one existing thread is performed only for the first thread, and the method further comprising: resetting page present flags of all the pages that have writable bits set.
6. The method of claim 3 wherein the step of switching the hardware context of the memory to the page table of the thread to be scheduled comprises: switching the hardware context of the memory to the existing page table if the thread has access to the address space; and switching the hardware context of the memory to a newly created page directory if the thread does not have access to the address space.
7. The method of claim 4 wherein the step of releasing the page directory when a thread exits comprises: when there is only one more thread left in the process, releasing the new-page directory.
8. The method of claim 1 , further comprising: incrementing a usage counter associated with the page in response to the modifying a page-present bit.
9. The method of claim 1 , wherein the setting the page-present bit associated with an allocation of the page in physical memory for the first thread to a first value and the setting the page-present bit associated with an allocation of the page in physical memory for the second thread to a second value occur at least partially simultaneously.
10. A system comprising: at least one computing device; and one or more instructions that, when implemented in the at least one computing device, configure the at least one computing device for: requesting a creation of a new thread by the process; allocating a new page table directory in a memory descriptor and creating a copy of an existing page table of at least one existing thread; granting access to a page to a first thread, wherein the access granted to the page by the first thread and any subsequent threads is mutually exclusive over an entire duration; modifying a page-present bit associated with an allocation of the page in physical memory in response to the granting access to a page to a first thread such that a page fault interrupt is generated when a second thread attempts to access the page by at least: setting the page-present bit associated with an allocation of the page in physical memory for the first thread to a first value in response to the granting access to a page to the first thread; and setting the page-present bit associated with an allocation of the page in physical memory for the second thread to a second value in response to the granting access to a page to the first thread; determining whether the page is present in memory and is writable when the page fault is generated, wherein whether the page is present in memory and is writable are indicated by two bits; when the page is present in memory and is writable and the first thread is determined to be about to exit, granting to the second thread an access to the page and setting the two bits indicating that the page is present in memory and is writable, wherein the thread exit operation of a kernel is modified to release page directory and a page table hierarchy associated with the exiting thread.
11. A system comprising: means for requesting a creation of a new thread by the process; means for allocating a new page table directory in a memory descriptor and creating a copy of an existing page table of at least one existing thread; means for granting access to a page to a first thread, wherein the access granted to the page by the first thread and any subsequent threads is mutually exclusive over an entire duration; means for modifying a page-present bit associated with an allocation of the page in physical memory in response to the granting access to a page to a first thread such that a page fault interrupt is generated when a second thread attempts to access the page by at least: setting the page-present bit associated with an allocation of the page in physical memory for the first thread to a first value in response to the granting access to a page to the first thread; and setting the page-present bit associated with an allocation of the page in physical memory for the second thread to a second value in response to the granting access to a page to the first thread; means for determining whether the page is present in memory and is writable when the page fault is generated, wherein whether the page is present in memory and is writable are indicated by two bits; means for, when the page is present in memory and is writable and the first thread is determined to be about to exit, granting to the second thread an access to the page and setting the two bits indicating that the page is present in memory and is writable, wherein the thread exit operation of a kernel is modified to release page directory and a page table hierarchy associated with the exiting thread.
Unknown
October 20, 2015
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.