1*2e520600Scheloha.\" $OpenBSD: uvm_init.9,v 1.7 2023/06/21 21:16:21 cheloha Exp $ 28f128fcdSmpi.\" $NetBSD: uvm.9,v 1.14 2000/06/29 06:08:44 mrg Exp $ 38f128fcdSmpi.\" 48f128fcdSmpi.\" Copyright (c) 1998 Matthew R. Green 58f128fcdSmpi.\" All rights reserved. 68f128fcdSmpi.\" 78f128fcdSmpi.\" Redistribution and use in source and binary forms, with or without 88f128fcdSmpi.\" modification, are permitted provided that the following conditions 98f128fcdSmpi.\" are met: 108f128fcdSmpi.\" 1. Redistributions of source code must retain the above copyright 118f128fcdSmpi.\" notice, this list of conditions and the following disclaimer. 128f128fcdSmpi.\" 2. Redistributions in binary form must reproduce the above copyright 138f128fcdSmpi.\" notice, this list of conditions and the following disclaimer in the 148f128fcdSmpi.\" documentation and/or other materials provided with the distribution. 158f128fcdSmpi.\" 168f128fcdSmpi.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 178f128fcdSmpi.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 188f128fcdSmpi.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 198f128fcdSmpi.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 208f128fcdSmpi.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 218f128fcdSmpi.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 228f128fcdSmpi.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 238f128fcdSmpi.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 248f128fcdSmpi.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 258f128fcdSmpi.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 268f128fcdSmpi.\" SUCH DAMAGE. 278f128fcdSmpi.\" 288f128fcdSmpi.\" XXX this manual sets nS to 1 or 0 in the description, to obtain 298f128fcdSmpi.\" synopsis-like function prototypes. any better way? 308f128fcdSmpi.\" 31*2e520600Scheloha.Dd $Mdocdate: June 21 2023 $ 328f128fcdSmpi.Dt UVM_INIT 9 338f128fcdSmpi.Os 348f128fcdSmpi.Sh NAME 358f128fcdSmpi.Nm uvm_init , 368f128fcdSmpi.Nm uvm_init_limits , 378f128fcdSmpi.Nm uvm_setpagesize , 388f128fcdSmpi.Nm uvm_swap_init , 398f128fcdSmpi.Nm uvm_io , 408f128fcdSmpi.Nm uvm_pageout , 418f128fcdSmpi.Nm uao_create , 428f128fcdSmpi.Nm uao_detach , 438f128fcdSmpi.Nm uao_reference , 448f128fcdSmpi.Nm uvm_chgkprot , 458f128fcdSmpi.Nm uvm_kernacc , 468f128fcdSmpi.Nm uvm_meter , 478f128fcdSmpi.Nm uvm_sysctl , 488f128fcdSmpi.Nm uvm_grow , 49b22a9f75Sguenther.Nm uvm_coredump_walkmap 508f128fcdSmpi.Nd virtual memory system external interface 518f128fcdSmpi.Sh SYNOPSIS 528f128fcdSmpi.In sys/param.h 538f128fcdSmpi.In uvm/uvm.h 548f128fcdSmpi.Sh DESCRIPTION 558f128fcdSmpiThe UVM virtual memory system manages access to the computer's memory 568f128fcdSmpiresources. 578f128fcdSmpiUser processes and the kernel access these resources through 588f128fcdSmpiUVM's external interface. 598f128fcdSmpiUVM's external interface includes functions that: 608f128fcdSmpi.Pp 618f128fcdSmpi.Bl -hyphen -compact 628f128fcdSmpi.It 638f128fcdSmpiinitialise UVM subsystems 648f128fcdSmpi.It 658f128fcdSmpimanage virtual address spaces 668f128fcdSmpi.It 678f128fcdSmpiresolve page faults 688f128fcdSmpi.It 698f128fcdSmpimemory map files and devices 708f128fcdSmpi.It 718f128fcdSmpiperform uio-based I/O to virtual memory 728f128fcdSmpi.It 738f128fcdSmpiallocate and free kernel virtual memory 748f128fcdSmpi.It 758f128fcdSmpiallocate and free physical memory 768f128fcdSmpi.El 778f128fcdSmpi.Pp 788f128fcdSmpiIn addition to exporting these services, UVM has two kernel-level processes: 798f128fcdSmpipagedaemon and swapper. 808f128fcdSmpiThe pagedaemon process sleeps until physical memory becomes scarce. 818f128fcdSmpiWhen that happens, pagedaemon is awoken. 828f128fcdSmpiIt scans physical memory, paging out and freeing memory that has not been 838f128fcdSmpirecently used. 848f128fcdSmpiThe swapper process swaps in runnable processes that are currently swapped out, 858f128fcdSmpiif there is room. 868f128fcdSmpi.Pp 878f128fcdSmpiUVM has a machine independent and a machine dependent layer. 888f128fcdSmpiSee 898f128fcdSmpi.Xr pmap 9 908f128fcdSmpifor the machine dependent layer. 918f128fcdSmpi.Sh INITIALISATION 928f128fcdSmpi.nr nS 1 938f128fcdSmpi.Ft void 948f128fcdSmpi.Fn uvm_init "void" 958f128fcdSmpi.Ft void 968f128fcdSmpi.Fn uvm_init_limits "struct plimit *limit0" 978f128fcdSmpi.Ft void 988f128fcdSmpi.Fn uvm_setpagesize "void" 998f128fcdSmpi.Ft void 1008f128fcdSmpi.Fn uvm_swap_init "void" 1018f128fcdSmpi.nr nS 0 1028f128fcdSmpi.Pp 1038f128fcdSmpiThe 1048f128fcdSmpi.Fn uvm_init 1058f128fcdSmpifunction sets up the UVM system at system boot time, after the 1068f128fcdSmpicopyright has been printed. 1078f128fcdSmpiIt initialises global state, the page, map, kernel virtual memory state, 1088f128fcdSmpimachine-dependent physical map, kernel memory allocator, 1098f128fcdSmpipager and anonymous memory subsystems, and then enables 1108f128fcdSmpipaging of kernel objects. 1118f128fcdSmpi.Fn uvm_init 1128f128fcdSmpimust be called after machine-dependent code has registered some free RAM 1138f128fcdSmpiwith the 1148f128fcdSmpi.Fn uvm_page_physload 1158f128fcdSmpifunction. 1168f128fcdSmpi.Pp 1178f128fcdSmpiThe 1188f128fcdSmpi.Fn uvm_init_limits 1198f128fcdSmpifunction initialises process limits in the given limit structure. 1208f128fcdSmpiThis is for use by the system startup for process zero, before any other 1218f128fcdSmpiprocesses are created. 1228f128fcdSmpi.Pp 1238f128fcdSmpiThe 1248f128fcdSmpi.Fn uvm_setpagesize 1258f128fcdSmpifunction initialises the uvmexp members pagesize (if not already done by 1268f128fcdSmpimachine-dependent code), pageshift and pagemask. 1278f128fcdSmpiIt should be called by machine-dependent code early in the 1288f128fcdSmpi.Xr pmap_init 9 1298f128fcdSmpicall. 1308f128fcdSmpi.Pp 1318f128fcdSmpiThe 1328f128fcdSmpi.Fn uvm_swap_init 1338f128fcdSmpifunction initialises the swap subsystem. 1348f128fcdSmpi.Sh VIRTUAL MEMORY I/O 1358f128fcdSmpi.nr nS 1 1368f128fcdSmpi.Ft int 1378f128fcdSmpi.Fn uvm_io "vm_map_t map" "struct uio *uio" 1388f128fcdSmpi.nr nS 0 1398f128fcdSmpi.Pp 1408f128fcdSmpiThe 1418f128fcdSmpi.Fn uvm_io 1428f128fcdSmpifunction performs the I/O described in 1438f128fcdSmpi.Fa uio 1448f128fcdSmpion the memory described in 1458f128fcdSmpi.Fa map . 1468f128fcdSmpi.Sh PROCESSES 1478f128fcdSmpi.nr nS 1 1488f128fcdSmpi.Ft void 1498f128fcdSmpi.Fn uvm_pageout "void *arg" 1508f128fcdSmpi.nr nS 0 1518f128fcdSmpi.Pp 1528f128fcdSmpiThe 1538f128fcdSmpi.Fn uvm_pageout 1548f128fcdSmpifunction is the main loop for the page daemon. 1558f128fcdSmpiThe 1568f128fcdSmpi.Fa arg 1578f128fcdSmpiargument is ignored. 1588f128fcdSmpi.Sh MISCELLANEOUS FUNCTIONS 1598f128fcdSmpi.nr nS 1 1608f128fcdSmpi.Ft struct uvm_object * 1618f128fcdSmpi.Fn uao_create "vsize_t size" "int flags" 1628f128fcdSmpi.Ft void 1638f128fcdSmpi.Fn uao_detach "struct uvm_object *uobj" 1648f128fcdSmpi.Ft void 1658f128fcdSmpi.Fn uao_reference "struct uvm_object *uobj" 1668f128fcdSmpi.Ft boolean_t 1678f128fcdSmpi.Fn uvm_chgkprot "caddr_t addr" "size_t len" "int rw" 1688f128fcdSmpi.Ft void 1698f128fcdSmpi.Fn uvm_kernacc "caddr_t addr" "size_t len" "int rw" 1708f128fcdSmpi.Ft void 171*2e520600Scheloha.Fn uvm_meter 1728f128fcdSmpi.Ft int 1738f128fcdSmpi.Fn uvm_sysctl "int *name" "u_int namelen" "void *oldp" "size_t *oldlenp" "void *newp " "size_t newlen" "struct proc *p" 1748f128fcdSmpi.Ft int 1758f128fcdSmpi.Fn uvm_grow "struct proc *p" "vaddr_t sp" 1768f128fcdSmpi.Ft int 177b22a9f75Sguenther.Fn uvm_coredump_walkmap "struct proc *p" "uvm_coredump_setup_cb *setup" "struct uvm_coredump_walk_cb *walk" "void *cookie" 1788f128fcdSmpi.nr nS 0 1798f128fcdSmpi.Pp 1808f128fcdSmpiThe 1818f128fcdSmpi.Fn uao_create , 1828f128fcdSmpi.Fn uao_detach 1838f128fcdSmpiand 1848f128fcdSmpi.Fn uao_reference 1858f128fcdSmpifunctions operate on anonymous memory objects, such as those used to support 1868f128fcdSmpiSystem V shared memory. 1878f128fcdSmpi.Fn uao_create 1888f128fcdSmpireturns an object of size 1898f128fcdSmpi.Fa size 1908f128fcdSmpiwith flags: 1918f128fcdSmpi.Bd -literal 1928f128fcdSmpi#define UAO_FLAG_KERNOBJ 0x1 /* create kernel object */ 1938f128fcdSmpi#define UAO_FLAG_KERNSWAP 0x2 /* enable kernel swap */ 1948f128fcdSmpi.Pp 1958f128fcdSmpi.Ed 1968f128fcdSmpiwhich can only be used once each at system boot time. 1978f128fcdSmpi.Fn uao_reference 1988f128fcdSmpicreates an additional reference to the named anonymous memory object. 1998f128fcdSmpi.Fn uao_detach 2008f128fcdSmpiremoves a reference from the named anonymous memory object, destroying 2018f128fcdSmpiit if removing the last reference. 2028f128fcdSmpi.Pp 2038f128fcdSmpiThe 2048f128fcdSmpi.Fn uvm_kernacc 2058f128fcdSmpifunction checks the access at address 2068f128fcdSmpi.Fa addr 2078f128fcdSmpito 2088f128fcdSmpi.Fa addr + len 2098f128fcdSmpifor 2108f128fcdSmpi.Fa rw 2118f128fcdSmpiaccess, in the kernel address space. 2128f128fcdSmpi.Pp 2138f128fcdSmpiThe 2148f128fcdSmpi.Fn uvm_meter 215*2e520600Schelohafunction calculates the load average and wakes up the swapper if necessary. 2168f128fcdSmpi.Pp 2178f128fcdSmpiThe 2188f128fcdSmpi.Fn uvm_sysctl 2198f128fcdSmpifunction provides support for the 2208f128fcdSmpi.Dv CTL_VM 2218f128fcdSmpidomain of the 2228f128fcdSmpi.Xr sysctl 2 2238f128fcdSmpihierarchy. 2248f128fcdSmpi.Fn uvm_sysctl 2258f128fcdSmpihandles the 2268f128fcdSmpi.Dv VM_LOADAVG , 2278f128fcdSmpi.Dv VM_METER 2288f128fcdSmpiand 2298f128fcdSmpi.Dv VM_UVMEXP 2308f128fcdSmpicalls, which return the current load averages, calculates current VM 2318f128fcdSmpitotals, and returns the uvmexp structure respectively. 2328f128fcdSmpiThe load averages are accessed from userland using the 2338f128fcdSmpi.Xr getloadavg 3 2348f128fcdSmpifunction. 2358f128fcdSmpiThe uvmexp structure has all global state of the UVM system, and has 2368f128fcdSmpithe following members: 2378f128fcdSmpi.Bd -literal 2388f128fcdSmpi/* vm_page constants */ 2398f128fcdSmpiint pagesize; /* size of a page (PAGE_SIZE): must be power of 2 */ 2408f128fcdSmpiint pagemask; /* page mask */ 2418f128fcdSmpiint pageshift; /* page shift */ 2428f128fcdSmpi 2438f128fcdSmpi/* vm_page counters */ 2448f128fcdSmpiint npages; /* number of pages we manage */ 2458f128fcdSmpiint free; /* number of free pages */ 2468f128fcdSmpiint active; /* number of active pages */ 2478f128fcdSmpiint inactive; /* number of pages that we free'd but may want back */ 2488f128fcdSmpiint paging; /* number of pages in the process of being paged out */ 2498f128fcdSmpiint wired; /* number of wired pages */ 2508f128fcdSmpi 2518f128fcdSmpiint zeropages; /* number of zero'd pages */ 2528f128fcdSmpiint reserve_pagedaemon; /* number of pages reserved for pagedaemon */ 2538f128fcdSmpiint reserve_kernel; /* number of pages reserved for kernel */ 2548f128fcdSmpiint unused01; /* formerly anonpages */ 2558f128fcdSmpiint vnodepages; /* XXX # of pages used by vnode page cache */ 2568f128fcdSmpiint vtextpages; /* XXX # of pages used by vtext vnodes */ 2578f128fcdSmpi 2588f128fcdSmpi/* pageout params */ 2598f128fcdSmpiint freemin; /* min number of free pages */ 2608f128fcdSmpiint freetarg; /* target number of free pages */ 2618f128fcdSmpiint inactarg; /* target number of inactive pages */ 2628f128fcdSmpiint wiredmax; /* max number of wired pages */ 2638f128fcdSmpiint anonmin; /* min threshold for anon pages */ 2648f128fcdSmpiint vtextmin; /* min threshold for vtext pages */ 2658f128fcdSmpiint vnodemin; /* min threshold for vnode pages */ 2668f128fcdSmpiint anonminpct; /* min percent anon pages */ 2678f128fcdSmpiint vtextminpct;/* min percent vtext pages */ 2688f128fcdSmpiint vnodeminpct;/* min percent vnode pages */ 2698f128fcdSmpi 2708f128fcdSmpi/* swap */ 2718f128fcdSmpiint nswapdev; /* number of configured swap devices in system */ 2728f128fcdSmpiint swpages; /* number of PAGE_SIZE'ed swap pages */ 2738f128fcdSmpiint swpginuse; /* number of swap pages in use */ 2748f128fcdSmpiint swpgonly; /* number of swap pages in use, not also in RAM */ 2754334c912Smpiint nswget; /* number of swap pages moved from disk to RAM */ 2768f128fcdSmpiint nanon; /* XXX number total of anon's in system */ 2778f128fcdSmpiint unused05; /* formerly nanonneeded */ 2788f128fcdSmpiint unused06; /* formerly nfreeanon */ 2798f128fcdSmpi 2808f128fcdSmpi/* stat counters */ 2818f128fcdSmpiint faults; /* page fault count */ 2828f128fcdSmpiint traps; /* trap count */ 2838f128fcdSmpiint intrs; /* interrupt count */ 2848f128fcdSmpiint swtch; /* context switch count */ 2858f128fcdSmpiint softs; /* software interrupt count */ 2868f128fcdSmpiint syscalls; /* system calls */ 2878f128fcdSmpiint pageins; /* pagein operation count */ 2888f128fcdSmpi /* pageouts are in pdpageouts below */ 2898f128fcdSmpiint unused07; /* formerly obsolete_swapins */ 2908f128fcdSmpiint unused08; /* formerly obsolete_swapouts */ 2918f128fcdSmpiint pgswapin; /* pages swapped in */ 2928f128fcdSmpiint pgswapout; /* pages swapped out */ 2938f128fcdSmpiint forks; /* forks */ 2948f128fcdSmpiint forks_ppwait; /* forks where parent waits */ 2958f128fcdSmpiint forks_sharevm; /* forks where vmspace is shared */ 2968f128fcdSmpiint pga_zerohit; /* pagealloc where zero wanted and zero 2978f128fcdSmpi was available */ 2988f128fcdSmpiint pga_zeromiss; /* pagealloc where zero wanted and zero 2998f128fcdSmpi not available */ 3008f128fcdSmpiint unused09; /* formerly zeroaborts */ 3018f128fcdSmpi 3028f128fcdSmpi/* fault subcounters */ 3038f128fcdSmpiint fltnoram; /* number of times fault was out of ram */ 3048f128fcdSmpiint fltnoanon; /* number of times fault was out of anons */ 3058f128fcdSmpiint fltnoamap; /* number of times fault was out of amap chunks */ 3068f128fcdSmpiint fltpgwait; /* number of times fault had to wait on a page */ 3078f128fcdSmpiint fltpgrele; /* number of times fault found a released page */ 3088f128fcdSmpiint fltrelck; /* number of times fault relock called */ 3098f128fcdSmpiint fltrelckok; /* number of times fault relock is a success */ 3108f128fcdSmpiint fltanget; /* number of times fault gets anon page */ 3118f128fcdSmpiint fltanretry; /* number of times fault retrys an anon get */ 3128f128fcdSmpiint fltamcopy; /* number of times fault clears "needs copy" */ 3138f128fcdSmpiint fltnamap; /* number of times fault maps a neighbor anon page */ 3148f128fcdSmpiint fltnomap; /* number of times fault maps a neighbor obj page */ 3158f128fcdSmpiint fltlget; /* number of times fault does a locked pgo_get */ 3168f128fcdSmpiint fltget; /* number of times fault does an unlocked get */ 3178f128fcdSmpiint flt_anon; /* number of times fault anon (case 1a) */ 3188f128fcdSmpiint flt_acow; /* number of times fault anon cow (case 1b) */ 3198f128fcdSmpiint flt_obj; /* number of times fault is on object page (2a) */ 3208f128fcdSmpiint flt_prcopy; /* number of times fault promotes with copy (2b) */ 3218f128fcdSmpiint flt_przero; /* number of times fault promotes with zerofill (2b) */ 3228f128fcdSmpi 3238f128fcdSmpi/* daemon counters */ 3248f128fcdSmpiint pdwoke; /* number of times daemon woke up */ 3258f128fcdSmpiint pdrevs; /* number of times daemon rev'd clock hand */ 3268f128fcdSmpiint pdswout; /* number of times daemon called for swapout */ 3278f128fcdSmpiint pdfreed; /* number of pages daemon freed since boot */ 3288f128fcdSmpiint pdscans; /* number of pages daemon scanned since boot */ 3298f128fcdSmpiint pdanscan; /* number of anonymous pages scanned by daemon */ 3308f128fcdSmpiint pdobscan; /* number of object pages scanned by daemon */ 3318f128fcdSmpiint pdreact; /* number of pages daemon reactivated since boot */ 3328f128fcdSmpiint pdbusy; /* number of times daemon found a busy page */ 3338f128fcdSmpiint pdpageouts; /* number of times daemon started a pageout */ 3348f128fcdSmpiint pdpending; /* number of times daemon got a pending pagout */ 3358f128fcdSmpiint pddeact; /* number of pages daemon deactivates */ 3368f128fcdSmpiint unused11; /* formerly pdreanon */ 3378f128fcdSmpiint unused12; /* formerly pdrevnode */ 3388f128fcdSmpiint unused13; /* formerly pdrevtext */ 3398f128fcdSmpi 3408f128fcdSmpiint fpswtch; /* FPU context switches */ 3418f128fcdSmpiint kmapent; /* number of kernel map entries */ 3428f128fcdSmpi.Ed 3438f128fcdSmpi.Pp 3448f128fcdSmpiThe 3458f128fcdSmpi.Fn uvm_grow 3468f128fcdSmpifunction increases the stack segment of process 3478f128fcdSmpi.Fa p 3488f128fcdSmpito include 3498f128fcdSmpi.Fa sp . 3508f128fcdSmpi.Pp 3518f128fcdSmpiThe 352b22a9f75Sguenther.Fn uvm_coredump_walkmap 353b22a9f75Sguentherfunction supports writing out the memory image of a process in a 354b22a9f75Sguenthercore file. 355b22a9f75SguentherIt walks the address space for process 3568f128fcdSmpi.Fa p 3570ceff89aSjmcand counts the number of segments necessary to hold the 358b22a9f75Sguentherdumpable memory, 3590ceff89aSjmcwhere a segment consists of one or more present pages followed by 3600ceff89aSjmczero or more mapped but not present (zero-fill) pages, 3610ceff89aSjmcor just one or more mapped but not present pages. 362b22a9f75SguentherIt then invokes 363b22a9f75Sguenther.Fa setup 364b22a9f75Sguentherwith that segment count and the 365b22a9f75Sguenther.Fa cookie 366b22a9f75Sguentherargument. 367b22a9f75Sguenther.Bd -literal 368b22a9f75Sguenthertypedef int uvm_coredump_setup_cb(int nsegment, void *cookie); 369b22a9f75Sguenther.Ed 370b22a9f75Sguenther.Pp 371b22a9f75SguentherIf that returns non-zero then 372b22a9f75Sguenther.Fn uvm_coredump_walkmap 373b22a9f75Sguentherreturns that value immediately, 374b22a9f75Sguentherotherwise it invokes 375b22a9f75Sguenther.Fa walk 376b22a9f75Sguentheronce for each segment, in ascending address order, 377b22a9f75Sguentherpassing it the start of the segment, 378b22a9f75Sguentherthe start of the mapped-but-not-present pages, 379b22a9f75Sguentherone past the last address in the segment, 380b22a9f75Sguentherthe protection on the segment, 381b22a9f75Sguentherthe index of the segment, 382b22a9f75Sguentherand the 383b22a9f75Sguenther.Fa cookie . 384b22a9f75Sguenther.Bd -literal 385b22a9f75Sguenthertypedef int uvm_coredump_walk_cb(vaddr_t start, vaddr_t realend, 386b22a9f75Sguenther vaddr_t end, vm_prot_t prot, int nsegment, void *cookie); 387b22a9f75Sguenther.Ed 388b22a9f75Sguenther.Pp 389b22a9f75SguentherIf a call to 390b22a9f75Sguenther.Fa walk 391b22a9f75Sguentherreturns non-zero then 392b22a9f75Sguenther.Fa uvm_coredump_walkmap 393b22a9f75Sguentherreturns that value immediately. 3948f128fcdSmpi.Sh NOTES 3958f128fcdSmpiThe structure and types whose names begin with 3968f128fcdSmpi.Dq vm_ 3978f128fcdSmpiwere named so UVM could coexist with BSD VM during the early 3988f128fcdSmpidevelopment stages. 3998f128fcdSmpi.Sh SEE ALSO 4008f128fcdSmpi.Xr sysctl 2 , 4018f128fcdSmpi.Xr getloadavg 3 , 4028f128fcdSmpi.Xr kvm 3 , 4038f128fcdSmpi.Xr ddb 4 , 4048f128fcdSmpi.Xr options 4 , 405b22a9f75Sguenther.Xr core 5 , 4068f128fcdSmpi.Xr pmap 9 4078f128fcdSmpi.Rs 4088f128fcdSmpi.%A Charles D. Cranor 4098f128fcdSmpi.%D August 1998 4108f128fcdSmpi.%C St. Louis, Missouri 4118f128fcdSmpi.%Q Department of Computer Science, Sever Institute of Technology, Washington University 4128f128fcdSmpi.%T Design and Implementation of the UVM Virtual Memory System, D.Sc. dissertation 4138f128fcdSmpi.Re 4148f128fcdSmpi.Sh HISTORY 4158f128fcdSmpiThe UVM virtual memory system was developed at Washington University in St. Louis. 4168f128fcdSmpiUVM's roots lie partly in the Mach-based 4178f128fcdSmpi.Bx 4.4 4188f128fcdSmpiVM system, the 4198f128fcdSmpi.Fx 4208f128fcdSmpiVM system, and the SunOS4 VM system. 4218f128fcdSmpiUVM's basic structure is based on the 4228f128fcdSmpi.Bx 4.4 4238f128fcdSmpiVM system. 4248f128fcdSmpiUVM's new anonymous memory system is based on the 4258f128fcdSmpianonymous memory system found in the SunOS4 VM (as described in papers 4268f128fcdSmpipublished by Sun Microsystems, Inc.). 4278f128fcdSmpiUVM also includes a number of features 4288f128fcdSmpinew to 4298f128fcdSmpi.Bx 4308f128fcdSmpiincluding page loanout, map entry passing, simplified 4318f128fcdSmpicopy-on-write, and clustered anonymous memory pageout. 4328f128fcdSmpi.Pp 4338f128fcdSmpiUVM appeared in 4348f128fcdSmpi.Ox 2.9 . 4358f128fcdSmpi.Sh AUTHORS 4368f128fcdSmpi.An -nosplit 4378f128fcdSmpi.An Charles D. Cranor Aq Mt chuck@ccrc.wustl.edu 4388f128fcdSmpidesigned and implemented UVM. 4398f128fcdSmpi.Pp 4408f128fcdSmpi.An Matthew Green Aq Mt mrg@eterna.com.au 4418f128fcdSmpiwrote the swap-space management code. 4428f128fcdSmpi.Pp 4438f128fcdSmpi.An Chuck Silvers Aq Mt chuq@chuq.com 4448f128fcdSmpiimplemented the aobj pager, thus allowing 4458f128fcdSmpiUVM to support System V shared memory and process swapping. 4468f128fcdSmpi.Pp 4478f128fcdSmpi.An Artur Grabowski Aq Mt art@openbsd.org 4488f128fcdSmpihandled the logistical issues involved with merging UVM into the 4498f128fcdSmpi.Ox 4508f128fcdSmpisource tree. 451