簡易檢索 / 詳目顯示

研究生: 蘇盈誠
Su, Ying-Chen
論文名稱: 利用Transactional Memory 之優點同時維持系統效能之個案研究
A Case Study on Leveraging the Strengths of Transactional Memory While Maintaining System Performance
指導教授: 徐立群
Shu, Lih-Chyun
學位類別: 碩士
Master
系所名稱: 管理學院 - 會計學系
Department of Accountancy
論文出版年: 2011
畢業學年度: 99
語文別: 英文
論文頁數: 44
中文關鍵詞: 遊戲伺服器模擬
外文關鍵詞: game server, transactional memory, aggregate update, simulation
相關次數: 點閱:52下載:3
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 由於目前電腦硬體發展的趨勢朝向多核心的機器架構,特別是在需要許多運算資源的應用上,多數的電腦應用也開始使用並行運算以期能提升整體運算的效能,例如典型的3D即時運算遊戲。然而在並行運算的環境中,如何有效地對共享資源做衝突偵測與衝突管理成為影響整體效能的重要關鍵之一。為了要保護共享資源,廣為人知的方法便是使用Locks,但這個方法卻會導致一些問題的產生,例如死結,缺乏並行性等。因此研究者使用一種新的方法稱作Transactional Memory(TM)來取代傳統的locks。雖然TM提供了atomicity、consistency、isolation,也就是所謂的serializability等安全特性,然而在許多應用的效能研究上,包括3D遊戲,卻發現TM的效能相較於locks是比較差的。而這也是為何現在我們仍舊使用locks來處理衝突問題的原因。
      在這篇研究中,為了要同時獲得較好的效能又能確保共享資源的安全性與正確性,我們設計了兩種方法:Barrier Transactional Memory與Aggregate Physics Update。Barrier TM會利用TM的特性來做衝突針測與管理,而後Aggregate Physics Update會使用多執行緒機制來將所有運算結果更新。雖然利用TM做衝突偵測與管理必須付出一些效能的代價,但Barrier TM能夠偵測衝突使得進入Physics Steps的Thread能夠並行地處理,從而提升整體的效能。為了測試與驗證我們的方法,我們建立了一個模擬並且比較我們的方法與locks傳統方式的差異,結果顯示我們的方法有機會能夠提升整體遊戲伺服器系統的效能,同時也能夠讓並行遊戲運算伺服器環境中的共享資源處理上更為安全。

    Because of the trend toward multi-core machines, a number of practical computer applications have started to support parallel computing in order to maximize performance efficiency, especially in applications which need a lot of computing resources, such as 3D games; nevertheless with a parallel computing supported applications executed in a multi-core environment, how to do the concurrency control on shared resources could be an important factor related to the performance and accuracy. To protect the shared resources in a parallel computing environment, well- known mechanisms such as locks, semaphores, or monitors have been widely used in many applications, but they may lead to problems such like deadlock, lacking composability, etc. Thus, researchers have developed a new mechanism called Transactional Memory (TM). TM provides safe characteristics that include atomicity, consistency, isolation, which means serializability for using shared resources and also ease the programming difficulty for programmers. However, in applications like 3D games, the performance of TM in most research studies has been relatively poorer than traditional methods, and that is why we still use the locks to handle the concurrency control nowadays.
    In this thesis, in order to achieve better performance with ensuring correctness of concurrent accesses of shared resources in a multi-player game server system, we have designed two mechanisms named Barrier Transactional Memory and Aggregate Physics Update. The Barrier TM utilizes the good characteristics of transactional memory to detect and release signals without conflict, and Aggregate Physics Update can update all calculation results using parallel multi-threading, aiming to speed up overall performance of a parallel multiple-player game server system. To test and verify our mechanism, we conduct simulation experiments that compare Barrier TM and Aggregate Physics Update to traditional locking mechanism and single thread update to see if we can gain more efficiency for the overall system. Our results show that it is possible to improve the performance of a game server system, especially in the area of physics calculations and updating, and also that it is possible to provide a safe shared resource that can be applied in a parallel game server computing environment.

    I Introduction 1 II Related work 5 III Methodology 8 1. game system 8 2. An overview of game system simulation 12 3. Aggregate Physics update 17 4. Barrier Transactional Memory 23 IV Simulation 31 V Results 34 VI Conclusions 40 References 42

    1.Alexandro Baldassin, and Sebastian Burckhardt. Lightweight Software Transactions for Games. First USENIX Workshop on Hot Topics in Parallelism, 2009, pp. 13–13, CA, USA.
    2.Gajinov, F. Zyulkyarov, O. S. Unsal, A. Cristal, E. Ayguade, T. Harris, and M. Valero. QuakeTM: Parallelizing a Complex Sequential Application Using Transactional Memory. In ICS ’09: Proceedings of the 23rd International Conference on Supercomputing, pp. 126–135, New York, USA.
    3.Ferad Zyulkyarov, Vladimir Gajinov, Osman S. Unsal, Adrián Cristal, Eduard Ayguadé , Tim Harris, and Mateo Valero. Atomic Quake: Using Transactional Memory in an Interactive Multiplayer Game Server. Proceedings of the 14th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, February 2009, pp. 14–18, Raleigh, North Carolina, USA.
    4.Dave Dice, Ori Shalev, and Nir Shavit. Transactional Locking II. In Proc. of the 20th Intl. Symp. on Distributed Computing, 2006, Israel.
    5.Bill McCloskey, Feng Zhou, David Gay, Eric Brewer. Autolocker: Synchronization Inference for Atomic Sections. POPL 2006 Conference Record of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 346–358, Charlcston, South Carolina, USA.
    6.Aleksandar Dragojevic, Rachid Guerraoui and Michal Kapalka. Stretching Transactional Memory. PLDI 2009 Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 155–165, Dublin, Ireland.
    7.Tim Harris and Keir Fraser. Language Support for Lightweight Transactions ACM SIGPLAN Notices - Special Issue: Proceedings of the OOPSLA '03 Conference, October 2003, 38(11), pp. 388–402, Anaheim, California, USA.
    8.Faith Ellen, Yossi Lev, Victor Luchangco, and Mark Moir. SNZI: Scalable NonZero Indicators. PODC 2007 Proceedings of the 26th annual ACM Symposium on Principles of Distributed Computing, Portland, Oregon, USA.
    9.Yossi Lev, Victor Luchangco, Virendra J. Marathe, Mark Moir, Dan Nussbaum, and Marek Olszewski. Anatomy of a Scalable Software Transactional Memory. 2009, 4th ACM SIGPLAN Workshop on Transactional Computing (TRANSACT’09).
    10.Chi Cao Minh, Martin Trautmann, JaeWoong Chung, Austen McDonald, Nathan Grasso Bronson, Jared Casper, Christos Kozyrakis, and Kunle Olukotun. An Effective Hybrid Transactional Memory System with Strong Isolation Guarantees. ISCA 2007, June 9–13, pp. 69–80, San Diego, California, USA.
    11.Yang Ni, Vijay Menon, Ali-Reza Adl-Tabatabai, Antony L. Hosking, Richard L. Hudson, J. Eliot B. Moss, Bratin Saha, and Tatiana Shpeisman. Open Nesting in Software Transactional Memory. PPOPP 2007 Proceedings of the 12th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 68–78, San Jose, California, USA.
    12.Kunal Agrawal, I.-Ting Angelina Lee, and Jim Sukha. Safe Open-Nested Transactions Through Ownership. PPOPP 2009 Proceedings of the 14th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 151–162, Raleigh, North Carolina, USA.
    13.Michael F. Spear, Virendra J. Marathe, Luke Dalessandro, and Michael L. Scott. Privatization Techniques for Software Transactional Memory. PODC 2007 Proceedings of the 26th annual ACM Symposium on Principles of Distributed Computing, pp. 338–339.
    14.Alokika Dash and Brian Demsky. Integrating Caching and Prefetching Mechanisms in a Distributed Transactional Memory. IEEE Transactions on Parallel and Distributed Systems–PrePrints, Oct. 2011, 22(10).
    15.Ferad Zyulkyarov, Srdjan Stipic, Tim Harris, Osman S. Unsal, Adrián Cristal, Ibrahim Hur, and Mateo Valero. Discovering and Understanding Performance Bottlenecks in Transactional Applications. PACT 2010 Proceedings of the 19th international conference on Parallel architectures and compilation techniques, pp. 285–294, Vienna, Austria.
    16.Luke Dalessandro and Michael Scott. Strong Isolation is a Weak Idea. In TRANS-ACT, 2009.
    17.Dave Dice and Nir Shavit. TLRW: Return of the Read-Write Lock. SPAA 2010 Conference Program, pp. 284–293, Thira, Santorini, Greece.
    18.Dragojevic Aleksandar, Felber Pascal, Gramoli Vincent and Guerraoui Rachid. Why STM can be more than a Research Toy. Communications of the ACM, 2011, 4(54), pp. 70–77.
    19.Calin Cascaval, Colin Blundell, Maged M. Michael, Harold W. Cain, Peng Wu, Stefanie Chiras and Siddhartha Chatterjee. Software Transactional Memory: Why is it Only a Research Toy? Communications of the ACM, 2008, 51(11), pp. 40–46.
    20.Hasso Plattner. A common Database Approach for OLTP and OLAP Using an In-Memory Column Database. SIGMOD Conference 2009 Proceedings of the 35th SIGMOD International Conference on Management of Data, pp. 1–2.
    21.Yanif Ahmad and Suman Nath. COLR-Tree: Communication-Efficient Spatio-Temporal Indexing for a Sensor Data Web Portal. IEEE 24th International Conference on Data Engineering, 2008, pp. 784–793, Cancun, Mexico.
    22.Markus Esch and Jean Botev. Distance-Aware Avatar Interaction in Online Virtual Environments. Advances in Future Internet, International Conference, 2010, pp. 56–62, Venice, Italy.
    23.David R. Jefferson. Virtual Time. ACM Trans. Program. Lang. Syst, 1985, 7(3), pp. 404–425.
    24.Bruce Dawson. Coding For Multiple Cores on Xbox 360 and Microsoft Windows, June 2010.
    25.James Larus and Ravi Rajwar. Transactional Memory-ch1. Morgan & Claypool Publishers; 2007, USA.
    26.James Larus and Ravi Rajwar. Transactional Memory-ch2:19~20. Morgan & Claypool Publishers; 2007, USA.
    27.松浦健一郎(2005)。射擊遊戲演算法與程式原理Shooting Game Algorithm maniax。臺北市:博碩文化。頁164~202。
    28.原著:Andrew Kirmse、譯者:葉思義(2006)。遊戲程式設計精華IV。臺北市:碁峰。頁3-75~3-80。
    29.原著:Aaron Reed、譯者:劉非予、蔡瑞彌(2009)。XNA 3.0實戰手冊。臺北市:悅知文化。頁281~311。
    30.原著:H. M. Deitel、T.R. Nieto、譯著:施松村、陸茵、楊名全(2009)。VB .NET 程式設計藝術 (Visual Basic .NET How to Program, 2/e)。臺北市:培生文化。頁688~735。
    31.Lupei, D., Simion, B., Pinto, D., Misler, M., Burcea, M., Krick, W., and Amza, C. Towards Scalable and Transparent Parallelization of Multiplayer Games Using Transactional Memory Support. In Proceedings of PPOPP, 2010, pp. 325–326.
    32.Rossbach, C.J., Hofmann, O.S., and Witchel, E. Is Transactional Programming Actually Easier? In Proceedings of PPOPP, 2010, pp. 47–56.

    下載圖示 校內:2013-06-29公開
    校外:2014-06-29公開
    QR CODE