Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!uwvax!provolone.cs.wisc.edu!shekita From: shekita@provolone.cs.wisc.edu (E Shekita) Newsgroups: comp.os.mach Subject: simple question on memory objects and copy-on-write Message-ID: <10859@spool.cs.wisc.edu> Date: 18 Jul 90 22:50:33 GMT Sender: news@spool.cs.wisc.edu Lines: 22 I have a question about memory objects and copy-on-write (COW). Let's suppose I have a memory object server that is in charge of paging object X. Further suppose that when a memory_object_data_request() comes in for a page in X, my memory object server does the following: (1) vm_allocate()'s a page P in its virtual address space (2) reads the requested page from disk into P (3) provides P to Mach via memory_object_data_provided() (4) vm_deallocate()'s P The question is: will P be mapped COW in step (3), or will Mach copy P immediately in step (3)? Obviously it would be nice if P was mapped COW in step (3), because then an unnecessary copy is avoided. Initially, I though that P will definitely be mapped COW, just as in, say, vm_copy(). However, P is backed by a different memory object (the default pager) than X, and I have recently been told that a physical page cannot be shared by two different memory objects. Consequently, I'm not so sure what happens.... Can anyone at CMU set me straight? thanks in advance -- Gene