mike@ames.arpa (Mike Smithwick) (07/29/87)
[Powdermilk biscuits! Heavens they're tastey!] Ok all of you wizards out there, donn your turbans or spiked hats, grab yer wand and make some incantations, as I humbly bow before the great throne of Un*x wisdom. I am trying to implement a really crude shared memory scheme for a one time only demonstration. We are needing to have shared common blocks in an, pardon the expression, FORTRAN, helicopter model. That is, the model will be split among two different processes. Normal shared memory won't work since you can only access it via pointers, and FORTRAN doesn't know about them. So I need to be able to have the processes access thee same data page invisible to each other. What I've tried to do is to take the physical page # of one process, and stuff it into the data pte of the other process which points to it's own data page. After the page-twiddle on the client, I acccess the data in the normal fashion and it is the same as before. i.e.,the addresses are not being redirected to the new page. Yes, the processes are not swapped out. I know thhat I can trash the system. I do bring back the original page when done. So, I would appreciate any help. Complaints about my method may be directed to /dev/null. -- *** mike (powered by M&Ms) smithwick *** "ever felt like life was a game, and someone gave you the wrong instruction book?" [discalimer : nope, I don't work for NASA, I take full blame for my ideas]
gwyn@brl-smoke.ARPA (Doug Gwyn ) (07/30/87)
In article <2416@ames.arpa> mike@ames.UUCP (Mike Smithwick) writes: >We are needing to have shared common blocks ... If you're using a recent UNIX System V (you didn't specify what), then I think you can tell the linker to place the PSECT for the COMMON at a specific address and make it shared, much like the shared library transfer vectors are handled. I haven't tried this myself, though.