0
$\begingroup$

I was introduced in concurrency programming this morning. I haven't understood why "non deterministm" is a fundamental aspect of cuncurrenty programming.

What i think is that, since there is a scheduler (so an algorithm) i deterministicly know the order of the tasks

$\endgroup$
  • 1
    $\begingroup$ In an OS, the scheduler policy can depend on disk/network latency, user input, CPU temperature (which can affect frequency), real time clock, etc. It is very hard to predict, and should not be relied upon to be really deterministic. Especially from one PC to the other. $\endgroup$ – chi Apr 27 '18 at 20:05
  • 1
    $\begingroup$ The scheduler usually is not part of the program: It's part of the environment in which the program is run. And, that same environment may host other programs that run concurrently with the one in question. Each time you run a concurrent program, it should be possible to find some serialization of all of the operations that the program actually performed; but that does not mean that you can predict a serialization just by examining the program itself. $\endgroup$ – Solomon Slow Apr 27 '18 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.