an effective hybrid transactional memory system with
play

AnEffectiveHybrid TransactionalMemorySystem - PowerPoint PPT Presentation

AnEffectiveHybrid TransactionalMemorySystem withStrongIsolationGuarantees ,MartinTrautmann,JaeWoongChung, AustenMcDonald,NathanBronson,JaredCasper,


  1. An�Effective�Hybrid� Transactional�Memory�System� with�Strong�Isolation�Guarantees ������������ ,�Martin�Trautmann,�JaeWoong�Chung,� Austen�McDonald,�Nathan�Bronson,�Jared�Casper,� Christos�Kozyrakis,�Kunle�Olukotun Computer�Systems�Laboratory Stanford�University http://tcc.stanford.edu

  2. Why�Hybrid�Transactional�Memory? � Transactional�Memory�(TM)�systems�are�promising � Large�atomic�blocks�simplify�parallel�programming � Speed�of�fine3grain�locks�with�simplicity�of�coarse3grain�locks � TM�can�be�implemented�in�either�hardware�or�software � Hardware�TM�(HTM)�is�fast�but�inflexible�&�costly � Software�TM�(STM)�is�flexible�but�slow � Signature3Accelerated�TM�(SigTM)�is�a�new�hybrid�TM � Uses�hardware�signatures�to�accelerate�software�transactions � Fast,�flexible,�&�cost3effective � Implements�strong�isolation�of�transactional�code � Correct�&�predictable�execution�of�software�transactions 1

  3. Outline � Introduction � SigTM Performance � SigTM Strong�Isolation � Related�Work � Conclusion 2

  4. What�Can�We�Accelerate? Compiler High3level Low3level �������� �� �������� �� �������� ���������� � ���� �������� ����� � � ��������� ���������������� ���������������� �������� �� ����������������� ���� �������� ���������� � � ��������� �������� � � � � ����������� � � � What�do�these�STM�functions�do? 3

  5. STMstart � Called�at�transaction�start� → init�transaction�meta�data ������������ ���� !�������� ������������������� �����"��������#�������� � � Constant�overhead�cost�per�transaction � Expensive�only�for�short�transactions 4

  6. STMread � Called�to�read�shared�data� → add�to�read3set ��������������� �������� ���$��������� ������������������� �������$����%������&��'����������� �������'������'������������ ����������������� ��������"���������� ��������������� ���� � � �������(����� � � Building�the�read3set�is�expensive � Overhead�cost�per�transaction�varies � Locality�of�read�accesses,�size�of�read3set,�transaction�length 5

  7. STMwrite � Called�to�write�shared�data� → add�to�write3set ���)�����������*����� ������������������� ������ *�� � � � � Overhead�cost�per�transaction�varies� � Locality�of�write�accesses,�size�of�write3set,�transaction�length � Significantly�less�expensive�than� ������� (reads�≥ writes) 6

  8. STMcommit � Called�at�transaction�end� → atomically�commit�changes �����++������ ������� ����� ���$��������� ����������������� ����� ����� ���� � � ��������"���������� ������� ����� ���,��������� �������������������� �������'������'����������� ��������"���������� ������� ����� ���$��������� ���������������������� (���� ��$����%������&��'����������� ������� ����� ���$��������� ������������������� ������� ���� � � � � Expensive:�scan�read3set�(1x);�scan�write3set�(3x),�locks 7

  9. How�Slow�Can�STM�Be? ��� ��� � 1.5x�3 7x�slowdown�over�sequential � Hybrid�TM�should�focus�on� ������� and� �����++�� 8

  10. SigTM � SigTM simplifies�STM�by�using�simple�hardware ��� �� �� ������������������ SW�(version�#) HW�(read3set�signature) ��������� ���������� ��������� SW�(locks) HW�(write3set�signature) ��������� ���������� SW SW ��������� 9

  11. SigTM Hardware� � SigTM adds�a�little�HW�(signatures)�to�accelerate�STM � Each�HW�thread�has�2�HW�signatures:�read3set,�write3set � No�other�HW�modifications�(e.g.,�no�extra�cache�states) � ��&������ and� ��&��)���� populate�signatures Read3Set�Signature ��� ���������-��56�4��1 ��&�����������-�� Time� / - . ! 4 0 " 1 2 3 ��� ���������.��56�4��2 ��&�����������.�� / - . ! 0 " # 3 10

  12. SigTM Hardware�(cont) � Signatures�watch�coherence�messages � SW�enables/disables Read3Set�Signature ��� ���������-��56�4��1 (����-���*�� / - . ! ! 0 " " # 3 � On�hit�in�signature,�either: � Trigger�SW�abort�handler�(conflict�detection) � NACK�remote�request�(isolation�enforcement) � Signatures�may�generate�false�conflicts � Performance�but�not�correctness�issue� � Reduce�with�longer�signatures�&�better�hash�functions 11

  13. SigTMstart ��&����������� ���� !�������� ������������������� �����"��������#�������� ���$��%����%�� %�����&�� � � � Read3set�signature�starts�monitoring�coherence�messages � If�hit,�signature�invokes� ��������"��������� � Continuous�validation�of�read3set 12

  14. SigTMread ��&�������������� �������� ���$��������� ������������������� �������$����%������&��'����������� ��������������������������� ���� ����%�� %������� ���� � � �������(����� � � ��&������ does�not�need�to: � Validate�read�address� → continuous�validation�by�HW�signature � Build�software�read3set� → just�add�to�read3set�signature 13

  15. SigTMwrite ��&��)�����������*����� �����%�� %������� ���� � � $����%�������������������*���� � � ��&��)���� populates write3set�signature � Used�during� ��&����++�� � Write3set�versioning�still�in�SW 14

  16. SigTMcommit ��&����++������ ���$��%�����%�� %�����&�� � ������� ����� ���$��������� ����������������� �����%�'�������� ���� � ���� ������������������ ���$��%�����%�� %������ �� ����������������������� ����$��%����%�� %�����&�� � ������� ����� ���$��������� ���������������� ������ (���� ��$����%������&��'����������� ����$��%�����%�� %�����&�� � � � Read3set�signature�eliminates�scan�of�read3set�to�validate � Write3set�signature�eliminates�locks � Two�write3set�scans�instead�of�three 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend