Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Distinguishing Between Short Term and Long Term Pins of Pages in Virtual Memory During I/O

IP.com Disclosure Number: IPCOM000062433D
Original Publication Date: 1986-Nov-01
Included in the Prior Art Database: 2005-Mar-09
Document File: 2 page(s) / 14K

Publishing Venue

IBM

Related People

O'Quin, JC: AUTHOR [+3]

Abstract

By distinguishing between "Short Term" pins, where a page in virtual memory will be unpinned after the I/O completes, and "Long Term" pins, where the page may or may not be unpinned ever, it is possible to prevent a process, or several processes, from pinning all of real memory and deadlocking the system. In a Virtual Storage environment supported by demand paging, when it is necessary for an I/O device to write or read a particular page in virtual memory, it is necessary to "Pin" that page in memory. This prevents the page replacement mechanism from paging the page out. Most I/O devices require a page to be resident while it is being accessed in order to function properly. There are other reasons to pin pages in the system, e.g., to improve performance in certain critical paths.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 51% of the total text.

Page 1 of 2

Distinguishing Between Short Term and Long Term Pins of Pages in Virtual Memory During I/O

By distinguishing between "Short Term" pins, where a page in virtual memory will be unpinned after the I/O completes, and "Long Term" pins, where the page may or may not be unpinned ever, it is possible to prevent a process, or several processes, from pinning all of real memory and deadlocking the system. In a Virtual Storage environment supported by demand paging, when it is necessary for an I/O device to write or read a particular page in virtual memory, it is necessary to "Pin" that page in memory. This prevents the page replacement mechanism from paging the page out. Most I/O devices require a page to be resident while it is being accessed in order to function properly. There are other reasons to pin pages in the system, e.g., to improve performance in certain critical paths. The ability to pin pages introduces the problem of potential excessive demand on a finite resource, and all the requests for it could not be granted. In the UNIX* operating system, there is the notion of "Raw I/O". In this case, data is transferred from or to a user buffer of an arbitrary length. This buffer must be pinned at the initiation of each I/O and unpinned when the I/O completes, i.e., dynamically pinned and unpinned. A deadlock could easily be introduced into the system performing large transfers at a time into a buffer larger than the amount of free real memory. The solution to this problem is to distinguish between short term and long term pins. This is done by placing a lower limit for each on the number of non-long term pinned frames that there must be in the system to grant short term and long term pin requests. What is meant by "non-long term" pinned frames is all unpinned frames and short term pinned frames. If a particular pin request would cause there to be fewer non-long term pinned frames than is acceptable, for that type of request (short or long), then that request is rejected; i.e., no frames are pinned, and a return code indicating this is sent back to the caller. The caller may, if desired, submit the pin request again later, in the hope that pages will have been unpinned by other processes in the interim. The caller may also not be able to proceed without the pages and may not be in the position to wait for storage to free up. In this case, the caller may wish to terminate; this is better than deadlocking the system because some useful work may still be able to be done by other processes. The major differences between long and short term pins may be viewed as follows: 1. The duration of a long term pin is unknown. The page may never be unpinned.
2. A short term pin will be unpinned after a reasonably short duration, i.e., after a disk I/O completes. The above observations lead to a different treatment...