没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
HARDWARE TRANSACTIONAL MEMORYCS4021/4521 :copyright: 2017 jones@tcd.ie School of Computer Science and Statistics, Trinity College Dublin 24-Nov-17 1Hardware Transactional Memory• transactions normally associated with databases• in this context, think of a transaction as the atomic update of a number of memory locations [eg. atomic update of a data structure]• a transaction is a finite sequence of machine instructions that read and write memory locations, executed by a single thread, satisfying t
资源推荐
资源详情
资源评论
HARDWARE TRANSACTIONAL MEMORY
CS4021/4521 © 2017 jones@tcd.ie School of Computer Science and Statistics, Trinity College Dublin 24-Nov-17
1
Hardware Transactional Memory
• transactions normally associated with databases
• in this context, think of a transaction as the atomic update of a number of memory
locations [eg. atomic update of a data structure]
• a transaction is a finite sequence of machine instructions that read and write
memory locations, executed by a single thread, satisfying the following properties:
• serializability: transactions appear to execute serially, meaning that the steps of
one transaction never appear to be interleaved with the steps of another
• committed transactions are never observed by different threads to execute in
different orders
• atomicity: each transaction makes a sequence of tentative changes [NOT visible
to other threads] to memory and the architectural state [CPU registers] and
then either
COMMITS - making its tentative changes visible to other threads
ABORTS - causing its tentative changes to be discarded
HARDWARE TRANSACTIONAL MEMORY
CS4021/4521 © 2017 jones@tcd.ie School of Computer Science and Statistics, Trinity College Dublin 24-Nov-17
2
Hardware Transactional Memory
• Transactional Memory: Architectural Support of Lock-Free Data Structures
Maurice Herlihy and J. Eliot B. Moss
Proceedings of the 20th Annual International Symposium on Computer Architecture
1993
• motivations
lock free operations on a data structure will not be prevented if other threads stall
mid execution
avoids common problems with mutual exclusion
out performs best known locking techniques
• takes advantage of the first level cache and the cache coherency protocol
• tentative changes made to the first level cache [and architectural state] ONLY
• tentative changes made visible atomically on a successful commit
HARDWARE TRANSACTIONAL MEMORY
CS4021/4521 © 2017 jones@tcd.ie School of Computer Science and Statistics, Trinity College Dublin 24-Nov-17
3
Hardware Transactional Memory
• typical transactional code
• will describe Intel Transactional Synchronization eXtension [TSX]
• implemented 20 years after original Herlihy and Moss paper
• support for hardware lock elision [HLE] and restricted transactional memory [RTM]
• first Haswell CPU with TSX released Jun-13 [Aug-14 bug reported in first implementation]
• NOT all later CPUs support TSX [need to test CPUID.07H.EBX.RTM [bit 11] = 1]
start transaction start transaction
< UPDATE SHARED DATA STRUCTURE > < UPDATE SHARED DATA STRUCTURE >
commit transaction commit transaction
retry on failure retry on failure
HARDWARE TRANSACTIONAL MEMORY
CS4021/4521 © 2017 jones@tcd.ie School of Computer Science and Statistics, Trinity College Dublin 24-Nov-17
4
Intel TSX
• 4 new assembly language instructions for RTM
xbegin transaction begin
xend transaction end
xabort transaction abort
xtest test if in a transaction
• example transactional code [IA32/x64 assembly language]
xbegin L0
< INSTRUCTIONS TO UPDATE SHARED DATA STRUCTURE >
xend
< HERE ON SUCCESSFUL COMMIT >
L0: < HERE ON ABORT > [eax contains RTM abort status]
• eager conflict detection
• transaction fails as soon as a conflict is detected
HARDWARE TRANSACTIONAL MEMORY
CS4021/4521 © 2017 jones@tcd.ie School of Computer Science and Statistics, Trinity College Dublin 24-Nov-17
5
Intel RTM
• why does a transaction abort?
• instructions inside a transaction read and write memory locations
• transaction read set and write set
• transaction will abort if any other CPU...
reads a location in its write set
writes to a location in its read or write set
• transactions may also abort due to hardware limitations, context switches, interrupts,
page faults, update of PTE Accessed and Dirty bits, ...
• MUST provide a non transactional execution path that can be executed if a
transaction fails continuously
剩余28页未读,继续阅读
资源评论
weixin_38691194
- 粉丝: 5
- 资源: 910
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- common.war
- shia.war
- 长沙理工大学大物实验-霍尔效应数据处理
- 基于C语言的医院叫号系统-叫号页面大屏.zip
- Thinkphp运营工商资质注册办理类企业网站模板+前后端源码
- 蒜苔采摘机sw16可编辑全套技术开发资料100%好用.zip
- 佳能c3125 c3120 维修手册
- springboot+MySQL+vue汽车租赁智慧管理96317
- Java编程练习题集锦-涵盖基础算法与实际应用案例
- 基于 Vision Transformer 网络对细胞图像的多类别识别项目【包含完整数据集、代码等】
- Code of Conduct on Energy Consumption of Broadband Equipment
- 十字型声子晶体案例三相PWM逆变器闭环仿真,电压电流双闭环控制 在0.2s时突加负载测试系统抗扰性 模型中包含主电路,坐标变,电压电流双环PI控制器,SVPWM控制,PWM发生器 matlab s
- 卡尔曼滤波算法 二阶电池等效电路模型
- c#开发,通过短信猫发送短信的demo
- 基于MobileViT的xxs、xs、s版本实现的汽车轮胎缺陷图像识别迁移学习分类实战【包含数据集+完整代码】
- 五相电机simulink,五相永磁同步电机simulink,PI双闭环SVPWM矢量控制,分十个扇区,波形良好,动态相应能力强,矢量控制,模型很复杂
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功