Claims
- 1. A method for selectively controlling locking and unlocking of one or more page frames in a real storage (random access memory) of a data processing system containing one or more central processors (CPUs), said method including the steps of:
- controlling a set of general registers in a CPU by a current user of the CPU having access to one or more user-accessible virtual memory pages of the data processing system,
- setting a lock control field in one of the general registers to one of plural control states for controlling both locked and unlocked states of the one or more user-accessible virtual memory pages,
- selecting by a user one or more of the user-accessible virtual memory pages to be locked and unlocked by providing in a program one or more lock-control (LKPG) instructions having virtual addresses of each user-accessible virtual memory page to be locked and unlocked,
- executing the program provided with the one or more lock-control (LKPG) instructions to lock and unlock the selected virtual memory pages according to the control state of the lock control field, each executed LKPG instruction having one or more virtual address operands for selecting one or more of the virtual memory pages, the execution of each LKPG instruction also comprising the steps of:
- translating each virtual address in the operand of each LKPG instruction to a real address of an associated real page frame backing a virtual page for the translated virtual address in the real storage, a page table entry (PTE) accessed by the translation process containing a lock indicator field for controlling the locked and unlocked state of the associated real page frame in the real storage,
- determining whether said associated real page frame is resident in the real storage by a valid state existing for the PTE, and copying the associated page frame into the real storage if not indicated as being in the real storage; and
- testing the control state of the lock control field during execution of each LKPG instruction, and during the execution of each of the one or more LKPG instructions setting a lock indicator in each associated PTE to the control state of the lock control field to indicate in the PTE a corresponding locked or unlocked state for an associated real page frame to lock and unlock the one or more associated page frames in said real storage during execution of the program.
- 2. The method of claim 1, further including atomically setting the lock indicator during execution of each LKPG instruction.
- 3. The method of claim 2, in which the execution steps for each LKPG instruction include accessing the lock control field in a predetermined general register in the data processing system for which each user program may selectively control the locked and unlocked state of a subset of pages of interest to the user program.
- 4. The method of claim 3, wherein the execution steps for said each LKPG instruction access the virtual address operand contained in one of the general registers.
- 5. The method of claim 4, in which the execution for each LKPG instruction further comprising the steps of:
- creating a first copy of said page table entry and a second copy of said page table entry wherein said first copy and said second copy each contain a copy of said lock indicator located in said page table entry; and
- setting said lock indicator located in said second copy to the state of the lock control bit.
- 6. The method of claim 1 for selectively controlling the lock/unlock state of a predetermined set of pages in the virtual memory of a data processing system, wherein said determining step includes testing a page invalid bit in said page table entry for a valid state which indicates said page is resident in real storage.
- 7. A method for unlocking a preselected virtual memory page of real storage of a data processing system using the method in claim 1, said method for executing each LKPG instruction further including the steps of:
- setting the lock control field to an unlocked control state prior to executing the user program;
- executing each LKPG instruction in the user program for each page frame to be unlocked for a the subset of pages controlled by the user program in real storage by:
- using an interlocked-update operation for each LKPG instruction in the user program to set the lock indicator in each accessed PTE to the unlocked state of the lock control field for each selected associated page frame resident in real storage.
- 8. A method for fixing a virtual memory page in real storage during execution of a user program in a data processing system using the method in claim 1, said method including the steps of:
- setting the lock control field to a locked state prior to executing the user program;
- executing the set of LKPG instructions in the user program by:
- using an interlocked-update operation to set said lock indicator in each PTE each selected virtual memory page to the locked state of the lock control field.
Parent Case Info
This application is a continuation of application Ser. No. 07/886,273, filed May 20, 1992, now abandoned.
US Referenced Citations (15)
Non-Patent Literature Citations (2)
Entry |
Enterprise Systems Architecture/390, Principles of Operation, SA22-7201-00, IBM Corporation. |
IBM Technical Disclosure Bulletin, vol. 24, No. 3, Aug. 1981, "The Page and Segment Locking Schema", pp. 1586-1587. |
Continuations (1)
|
Number |
Date |
Country |
Parent |
886273 |
May 1992 |
|