Timeline for What is the minimum and maximum value of Counter when the two threads are executed concurrently?
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 29, 2022 at 21:11 | answer | added | Nathaniel | timeline score: 1 | |
Oct 23, 2022 at 19:14 | vote | accept | LinkedLists101 | ||
Oct 23, 2022 at 19:10 | vote | accept | LinkedLists101 | ||
Oct 23, 2022 at 19:13 | |||||
Oct 23, 2022 at 18:37 | answer | added | Alex P | timeline score: 1 | |
Oct 23, 2022 at 18:35 | comment | added | user16034 | What about $1$ ? | |
Oct 23, 2022 at 18:34 | answer | added | user16034 | timeline score: 0 | |
Oct 23, 2022 at 17:16 | comment | added | LinkedLists101 | Well my thought is that the continuation of the while-loop is dependent on the value of i, but i is only effected by itself and not by any variable that is local to the threads themselves (in the way that counter is dependent on the value of cnt). So in that way the program will only ever loop 10 times, limiting the value of counter. But maybe I am thinking completely wrong. | |
Oct 23, 2022 at 15:57 | comment | added | user16034 | Why $10$ for the maximum and $1$ for the minimum ? Explain your reasoning. | |
S Oct 23, 2022 at 15:49 | review | First questions | |||
Oct 23, 2022 at 18:40 | |||||
S Oct 23, 2022 at 15:49 | history | asked | LinkedLists101 | CC BY-SA 4.0 |