Previous | Next --- Slide 12 of 79
Back to Lecture Thumbnails
suninhouse

Function cloning in this case refers to cloning the function and instrument (decorate) the function with software barriers for TM. This is likely done in the compiler.

assignment7

I might miss some part of the lecture, but why we have if(a.z==0) on the left but if (tmRd(&a.z!=0)) on the right? Should it be if (tmRd(&a.z==0))?

sagoyal

@assignment7 I was wondering the same thing, I think this was just a small error.

chii

Is there a way that function cloning or dynamic translation can be done at runtime instead of in the compiler?

mkarra

As discussed in class, software barriers are a way of communicating between the program and the transctional memory system. These include things like synchronization primitives, lock-free data structure implementations, etc. (https://en.wikipedia.org/wiki/Memory_barrier)

blipblop

Apparently software barriers are not like memory ordering barriers (Prof Kunle says in class), but I'm still really confused what they are exactly...

msere

@blipblop my understanding of this is that the software barriers for STM are used to synchronize transactions, by dealing w/ the write buffer or undo log, forcing stalls/aborts etc, as opposed to memory barriers which are used to enforce order of memory operations

cbfariasc

I'm not sure if I understand this correctly, but is function cloning the process of transforming the code on the left of the slide to the code on the right?

Jonathan

I believe you are correct that function cloning is the process of generating a version of a function that works with TM. If the function doesn't need to operate on TM (eg it only operates only on data local to one transaction) then it does not need to be cloned.

Claire

Am I right that after function cloning, when we get to the tmTxnCommit() that is when the global clock will be updated?

Please log in to leave a comment.