行政院國家科學委員會補助專題研究計畫成果報告
※※※※※※※※※※※※※※※※※※※※※※※※※※
※ ※
※ 在網狀體上發展一個以雙相式模型為基礎 ※
※ 的多點傳送策略 ※
※ ※
※※※※※※※※※※※※※※※※※※※※※※※※※※
計畫類別:■個別型計畫 □整合型計畫 計畫編號:NSC89-2213-E-011-096-
執行期間:2000 年 08 月 01 日至 2001 年 07 月 31 日
計畫主持人:陳省隆 共同主持人:
本成果報告包括以下應繳交之附件:
□赴國外出差或研習心得報告一份
□赴大陸地區出差或研習心得報告一份
□出席國際學術會議心得報告及發表之論文各一份
□國際合作研究計畫國外研究報告書一份
執行單位:國立臺灣科技大學電子工程系
中 華 民 國 90 年 10 月 日
行政院國家科學委員會專題研究計畫成果報告
在網狀體上發展一個以雙相式模型為基礎的多點傳送策略 An Efficient Multicast on Meshes with Two-Phase Model
計畫編號:NSC89-2213-E-011-096
執行期限:2000 年 08 月 01 日至 2001 年 07 月 30 日 主持人:陳省隆 國立臺灣科技大學電子工程系 計畫參與人員:羅友明 邵弘龍 莊宗仁 黃茂森
中文摘要
透過訊息的互相傳遞,多處理器系統 之個別計算單元得以共同合作,發揮強大 的運算功能。除了一般資料的傳輸,彼此 之間的同步也有賴訊息的傳遞來達成。多 點傳送(Multicast)為一種重要且常發生的 訊息傳送型態,係指由某來源節點對特定 一組節點,傳送某訊息而言。
為了避免在訊息傳送的過程中,形成 死 結 (Deadlock) , 而 造 成 系 統 的 癱 瘓 , Lionel Ni 等 人 遂 發 展 出 轉 彎 模 型 (Turn Model) 。 只 要 訊 息傳送 時 符 合 此模 型 規 則,即可避免死結的發生。鑒於轉彎模型 良好的性質,便有研究嘗試在轉彎模型上 面發展多點傳送的演算法。
本計畫的目標即在具有良好特性的無 死結的模型上面,發展出更有效率的多點 傳送演算法。在研究的過程中,我們找到 了轉彎模型的另一種簡易的觀察與描述方 法,我們稱之為雙相式模型。
在觀察多點傳送的時間成本,由於其 為兩個部份組成,即訊息在網路間移動的 傳輸時間,及初始傳送訊息的時間,其中 後者又具有決定性的影響。能否降低初始 訊息的階段數(stages),即成為決定此多點 傳送是否有效率的關鍵問題。
在此種考量之下,我們提出了在雙相 式模型上一個較先前學者提出的多點傳送 演算法更有效率的方法,並進行模擬及分 析比較。
關鍵詞:死結,網狀體,多點傳送,轉彎 模型,雙相式模型。
1 Abstr act
To utilize a multiprocessor system, we need message passing to coordinate among processors. There are many types of message passing for various jobs, for example, to synchronize processors. What to be discussed here is a critical message passing type, multicast, which means to send a message to a set of destinations. A lot of things needed to be taken care of so that a multiprocessor system can function efficiently. One of the important issues is to keep the system away from deadlock. While a system falls into deadlock, the performance drops quickly.
Lionel Ni et al. suggested a concept named turn model that provides a set of rules.
While message routing in a system follows these rules, the system is deadlock free.
Furthermore, turn model is clear and flexible.
Thus it becomes an important and popular view for dealing with deadlock problems. We provide a substitute named two-phase model.
It is isomorphic to turn model but rather intuitive.
Here we try to find out how to do multicast efficiently on two-phase model.
The algorithm can improve performance of multiprocessor system because they have a lot of multicast work. In addition, our multicast algorithms are applicable for those systems under turn model to solve the deadlock problem.
Keywor ds: Deadlock, Mesh, Multicast, Turn Model, Two-Phase Model
2 Intr oduction
The demand for higher computing ability is always increasing, but the speed of single processor, though increasing quickly in the last decade, is somewhat bounded with physical limitations. That’s why we seek solutions in parallel and distributed comp- uting, both in hardware architecture and software algorithms [1, 2, 3, 4, 5, 6, 7].
In parallel and distributed computing environment, a critical issue is to provide mechanism that helps the processors com- municate quickly and conveniently while doing a job together. Message passing, what we called such communications among computing nodes, is not only used for data transmission but also for synchronization of processors. Without such function, the multi- ple processors are just a union of normal processors but cannot provide the powerful computing gains for us. There are different kinds of research to improve message passing. For example, to help the pro- grammers to write easily parallel and distributed programs, a popular message passing interface, MPI [8], is developed.
Multicast, which means to send a message from a source node to a set of destination nodes in multiple processors systems, is a necessary to facilitate the cooperation between processors. There are many important applications that need to use the function of multicast, such as eignvalue computation [9], Gaussian elimination [10], and LU factorization [11]. In addition, while processing parallel search and parallel graph algorithm, multicast plays important roles [12, 13]. For scalable systems that support distributed shared-memory, multicast is a fundamental operation to maintain cache coherence [14, 15, 16].
Deadlock is an important issue in message passing. The system might slow down dramatically if deadlock happens.
Lionel Ni et al. suggest a flexible turn model [17] to solve the deadlock problem by prohibiting several turns during message routing.
In this project, we try to provide an efficient multicast method based on two- phase model. Multicast is a collective message passing type in parallel and distributed systems, while the two-phase model is another view of turn model which is a popular means to deal with deadlock problems.
3 Multicast Algor ithm
A. Two-Phase Model
We show mappings of three adaptive routing principles. The three routing prin- ciples, west first routing, north last routing and negative first routing can be represented in figure 1.
We find it is equivalent to represent the turn model in two-phase model, so we give the routing names of the three adaptive models. Big head routing represents for Y+direction last routing, like north last routing principle. Small head routing represents for X-direction first routing, like west first routing principle. Equal head routing represents for X-Y-direction first routing, like negative first routing principle.
Fig. 1. The mapping relationship between the three partial routing principles in turn model and two phase model.
B. Our Multicast Algorithm
l Algorithm for big head routing principle Firstly the source node S sends its message to the most east node, and then this message walks north to the top side. Now the message is in the most east-north edge. Next, starting in that position, it scans row after row, walks south when that row is clear, and keeps on the same work until all the dest- ination nodes receive the message.
Fig. 2. Big head routing example.
l Algorithm for small head routing principle Firstly S sends its message to the most west side and then the message keeps walking to the most south node that is also the most west node. Now the node in the most west-south edge holds the message.
Next, starting in that position, it scans column after column, walks east when all the destination nodes in that column get the message, and keeps on the same work until all the destination nodes receive the message.
Fig. 3. Small head routing example.
In the above two algorithms, the number of phases are guaranteed by very simple and intuitive methods that also provide very good performance. If we use the turn grouping method, we need to calculate the complicated grouping algorithm and still at least two phases are needed for a multicast while our methods only need at most two phases. Since the startup time decides the performance of the multicast, we think we have found better solution for multicast on two phase model.
But in the third partially adaptive routing principle, equal head routing, there is no such intuitive solution for multicast.
Since the number of phases is our first concern, we find a property that we should send the multicast message to as many nodes as early if possible. We naturally seek to try whether a greedy method that finds the most
quasi-greedy method is appropriate for the requirement.
l Quasi-greedy method
There are three set variables that store the state during the algorithm. Wakeup records those just receiving the multicast message in that phase. Active records those having the multicast message and being able to send message to destination nodes that don’t have the message yet. Sleep records those destination nodes that do not have the message yet.
The job in the main program is to multicast from node of the active by the order from the most north-east position to the most south-west position. The position that has more north and east element would more possibly construct longer route. To not break the better route by worse one, we choose this order instead of pure greedy method.
For each node of active suggested above, we find a routing that involves the most nodes downward and then find back the most nodes upward. The algorithm to find the maximum nodes downward is similar to the method to find the maximum nodes upward. The basic idea to do this job is to create a directed acyclic graph between the sleep set first. The arrow means a legal routing from the source to the destination side of the arrow. After the DAG is constructed, we use flooding method from the source node S to find the maximum route that involves the most destination nodes having no message yet.
C. Performance
The simulation is on meshes of size10x10, 20x20, 30x30, 40x40, and 50x50.
For each mesh, we firstly randomly select a set of destination nodes and source node.
The number of destination nodes is selected for density 10% and 50% to inspect the various distribution situations. The results are shown in figure 4 and figure 5. The Y- axis represents the average stage number needed by different multicast algorithms.
From these figures, our method has less almost half stage number than Fan’s method
[18]. Thus, while the stage number keeps playing the critical factor of elapsed time, our multicast algorithm is more efficient.
0 1 2 3 4
1 2 3 4 5
Turn grouping Quasi_greedy
Fig. 4. The distribution rate = 10%.
0 1 2 3 4
1 2 3 4 5
Turn grouping Quasi_greedy
Fig. 5. The distribution rate = 50%.
4 Conclusion
1. We propose a different view, two-phase model, which can work on the problems of the famous turn model.
2. We provide algorithms for the three adaptive routing principles to cut down the times to initialize a multicast message.
3. For big head routing and small head routing, the algorithm guarantees to complete in at most two phases while the turn grouping needs at least two phases.
4. We develop an efficient multicast method on deadlock free model.
5 Refer ences
[1] K. Hwang, "Advanced Computer Architecture:
Parallelism, Scalability, and Programmablitiy,"
McGraw-Hill Inc, 1993.
[2] L. M. Ni and P. K. Mckinley, "A survey of Wormhole Routing Techniques in Direct Net- works," IEEE Computer, pp. 62-76, Feb. 1993.
[3] N. J. Boden, D. Cohen et al., "Myrinet: A Gigabit-per-Second Local Area Network," IEEE Micro, pp. 29-35, Feb. 1995.
[4] R. Horst, " TNet: A Reliable System Area
[5] D. Garcia and W. Watson, "Servernet II," in Proceedings of the 2nd Parallel Computer Routing and Communication Workshop, Jun.
1997.
[6] R. Host and D. Garcia, "ServerNet SAN I/O Architecture," in Proceeding of Hot Inter- connects V, Aug. 1997.
[7] D. Wang, W. Zheng, and J. Xiong, "Research on Cluster of Workstations," in Proceedings of 1997 International Symposium on Parallel Architectures, Algorithms, and Networks (ISPAN'97), Dec. 1997.
[8] Message Passing Interface Forum. MPI: A Me- ssage-Passing Interface Standard, Mar. 1994.
[9] C. Trefftz, P.K. Mckinley, T.Y. Li, and Z. Zeng,
"A scalable Eignvalue Solver for Symmetric Tridiagonal Matrices," in Proceedings of the Sixth SIAM Conf. Parallel Processing, pp. 602- 609, 1993.
[10] P. K. Mckinley, H. Xu, E. Kalns, and L.M. Ni,
"ComPaSS: Efficient Communication Services for Scalable Architectures," in Proceedings of Supercomputing 1992, pp. 478-487, Nov. 1992.
[11] J. Choi, J. J. Dongarra, R. Pozo, and D. W.
Walker, "ScaLAPACK: A Scalable Linear Algebra Library for Distributed Memory Concurrent Computers," in Proceedings of Fourth Symp. Frontiers of Massively Parallel Computation, pp. 120-127, 1992.
[12] R. F. DeMara and D. L. Moldovan, "Perform- ance Indices for Parallel Marker propagation,"
in Proceedings of the 1991 International Confer- ence on Parallel Processing, pp. 658-659, 1991.
[13] V. Kumar and V. Singh, "Scalability of Parallel Algorithms for the All-pairs Shortest Path Problem," Technical Report, ACT-OODS-058- 90, Rev. 1, MCC, Jan. 1991.
[14] D. Dai and D. K. Panda, "Reducing Cache Invalidataion Overheads in Wormhole Routed DSMs Using Multidestination Message Pass- ing," in Proceeding of the International Con- ference on Parallel Processing, Aug. 1996.
[15] M. P. Malumbres, J. Duato, and J. Torrellas, "An Efficient Implemenation of Tree-Based Multicast Routing for Distributed Shared-Memory Multiprocessors," in Proceeding of the 8th IEEE International Symposium on Parallel and Distributed Processing, Oct. 1996.
[16] P. K. Mckinley, H. Xu, A. H. Esfahanian, and L.M. Ni, "Unicast-based Multicast Communi- cation in Wormhole-routed Networks," IEEE Transaction on Parallel and Distributed Systems, 5(12):1252-1265, Dec. 1994.
[17] C. J. Glass and L. M. Ni, "The Turn Model for Adaptive Routing," in Proceedings of the Inter- national Symposium on Computer Architecture, pp.278-297, 1992.
[18] K. P. Fan and C. T. King, "Turn Grouping for Supporting Efficient Multicast in Wormhole Mesh Networks," Proceedings of the 6th Sym-
posium on the Frontiers of Massively Parallel Computing (Frontiers'96), pp. 50-57, Oct. 1996.