Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I hope this isn't too dumb, but I always imagined each processor having its own set of registers.

Am I incorrect? I can't see how multiple processors can share registers without chaos?



The registers aren't shared here, but the main memory is. The example has each thread write '1' into a [shared, main] memory location and then read the other thread's memory location into a register. If both CPUs' registers are 0, that means that both reads occurred before both writes.


Of course they have different registers, but they sure don't have different memory.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: