Date: Wed, 8 Dec 2010 12:18:03 -0500 From: Alejandro Imass <ait@p2ee.org> To: Mark Terribile <materribile@yahoo.com> Cc: freebsd-questions@freebsd.org Subject: Re: Page faults and threads Message-ID: <AANLkTi=E%2BCAA6%2BCTNKYLqbDvsxVG6rmR4Q9nE_TGcHau@mail.gmail.com> In-Reply-To: <236959.54029.qm@web110309.mail.gq1.yahoo.com> References: <20101208005814.E810710657DC@hub.freebsd.org> <236959.54029.qm@web110309.mail.gq1.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 8, 2010 at 2:08 AM, Mark Terribile <materribile@yahoo.com> wrot= e: > > Hi, > > Can anyone tell me: when a thread hits a page fault in a multithread prog= ram on FreeBSD, is the entire program stopped waiting for the page to be lo= aded/made ready or just the one thread? > > Has this changed in recent versions with the changes to the scheduler? > > And, if you know, do other Open-Source OS's do the same thing, or are the= y all different? > By no means an expert but i think your question is way too broad for a single answer so IMHO it depends on many things like FBSD version, type of threading you are using and how. A short summary to best of my knowledge is that the threading models in FBSD have changed broadly and continuously since FBSD 5 so it really depends... In general I would think that if the model/lib you are using is 1:1 (default from FBSD 7, I think) then a page fault should halt a single thread and no other threads should be affected if no mem is shared between them, although since threads may(usually?) share memory in most popular models (1:1, N:1, N:M) the fault should block all threads that share that memory space. In any case the issue of page faults and blocking is more related to the VM than to the scheduler, again to the best of my knowledge, and there should be a bunch of sysctls to fine-tune / tweak the behavior. The topic is quite interesting to me, sadly don't know enough about the matter (though I use mod_perl/mod_worker a lot on FBSD so I know just enough to get by) and it would be great if some experts jump in and shed some light on the current threading implementations on the 7, 8 and 9 releases. Furthermore, (knowingly a bit OT to the OP) and if some Perl on FBSD experts on this list (merlyn?) would also give their .02 on Perl threading options/details on FBSD 7,8,9 would be even better ;-) best, -- Alejandro Imass > =A0 =A0Mark Terribile > > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=E%2BCAA6%2BCTNKYLqbDvsxVG6rmR4Q9nE_TGcHau>