Path: utzoo!attcan!uunet!mcvax!enea!kth!osiris!sics.se!tege From: tege@sics.se (Torbj|rn Granlund) Newsgroups: comp.sys.sequent Subject: Simulating local memory Message-ID: Date: 24 Jan 89 20:22:42 GMT Sender: news@osiris.sics.se Distribution: comp Organization: Swedish Institute of Computer Science, Kista Lines: 48 Is it possible to get copy-on-write work in this manner? I'm trying to make this memory layout for a set of processes on a S81 system: | WORK AREA | PROC 1 | PROC 2 | ... | PROC N | where PROC X is the work area of process(or) X. Each process(or) can therefore access it's own memory in two places, in the work area and in AREA Y, if the process(or) has number Y, but accesses will always be done through the work area, for reasons of address uniformity. Initially, all processes/processors are idle. Now, I start one process(or), which runs until it has created a certain amount of job. This processor, P, now signals the other (or a subset of them) to tell them to GET THE MEMORY IMAGE of P, by making a copy-on-write binding to the area (see above) of processor P. Example: Proc 1 starts to run. Proc 1 makes some changes to its work area. After a while, it asks proc 2 and 3 for help. Proc 2 and 3 maps their work areas to the work area of proc 1. Proc 2 changes something on, say, page 132 of its work area, and therefore gets that page copied (by the system or by a SIGSEGV invoked procedure in my program) Proc 3 changes something on, say, page 67 of its work area, etc ... Proc 2 needs help, and asks proc 4, which maps the SINCE THE LAST MAPPING MODIFIED work area of proc 2 to its work area. The last paragraph is the problem. If I had used mmap to make the first map, the pages that were copied because of modificationsq, would now be disassociated from the paging file, and impossible to reach with another mmap call. I would be grateful for any comments, even of the kind "I think the system isn't powerful enough, wait for Mach to arrive for the Sequent systems.".