suppose two concurrent process are running the following code:
shared total = 0;
void foo()
{
for(int count=1; count<=50; count++)
total++;
}
2个process 共享那个total 变量。The two processes may execute at any relative
speed.
问: what's the lower bound of value of "total" when both processes have
completed.
多谢了先!!
l******n 发帖数: 9344
2
50?
relative
【在 s***c 的大作中提到】 : suppose two concurrent process are running the following code: : shared total = 0; : void foo() : { : for(int count=1; count<=50; count++) : total++; : } : 2个process 共享那个total 变量。The two processes may execute at any relative : speed. : 问: what's the lower bound of value of "total" when both processes have