Method for better performance To keep the fault time low 1.Swap space,faster then file system 2.Only dirty page is swapped out,or 3.Demand paging only from the swap space,or 4.Initially demand paging from the file system,swap out to swap space,and all subsequent paging from swap space Keep the fault rate extremely low Localization of program executing Time,space 4口”4814在,4色,主)QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Method for better performance ▶ To keep the fault time low 1. Swap space, faster then file system 2. Only dirty page is swapped out, or 3. Demand paging only from the swap space, or 4. Initially demand paging from the file system, swap out to swap space, and all subsequent paging from swap space ▶ Keep the fault rate extremely low ▶ Localization of program executing ▶ Time, space
Outline Copy-on-Write(写时复制) 4口”484在4色,主月QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outline Copy-on-Write (写时复制)
Process Creation Virtual memory allows other benefits during process creation: 1.Copy-on-Write(写时复制 2.Memory-Mapped Files(later) 4口”4814在,4色,主)QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Process Creation ▶ Virtual memory allows other benefits during process creation: 1. Copy-on-Write (写时复制) 2. Memory-Mapped Files (later)
Copy-on-Write(写时复制) Copy-on-Write(COW,写时复制) allows both parent and child processes to initially share the same pages in memory If either process modifies a shared page,only then is the page copied COW allows more efficient process creation as only modified pages are copied Free pages are allocated from a pool of zeroed-out pages 4口”484在4色,主月QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copy-on-Write (写时复制) ▶ Copy-on-Write (COW, 写时复制) ▶ allows both parent and child processes to initially share the same pages in memory ▶ If either process modifies a shared page, only then is the page copied ▶ COW allows more efficient process creation as only modified pages are copied ▶ Free pages are allocated from a pool of zeroed-out pages
Copy-on-Write(写时复制) Example: Process physical memory Processa page A page B page C Before Process 1 Modifies Page C 4口”4814在4色,主)QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copy-on-Write (写时复制) ▶ Example: Process1 physical memory page A page B page C Process2 Before Process 1 Modifies Page C