Previous | Next --- Slide 27 of 57
Back to Lecture Thumbnails
Richard

If the two threads are within one core, they can share data through cache, but if they are in separate threads, they have to share data through memory?

fleventyfive

@Richard: you are right when you say that two threads in a single core can share data through cache. But if they are in separate cores (I'm assuming you meant "cores" instead of "threads" above), then they'll have a copy of that data through their own private caches, which will have a copy in the closest shared cache (L2 or L3). If one of them writes to that data, the copy of that data in the other core's cache will be invalidated through the cache coherency scheme that the processor implements.

Richard

@fleventyfive Thanks a lot.

Allerrors

@fleventyfive Which will be responsible for validating the data staleness, OS(software) or the core(hardware)?