Speculative Execution -- WAS:[DGD] Using MySQL C++ API

Erwin Harte harte at xs4all.nl
Wed Nov 20 16:18:33 CET 2002


On Wed, Nov 20, 2002 at 04:19:14AM -0500, jruiz at psu.edu wrote:
> Noah told us: "DGD's multithreading works the same way that its atomic
> functions do, with speculative execution.  So that's right out as well."
> 
> Would someone mind taking a moment or two to dumb this statement down so
> an IT major can understand it?  I understand multithreading and the
> concept of atomic functions, but what is speculative execution, and why
> does that make it "right out" with mySQL?

It's only right out with MySQL if you use auto-commit features or use
tables that lack a rollback feature, I would think?  Although, DGD
allows for multiple layers of rollback and I don't know if MySQL is up
to that sort of fun.

I would describe speculative executation as "Let's start executing
this thread, keeping track of the changes we've made so far, and just
see where we run into trouble".  Trouble is defined as two threads
modifying the same thing, since only one should be able to succeed in
doing so.  If this happens, the one detecting the conflict will be
rolled back and reattempted from the start.

At least, I hope I described that accurately. :)

Cheers,

Erwin.
-- 
Erwin Harte <harte at xs4all.nl>
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list