簡易檢索 / 詳目顯示

研究生: 林子鈞
Lin, Tzu-Chun
論文名稱: 藉由迴避衝突來提昇Transactional Memory效能之研究
Performance Improvement of Transactional Memory via Conflict Avoidance
指導教授: 徐立群
Shu, Lih-Chyun
學位類別: 碩士
Master
系所名稱: 管理學院 - 會計學系
Department of Accountancy
論文出版年: 2012
畢業學年度: 100
語文別: 中文
論文頁數: 49
中文關鍵詞: 遊戲應用軟體式記憶體管理RSTMOpen Nested Transaction
外文關鍵詞: Game application, Software Transactional Memory, Rochester Software Transactional Memory, Open Nested Transaction
相關次數: 點閱:90下載:1
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • Transactional Memory(TM)的建置是透過追蹤Transaction所儲存和讀取的記憶體位置在執行過程中是否有被其他外部的Transaction存取的情況發生來進行衝突判斷。然而藉由自動化的方式判斷衝突方式雖然減輕了程式設計師的負擔,但也可能造成Transaction因為某些可避免的「良性衝突」而導致整個Transaction重新執行以及捨棄率的增加,因而影響程式之產出率。
    本篇論文以「解決良性衝突」為出發點,藉由實際修改一個開放原始碼的Software Transactional Memory函式庫-RSTM,建置Open Nested Transaction(ONT)和Peace區塊兩種判斷方法。程式設計師得以使用這些方來加以區別這些「在記憶體上被視為衝突但在高階語意上卻可允許其發生」之良性衝突,而透過避開良性衝突的發生則可以降低遊戲程式的捨棄率。
    為了充分展現兩種方式之效能,本論文亦將其實際建置在一款多人對戰遊戲-Quake之遊戲資料結構當中。以往TM在遊戲上之應用中,由於遊戲程式設計其Transaction區塊具有較大且較複雜之特性,因此導致Transaction捨棄所需付出的代價相對較高。這代表了在遊戲應用上,其效能更容易受到捨棄率的影響而下滑。透過將ONT和Peace區塊兩種方法建置在Quake遊戲之資料結構操作上,證明兩種方法確實降低了捨棄率,提高了原本STM應用在遊戲上的產出率。

    TM implementation detects concurrent conflicting by tracking the memory addresses stored and read by the transaction to determine if they have been accessed by outer transactions. The implementation itself helps automating the detection; hence, it reduces the burden of programmers. However, this facilitation may cause the entire transaction to be re-executed due to some avoidable “benign conflicts” thus increase the abort rate and affect the productivity.
    In this paper we focus on solving “benign conflicts” as a way of improving the throughput of TM. We modify an open sourced Software Transactional Memory library-RSTM and come up with two methods - Open Nested Transaction (ONT) and Peace. The programmers can use these methods to distinguish benign conflicts that are allowed in semantics level from those disallowed in memory level. Thus, we can avoid benign conflicts and decrease the abort rate of game programs.
    To completely present the performance of two methods, we also realistically implement them in the data structure of first person shooter game-Quake. Because the transaction blocks are bigger and more complicated in game program, the overhead is higher than in normal. This situation means the performance of the game application is more vulnerable to the abort rate. By implementing these methods in the data structure of Quake, we prove they can decrease the abort rate and increase the throughput.

    摘要 i 目錄 iv 圖目錄 v 表目錄 vi 第一章 緒論 1 1.1研究背景與動機 1 1.2問題研究 2 1.3研究目的 6 1.4 論文架構 6 第二章 文獻探討 8 2.1 Transactional Memory介紹 8 2.1.1 Transactional Memory介面 8 2.1.2 資料版本 9 2.1.3 衝突偵測 10 2.1.4 衝突解決 12 2.1.5 交付動作 13 2.1.6 捨棄動作 13 2.2 Nested transaction 13 2.3 Quake遊戲結構 19 2.3.1 Quake介紹 19 2.3.2 Parallel Quake之循環 20 2.3.3共享的資料結構 22 2.3.4 lock機制 23 2.3.5 TM機制 24 2.4 Rochester Software Transactional Memory(RSTM)介紹 25 2.4.1 RSTM發展 25 2.4.2 RSTM使用介面 26 2.4.3 Transactional Locking II介紹 29 第三章 研究方法 33 3.1 PEACE語法 35 3.2 ONT語法 39 第四章 實驗結果 41 第五章 結論 46 參考文獻 47

    [1]Agrawal, K.,Lee, -T. A.I.,Sukha, J. (2009). Safe open-nested transactions
    through ownership. In PPoPP ’09: Proc. 14th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, ( P 151-162).
    [2]Alexandrescu, A. (2001). Smart Pointers. Chapter 7 of Modern C++ Design:
    Generic Programming and Design Patterns Applied. Addison Wesley
    Professional.
    [3] Abdelkhalek, A., Bilas, A. (2004). Parallelization and performance of
    interactive multiplayer game servers. In IPDPS ’04: Proc. 18th international parallel and distributed processing symposium, (P72-81).
    [4]Cascaval, C., Blundell, C., Michael, M. M., Cain, W. H., Wu, P., Chiras,
    S.(2008). Software Transactional Memory: Why Is It Only a Research Toy? Commun. ACM.51(11), P 40-46.
    [5]Dalessandro, L., Marathe, J. V., Spear, F. M., Scott, L. M. (2007).
    Capabilities and limitations of library-based software transactional memory in C++. ACM SIGPLAN Workshop on Transactional Computing
    [6]Dice, D., Lev, Y., Marathe, J. V., Moir, M., Nussbaum, D., Oleszewski, M.
    (2010). Simplifying Concurrent Algorithms by Exploiting Hardware Transactional Memory. In 22nd ACM Symp. on Parallelism in Algorithms and Architectures.
    [7]Dice, D., Shalev, O., Shavit, N. (2006). Transactional Locking II. In
    DISC ’06: Proc. 20th ACM International Symposium on Distributed Computing, (P 194-208).
    [8] Dice, D., Matveev, A., Shavit, N.(2010). Implicit privatization using
    private transactions. In:TRANSACT’10.
    [9]Gajinov, V., Zyulkyarov, F., Unsal, S. O., Cristal, A., Ayguade, E.,Harris, T.
    (2009). Quaketm: parallelizing a complex sequential application using transactional memory. In ICS ’09: Proc. 23rd international conference on Supercomputing, ( P 126-135).
    [10]Guerraoui, R., Herlihy, M., Pochon, B. (2005). Toward a Theory of
    Transactional Contention Managers. In Proc. of the 24th ACM Symp. on Principles of Distributed Computing.

    [11]Herlihy, M., Luchangco, V., Moir, M., Scherer III, N.W. (2003).
    Software Transactional Memory for Dynamic-sized Data Structures. In Proc.of the 22nd ACM Symp. on Principles of Distributed Computing.
    [12]Lupei, D., Simion, B., Pinto, D., Misler, M., Burcea, M., Krick, W.
    (2010).Transactional memory support for scalable and transparent parallelization of multiplayer games. In EuroSys: ’10: Proc. 5th European Conference on Computer Systems, (P 41-54).
    [13]Mannarswamy, S., Chakrabarti, D. R., Rajan, K., Saraswati, S. (2010).
    Compiler aided selective lock assignment for improving the performance of software transactional memory. In PPoPP ’10: Proc. 15th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, (P 37-46).
    [14]Marathe, J.V., Spear, F. M., Scott, L. M. (2008). Scalable techniques for
    transparent privatization in software transactional memory. International Conference on Parallel Processing.
    [15]Minh, C. C., Chung, W. J., Kozyrakis, C. , Olukotun, K. (2008).
    STAMP:Stanford transactional applications for multi-processing. In IISWC ’08: Proc. 11th IEEE International Symposium on Workload Characterization, (P 35-46).
    [16]Moss, E. B. J., Herlihy, M. (1993). Transactional memory: Architectural
    support for lock-free data structures. In ISCA ’93: Proc. 20th International Symposium on Computer Architecture, (P 289-300).
    [17]Moss, E. B. J. (2005). Open nested transactions: Semantics and support.
    Workshop on Memory Performance Issues.
    [18]Moss, E. B.J., Hosking, L. A. (2006). Nested transactional memory:
    Model and architecture sketches. Science of Computer Programmin, (P 186-201).
    [19]Ni, Y., Menon, V., Adl-Tabatabai, -R. A., Hosking, L. A., Hudson, L. R.
    (2007).Open nesting in software transactional memory. In PPoPP ’07: Proc.12th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, (P 68-78).
    [20]Ravi, T.V., Agrawal, G. (2009). Integrating and Optimizing Transactional
    Memory In a Data Mining Middleware. High Performance Computing (HiPC), 2009 International Conference, (P 215-224).
    [21]Reuter, A., Gray, J. (1993). Transaction Processing: Concepts and
    Techniques. Morgan Kaufmann.

    [22]Riegel, T., Felber, P., Fetzer, C. (2008). Dynamic performance tuning of
    word-based software transactional memory. PPoPP '08 Proceedings of the 13th ACM SIGPLAN Symposium on Principles and practice of parallel programming, (P 237-246).
    [23]Rossbach, J. C., Hofmann, S. O., WitchelE. (2009). Is transactional
    memory programming actually easier? In Proceedings of the 8th Annual Workshop on Duplicating, Deconstructing, and Debunking (WDDD).
    [24]Saha, B., Adl-Tabatabai, A., Hudson, L. R., Minh, C. C., Hertzberg, B.
    (2006). Mcrt-stm: a high performance software transactional memory system for a multi-core runtime. In PPoPP ’06: Proc.11th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, (P 187-197).
    [25]Scott, L. M.,Spear, M. F., Dalessandro, L., & Marathe, J. V. (2007).
    Delaunay Triangulation with Transactions and Barriers. IEEE Intl. Symp. on Workload Characterization.
    [26]Scott, N. W., Scherer, L. M. (2005). Advanced Contention Management
    for Dynamic Software Transactional Memory. In Proc. of the 24th ACM Symp. on Principles of Distributed Computing.
    [27]Spear, F. M., Dalessandro, L., Marathe, V. J., Scott, L. M. (2009). A
    comprehensive strategy for contention management in software transactional memory. In PPoPP ’09: Proc. 14th ACM SIGPLAN symposium on Principles and practice of parallel programming, (P 141-150).
    [28]Spear, F. M., Marathe, J.V., Dalessandro, L., Scott, L. M. (2007).
    Privatization techniques for software transactional memory. In PODC’07: Proc. 26th ACM Symposium on principles of distributed computing, (P 338-339).
    [29]Zyulkyarov, F., Gajinov, V., Unsal, O. S., Cristal, A., Ayguad, E., Harris, T.
    (2009). Atomic quake: using transactional memory in an interactive multiplayer game server. In PPoPP ’09:Proc. 14th ACM SIGPLAN symposium on Principles and practice of parallel programming, (P 25-34).

    無法下載圖示 校內:2020-12-18公開
    校外:不公開
    電子論文尚未授權公開,紙本請查館藏目錄
    QR CODE