Path: utzoo!utgpu!water!watmath!clyde!rutgers!sunybcs!bingvaxu!leah!uwmcsd1!marque!gryphon!crash!ford From: ford@crash.cts.com (Michael Ditto) Newsgroups: comp.sys.att Subject: Re: Shared Memory Summary: Shared memory is standard SysV, see SysV manuals for info Message-ID: <2325@crash.cts.com> Date: 10 Jan 88 18:12:26 GMT References: <216@pyuxf.UUCP> Reply-To: ford%kenobi@crash.CTS.COM (Michael Ditto) Organization: Crash TS, El Cajon, CA Lines: 25 In article <216@pyuxf.UUCP> daveb@pyuxf.UUCP (david berk) writes: >Could someone explain how shared memory works on the 7300 >and what the advantages to using it are. Shared memory is a standard feature of System V Unix; read the System V Programmer's Manuals for detailed information. (It's under shmop(2), shmat(2), shmctl(2), etc.). Shared memory is primarily useful for interprocess communication. Several programs (or several copies of the same program) can all have access to an area of memory. An example of how this might be used is a multi-player game, where each player is running the same game program. Each player's process writes into the shared memory whenever that player makes a move. The other players' programs look at the shared memory and display what move the first player made. The same thing could be done with a file, but files are not as efficient, especially when small amounts of information must be accessed very frequently. Other IPC mechanisms include signals, pipes, message queues, and semaphores. -- Mike Ditto -=] Ford [=- P.O. Box 1721 ford%kenobi@crash.CTS.COM Bonita, CA 92002 ford@crash.CTS.COM