What should be the minimum value when the two threads are executed concurrently
Here's a tricky interleaving. R1,R2 denote the independent logical registers used by the threads, while count is the shared variable in memory.


Thread 1 starts its first iteration, performing only a read. count=0, R1=0, R2=?
Thread 2 performs 99 iterations. count=99, R1=0, R2=99
Thread 1 completes its first iteration (increment and write). count=1, R1=1, R2=99
Thread 2 starts iteration #100, performing only a read. count=1, R1=1, R2=1
Thread 1 performs the other 99 iterations. count=100, R1=100, R2=1
Thread 2 completes its iteration #100 (increment and write). count=2, R1=100, R2=2
Both threads now exit, having completed their execution.


So, the sequence is something like

rX = read by thread X
iX = local increment by thread X
wX = write by thread X

r1,
r2,i2,w2,r2,i2,w2,...,r2,i2,w2,  (99 full iterations)
i1,w1,
r2,
r1,i1,w1,r1,i1,w1,...,r1,i1,w1,  (99 full iterations)
i2,w2