没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
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
- 资源: 911
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- (源码)基于Spring Boot框架的博客系统.zip
- (源码)基于Spring Boot框架的博客管理系统.zip
- (源码)基于ESP8266和Blynk的IR设备控制系统.zip
- (源码)基于Java和JSP的校园论坛系统.zip
- (源码)基于ROS Kinetic框架的AGV激光雷达导航与SLAM系统.zip
- (源码)基于PythonDjango框架的资产管理系统.zip
- (源码)基于计算机系统原理与Arduino技术的学习平台.zip
- (源码)基于SSM框架的大学消息通知系统服务端.zip
- (源码)基于Java Servlet的学生信息管理系统.zip
- (源码)基于Qt和AVR的FestosMechatronics系统终端.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功