Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jan 1997 07:41:06 -0500 (EST)
From:      Peter Dufault <dufault@hda.com>
To:        scrappy@hub.org (The Hermit Hacker)
Cc:        hackers@FreeBSD.ORG
Subject:   Re: mmap() updates...how often?
Message-ID:  <199701071241.HAA02180@hda.hda.com>
In-Reply-To: <Pine.BSF.3.95.970107060738.3629A-100000@thelab.hub.org> from The Hermit Hacker at "Jan 7, 97 06:18:20 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> 	Not quite sure how to word this one, but how often does
> an mmap() region get updated, in so far as client processes seeing
> the data that the server process writes to it?
> 
> 	The reason I'm asking is that I have a program that is using
> mmap() to pass frames from a central server to client processes.  The
> central server is writing, on average, 20frames/sec to the mmap()'d
> region, and after each write, it sets a counter, also mmap()'d, that
> the client uses as, more or less, a position indicator.

I do something similar, running a simulation that puts a simulation
frame in a shared region and then writes a token to a simulation
pipeline to synchronize the stages of the pipeline.  I don't use
msync() and haven't had any funny problems.  One difference may be
that my entire pipeline is synchronized (each stage passes the
token along until it comes back to the originator) since there is
ordering in the stages.

I'm sure you're using MAP_SHARED.


-- 
Peter Dufault (dufault@hda.com)   Realtime Machine Control and Simulation
HD Associates, Inc.               Voice: 508 433 6936



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701071241.HAA02180>