[DGD] Swapping users

Raymond Jennings shentino at gmail.com
Wed Sep 16 00:24:00 CEST 2015


Swapping in DGD is more like virtual memory.  The CPU can only work with
stuff that's in RAM, but your application doesn't know the difference
unless it has a stop-watch to measure how fast it can access something.

Similiarly, if you have an event go off in DGD-land and it touches an
object that fell asleep and dropped into the swapfile, the event will stall
as soon as it hits your object, the object will get loaded, and then it
will continue as if nothing happened.

Just as if an application hit a swapped out page, the CPU signals a page
fault, and then the OS loads it from disk and resumes things right where
they left off.

On Sun, Dec 7, 2014 at 1:40 PM, Blain <blain20 at gmail.com> wrote:

> I think I was accusing DGD of not reporting the linkdeath to the connection
> object, but I guess DGD didn't know yet until I caused a packet to be
> sent.  Thanks for the info. ;)
> On Dec 7, 2014 7:36 AM, "Felix A. Croes" <felix at dworkin.nl> wrote:
>
> > Blain <blain20 at gmail.com> wrote:
> >
> > > I've been running a bare bones lib on my new BRIX machine and a friend
> of
> > > mine was idling a lot on it using the kernel user.  I noticed one day
> > that
> > > I received notification of him 'going' linkdead.  I'm sure he was
> > linkdead
> > > long before, but I figure his user object might've been swapped out at
> > some
> > > point due to disuse and my logging in caused it to swap in when it
> > > announces my connecting.  My question is, is it possible to prevent
> user
> > > objects from swapping out (if that is indeed what occurred here) so
> that
> > it
> > > can get updates like linkdeath immediately?  Or is there a good place
> in
> > > the kernel I can force an update when close() is received from the game
> > > driver, perhaps?
> >
> > You misunderstand the effect of swapping.  Function calls in swapped-out
> > objects are not cancelled, the object is immediately swapped in and the
> > call proceeds.  The linkdeath you observed was not delayed because your
> > friend's user object was swapped out, but because such a condition can
> > only be detected when an attempt to deliver new data on the connection
> > fails.
> >
> > So in a way, it was your own idleness that contributed to this long-
> > delayed linkdeath.
> >
> > Swapping appears to confuse many people.  Think of DGD's
> swapfile/snapshots
> > as a database.  Objects that are not "swapped out" are in the memory
> cache
> > of this database.
> >
> > Regards,
> > Felix Croes
> > ____________________________________________
> > https://mail.dworkin.nl/mailman/listinfo/dgd
> >
> ____________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
>



More information about the DGD mailing list