#fork and deterministic resumption of the resulting process
Martin Beck
martin.beck at hpi.uni-potsdam.de
Tue Feb 5 16:40:07 UTC 2008
Randal L. Schwartz wrote:
> a := [something] fork
>
> can never be guaranteed to put something into a before something
> starts running. it would violate what fork is doing. If you want
> a lower priority, forkAt: or simply create it suspended until ready.
>
Correct, and as Andreas said, his solution uses the current
implementation of the squeak scheduler. In theory, there is no
guarantee, that a new process with lower priority runs after my process
just because it has lower priority. This completely depends on the used
scheduler. So perhaps it would be better to fix the particular places in
code to use #newProcess and #resume.
Perhaps [ doSomething ] fork is simply too beautiful for this use case...
However, again another prove for preferring share-nothing-concurrency:
http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf
:)
Regards,
Martin
More information about the Squeak-dev
mailing list
|