[M3commit] CVS Update: cm3
Jay K
jay.krell at cornell.edu
Wed Feb 10 18:00:53 CET 2010
sysutils has somewhat of a need to know if it is using user threads.
We've been over this multiple times through the years.
Never seems to be 100% resolved, but a solid 99%.
It runs a process and waits.
Historically in sysutils and m3core this was sleep/wait(nohang) in a loop.
It was identified by people as a major performance problem.
Because the process exits fairly quickly but you have to wait for the sleep to finish.
Sleep being Modula-3 Thread.Sleep I guess -- call into the user thread scheduler.
By and by, most platforms got kernel threads. Changing it to be wait(hang)
became good, faster, no deadlock. But openbsd comes along with lame
pthreads, usermode at that, so we use user threads, and wait(hang)
could deadlock..
There is an interface in m3core to handle this stuff, but if
you bootstrap from an old build, it isn't there.
Mitigating factor as I understand that we don't use threads agressively,
so the deadlock isn't actually likely.
"we" meaning code that launches processes.
I understand that ideally you don't care if you are using userthreads or kernelthreads.
But the abstraction historically was incomplete.
- Jay
> From: hosking at cs.purdue.edu
> Date: Wed, 10 Feb 2010 10:16:24 -0500
> To: jkrell at elego.de
> CC: m3commit at elegosoft.com
> Subject: Re: [M3commit] CVS Update: cm3
>
> Huh? Cryptic comment.
>
> On 10 Feb 2010, at 12:20, Jay Krell wrote:
>
> > CVSROOT: /usr/cvs
> > Changes by: jkrell at birch. 10/02/10 12:20:55
> >
> > Modified files:
> > cm3/m3-libs/sysutils/src/POSIX/: m3makefile
> >
> > Log message:
> > I had this change around: expose if we are using user threads, i.e. if we are OpenBSD
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3commit/attachments/20100210/8b95ae5f/attachment-0002.html>
More information about the M3commit
mailing list