[Gems-users] TM conflict case doubt


Date: 12 Sep 2009 12:44:39 -0500
From: holey003@xxxxxxx
Subject: [Gems-users] TM conflict case doubt
Hi,

I have some doubt regarding TM operation on conflict. Suppose executing code looks like this:

BEGIN_TRANSACTION(x)
  io_operation();     //1
  a = b + c;          //2
  c++;                //3
  b = a + c;          //4
COMMIT_TRANSACTION(x)

Suppose conflict is detected for updating 'c'. Then corresponding core retries same transaction or again starts from line 1? What I understood is, if logically later thread detects conflict, then it should restart the whole thread as previous thread must update 'c' first and then should be read by current thread. If so, where is this functionality implemented? In transaction.c file?

Isn't it possible that logically later thread gets hold of 'c' before the earlier thread because earlier thread is busy in i/o operation? Then the earlier thread will detect conflict?

I am using benchmarks in microbenchmarks/transactional.

Thanks,
Anup
[← Prev in Thread] Current Thread [Next in Thread→]