Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!uwvax!edam.cs.wisc.edu!zwilling From: zwilling@edam.cs.wisc.edu (Mike Zwilling) Newsgroups: comp.os.mach Subject: External pagers and sharing Message-ID: <10026@spool.cs.wisc.edu> Date: 27 Mar 90 20:00:17 GMT Sender: news@spool.cs.wisc.edu Organization: U of Wisconsin CS Dept Lines: 38 I have a question concerning physical memory sharing among multiple clients of an external pager. Consider the following scenario: Assume we have one the same machine an external pager with 2 clients. Client 1 uses memory_object_1 and client 2 uses memory_object_2. Both memory objects are maintained by the same external pager. Further assume that page 1 in each object is identical (eg. in the same file) and that each client requires only read access to page 1. Now, it would be preferable for the clients to share the same physical page containing page 1 (since they are not writing the page). This could be "implemented" by return a pointer to the same data in the memory_object_data_provided calls. It is my understanding that when the external pager provides a pointer to the data, the data is mapped copy-on-write in the client thus giving the sharing I want. But, according to the document, "The Duality of Memory and Communication in the Implementation of a Multiprocessor Operating System", each physical page has a *resident page* structure containing *the memory object* associated with the page. So, my question is, will physical page be shared in the above scenario or will a copy be done behind-the-scene? If the page is shared, I'm curious as to how that is implemented. Note: I do realize that sharing would occur if each client mapped the same memory object. But, I'm interested in the case where they don't. Thanks for any help, and if the question isn't clear, just let me know. Mike -- Mike Zwilling University of Wisconsin -- Madison Computer Sciences Dept. 1210 W. Dayton St. Madison, WI 53706 email: zwilling@cs.wisc.edu ph# (608) 263-4076