📄 0.t
字号:
.\" Copyright (c) 1986 The Regents of the University of California..\" All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" @(#)0.t 5.1 (Berkeley) 4/16/91.\".rm CM.TLA New Virtual Memory Implementation for Berkeley.UX.AUMarshall Kirk McKusickMichael J. Karels.AIComputer Systems Research GroupComputer Science DivisionDepartment of Electrical Engineering and Computer ScienceUniversity of California, BerkeleyBerkeley, California 94720.ABWith the cost per byte of memory approaching that of the cost per bytefor disks, and with file systems increasingly distant from the hostmachines, a new approach to the implementation of virtual memory isnecessary. Rather than preallocating swap space which limits themaximum virtual memory that can be supported to the size of the swaparea, the system should support virtual memory up to the sum of thesizes of physical memory plus swap space. For systems with a local swapdisk, but remote file systems, it may be useful to use some of the memoryto keep track of the contents of the swap space to avoid multiple fetchesof the same data from the file system..PPThe new implementation should also add new functionality. Processesshould be allowed to have large sparse address spaces, to map filesinto their address spaces, to map device memory into their addressspaces, and to share memory with other processes. The shared addressspace may either be obtained by mapping a file into (possiblydifferent) parts of their address space, or by arranging to share``anonymous memory'' (that is, memory that is zero fill on demand, andwhose contents are lost when the last process unmaps the memory) withanother process as is done in System V..PPOne use of shared memory is to provide a high-speedInter-Process Communication (IPC) mechanism between two or morecooperating processes. To insure the integrity of data structuresin a shared region, processes must be able to use semaphores tocoordinate their access to these shared structures. In System V,these semaphores are provided as a set of system calls. Unfortunately,the use of system calls reduces the throughput of the shared memoryIPC to that of existing IPC mechanisms. We are proposing a schemethat places the semaphores in the shared memory segment, so thatmachines that have a test-and-set instruction can handle the usualuncontested lock and unlock without doing a system call. Only inthe unusual case of trying to lock an already-locked lock or inreleasing a wanted lock will a system call be required. Theinterface will allow a user-level implementation of the System Vsemaphore interface on most machines with a much lower runtime cost..AE.LP.bp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -