[PRL] "Threads Considered Harmful" in the news

Greg Pettyjohn gregp at ccs.neu.edu
Sat Nov 24 16:14:49 EST 2007


You don't need to be a *physicist* to know that the world is a parallel
system!

But as I am writing this I can't help to agree that physical simulation is
a really nice example.

Students could gain a lot by writing a little physics engine:

1. At the heart of it is a little scheduler loop that gives time to each
body in the simulation so that the body can "integrate" (update velocity
and position and respond to impulses.)

2. Synchronization between bodies occurs as the result of *collisions*
rather than some arcane general-purpose "synchronization primitive" that
only a PL weirdo would come up with :-). Instead, you consider some subset
of
the (choose n 2) combinations of bodies and test for collision. You can
even consider (choose n k) situations where more than 2 bodies collided
simultaneously (though this is never done in real-time physics, at least
not in games)

3. It is possible to demonstrate parallel phenomena e.g.
starvation: a ball bouncing on a table can use up the entire time-slice
calculating 10K bounces as it has nearly come to rest and starve out the rest of the simulation.


On Wed, 24 Jan 2007, Joe Marshall wrote:

> On 1/24/07, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
> >
> > Do you care about predictability? I find Will's reaction is over the
> > top.
> > I really do like predicting the outcome of a computation as a
> > programmer.
> > It helps me reason (test/debug/etc). -- Matthias
>
> Predictability and determinism aren't the same thing.  There are deterministic,
> but unpredictable programs (assuming that by `predict' you wish to make
> statements about the outcome without running the program).  There are
> non-deterministic, but predictable programs:  any reliable Scheme program
> that does not depend on order of argument evaluation.
>
> My initial reaction was that Will was over the top, but when I gave it
> a second or
> third thought, I realized that determinism is really about imposing a temporal
> order above and beyond the necessary causality.  Certainly physics doesn't
> require this (there is no temporal order between two events separated in a
> space-like manner), so it isn't a fundamental property of the universe.
>
>
>
> --
> ~jrm
>
> _______________________________________________
> PRL mailing list
> PRL at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/prl
>



More information about the PRL mailing list