[MLton] More on Parallel Runtime
skaller
skaller at users.sourceforge.net
Tue Oct 23 06:18:32 PDT 2007
On Tue, 2007-10-23 at 07:43 -0500, Matthew Fluet wrote:
> On Tue, 23 Oct 2007, skaller wrote:
> > On Mon, 2007-10-22 at 16:25 -0500, Henry Cejtin wrote:
> >> Note, MLton already uses safe points for things and so already has the code
> >> to place safe points `often enough'. This is used for things like checking
> >> for signals.
> >
> > so where does it put them in a matrix multiplication?
>
> One simply breaks every loop in the control-flow graph with a check. This
> ensures that there is an upper bound on the time between checks. Granted,
> the bound is not a real-time bound.
No, but a real time bound can only be enforced by the OS
regularly waking a thread waiting at a safe-point up
and either progressing to the next safe-point or
re-executing the one it is stuck on, and you'd also
have to ban pre-emption at other than safepoints.
Since we're mainly talking about garbage collection, this
probably isn't an issue: GC generally doesn't have to obey
hard realtime constraints unless the application using it also must.
We do want soft realtime though, but I think what you describe
does actually provide that.
The canonical soft realtime application is the computer game.
Here 'soft realtime' means you don't want the display or
game controls to behave jerkily -- some lag and slop and
loss of performance is OK.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
More information about the MLton
mailing list