软件事务内存一致性维护与无线传感器网络路径覆盖问题研究
1. 软件事务内存一致性维护
1.1 事务处理函数
在软件事务内存中,事务的开始和提交分别通过 TxStart() 和 TxCommit() 函数来处理。以下是这两个函数的代码:
TxStart()
{
If (CP_predicted_abort)
Set version policy to GV4; // if CP predicts conflict, then version policy is set to GV4
else
Set version policy to TLC; // if CP predicts no conflict, then version policy is set to TLC
...
}
TxCommit()
{
if(!acquire_lock()) // If lock acquisition fails, then TX aborts
return 0;
if(!read_set_consistency()) // if read-set consistency check fails, then TX aborts
return 0;
if(GV4) // if version policy is GV4
{
global_clock++; // increment global clock
update_locks(
超级会员免费看
订阅专栏 解锁全文
729

被折叠的 条评论
为什么被折叠?



