How are Arrays consider in read write set

27 views
Skip to first unread message

Pooja Aggarwal

unread,
Jun 17, 2013, 12:48:07 PM6/17/13
to deuc...@googlegroups.com
Hi,

If two threads t1 and t2 both working on the same array but at different index then would the write set of both sets conflict ?
For example:
In one transaction t1 access array Arr from index 1 to 1000.
In second transaction t2 access array Arr from index 1001 to 2000.

Then would the write set conflict?. Is array treated as one unit?

Regards,
Pooja

Guy Korland

unread,
Jun 17, 2013, 12:49:06 PM6/17/13
to Deuce-STM
no it won't be treated as conflict.

Regards,
Guy Korland




--
You received this message because you are subscribed to the Google Groups "Deuce-STM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deuce-stm+...@googlegroups.com.
To post to this group, send email to deuc...@googlegroups.com.
Visit this group at http://groups.google.com/group/deuce-stm.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Pooja Aggarwal

unread,
Jun 17, 2013, 1:23:17 PM6/17/13
to deuc...@googlegroups.com
Thanks a lot.

Even if the two threads access adjacent index then also there wont be any conflict ?
say t1 access arr[i] and t2 access arr[i+1]

Regards,
Pooja



--
You received this message because you are subscribed to a topic in the Google Groups "Deuce-STM" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/deuce-stm/p5Jtr9urKcY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to deuce-stm+...@googlegroups.com.

Guy Korland

unread,
Jun 17, 2013, 1:45:20 PM6/17/13
to Deuce-STM

Right.

Pooja Aggarwal

unread,
Jun 17, 2013, 1:58:29 PM6/17/13
to deuce-stm
thanks :)

Performance (in terms of time) of the program where write conflicts are there should be less than that where conflicts are not there ?
I tried to do a experiment, one where threads were accessing same index of the array and other experiment threads accessing different index of an array. The time taken is same in both the scenarios.

Regards,
Pooja

Guy Korland

unread,
Jun 17, 2013, 2:38:28 PM6/17/13
to Deuce-STM

Try different algorithms.
Make sure you don't have any task queue it any other synchronization mechanism.

Reply all
Reply to author
Forward
0 new messages