Concurrency.

Jude 10equals2 at gmail.com
Sun Nov 27 23:19:16 PST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/28/2011 01:05 AM, Debdatta wrote:
> Jude,
> 
> Yes, it is similar, but not exactly the same. The difference is in
> the way tasks are managed. There is no global task queue, and each
> thread has its own. Each thread operates on its own task queue, and
> each task can recursively add tasks to the owning thread's head.
> The head exclusively belongs to the thread, hence no locking is
> required. When a thread is out of tasks, it steals a task from the
> tail of another queue in a round robin fashion. In this case,
> locking is required. :D It has substantially lower overhead than
> global task pools.
> 
> This allows us to efficiently map recursive algorithms with non
> uniform work loads to the task queuing scheme.
> 
> But that's not important to the current discussion, as the language
> mechanisms that allow us to implement the current task pool can
> also be used for task stealing based approaches.
> 
> What I would like to know, is how does the no default sharing idiom
> apply to that? I have seen the examples already, and its not
> particularly clear to me how this could be done without explicitly
> adding and managing @shared tags.
> 

Debdatta,

Nice response, very informative.

Now I'm intrigued.

- -Jude
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJO0zXzAAoJENcHIWLyQiSlIjgH/jcRcxoikWeKp80ab6iNROua
d8ByGCe+kOJIUmx0zToqEbaJAQ+D8+1W6uAUPp9Hu+946LYtDDs+eh5jdVcUBcCj
blRGUFfR1gstzVDjJlYocDc2AjKSbo4mlti+XEGCTPb2rWm0ykDEcobpKf2LJx5A
G5gbB1fRKtFcYUOeWapZc94bYlqOege+KH0DaQ90Li7wzu7SGlcACaQ3VW7D8AyM
zKJBpODJw7qy5WKQLVsCH5pQbfwfQ1J1JV8tY91+cpnjrv+A713EsGaM3P0QfQxa
fFVHE/eVlrhtHKUxgVrQ5nW3GEATs/SB40jOM+JmZWcA8b6QSHgiVyurpslSl30=
=Ic1l
-----END PGP SIGNATURE-----


More information about the Digitalmars-d mailing list