offtopic: Can somebody pls. explain this to me?
>I don't know where else to turn to..
> Hoping that somebody please help me out with this question?
>
> sum()
> { for x=1 to 10 do
> var=var+1
> }
>
> shared int var=0 file://shared variable
>
> fork(sum, 0);
> fork(sum, 0); file://executing two concurrent processes
>
> I can't figure this one out...my questions are:
> 1. what would be the smallest and largest possible values of the shared
var output by this concurrent program?
>
> 2. Suppose that an arbitrary number of these processes are permitted to
execute concurrently..what effect would this modification have on the range
of final values of var?
>
> Thank you for any help.
>
>
___________________________________________________________________________
Visit http://www.visto.com/info, your free web-based communications center.
Visto.com. Life on the Dot.
Reply to: