[Swift-devel] Coaster capabilities for release 0.9
Mihael Hategan
hategan at mcs.anl.gov
Tue Apr 21 21:47:46 CDT 2009
On Tue, 2009-04-21 at 21:31 -0500, Ioan Raicu wrote:
>
>
> Mihael Hategan wrote:
> > On Tue, 2009-04-21 at 21:03 -0500, Ioan Raicu wrote:
> >
> > > and you need significant effort to implement it in Coaster or a fake
> > > provider.
> > >
> >
> > I think a provider to simulate running a task is probably not the
> > difficult part. More difficult may be a mechanism to compress time, such
> > that a 1 hour job will run in a snap, while a two hour job will run in
> > two snaps.
> >
> > I'll let you know as I get a better idea formed in my head.
> >
> >
> I did this with timers. Each task has a max wall time, that dictates
> when the timer will fire for a particular task to mark its completion.
> I simulated up to 1M processors, and billions of tasks, so the timer
> based approach in Java seems to scale quite well to extremes of
> millions of concurrent timers.
One problem is that if you use the same timer object, the events they
generate aren't really concurrent (which is why it's so scalable). Each
timer is a thread that goes through a loop of sorted tasks. I think a
pool of a few timers would do the trick though.
> If you are interested, I can dig through the Falkon code where I
> implemented this logic of emulating workers.
Right. That's almost all that's needed, but there's also the current
time which needs to be faked given that planning depends on how much
time is left in a block, and that depends on what time it is now.
Seems fairly straightforward.
More information about the Swift-devel
mailing list