Computer Engineering and Intelligent Systems www.iiste.org ISSN 2222-1719 (Paper) ISSN 2222-2863 (Online) Vol.4, No.13, 2013 55 Parallel Query Processing on 2D Mesh and Linear Array Architectures Amal Elsayed Aboutabl Computer Science Department, Faculty of Computers and Information, Helwan University, Ain Helwan, Cairo, Egypt E-mail: aaboutabl@helwan.edu.eg Abstract As the size of the web grows, it is necessary to parallelize the process of retrieving information from the web. Incorporating parallelism in search engines is one of the approaches towards achieving this aim. This paper presents an algorithm for query processing on the 2D mesh architecture and two algorithms for linear array architectures. We attempt to exploit the arrangement of processors and the communication pattern in both 2D mesh and linear array architectures to attain high speedup and efficiency for queries-keywords comparisons. A cost model is presented for each algorithm based on both processing and communication cost. Proposed algorithms are evaluated using speedup and efficiency performance metrics. For the same number of processors, 2D Mesh_QP outperforms both linear array algorithms (LA_QPAKP and LA_QPKE). Keywords: 2D Mesh, Linear Arrays, Parallel computing, Query processing 1. Introduction In addition to the increase in the size of the web and the number of available documents, there has also been an increase in the number of internet users. This has, in turn, led to a dramatic increase in the number of queries to be processed (Cho & Garcia-Molina 2002). Parallel query processing is needed to design web search engines to deal with both query traffic and the huge amount of information available on the web (Marin et al. 2010). Every document available on the web is associated with a number of keywords which may be words appearing in or topics covered by the document (Baeza-Yales & Ribeiro-Neto 1999). For a search engine to process a query, it needs to compare the keywords appearing in the query with the available indexed keywords in order to retrieve related documents. This work focuses on this comparison step which we attempt to parallelize for a large number of queries and keywords. In particular, algorithms are proposed here for query processing on the 2D mesh and linear array parallel architectural models. A two-dimensional mesh is a network that can be represented in a manner as shown in figure 1(a). It can be viewed as an N×N array of processing elements (PEs). Every PE is indexed by a 2-tuple (i,j) where 0 ≤ i ≤ N is the row index and 0 ≤ j ≤ N is the column index (Perhami 2002). Such a mesh has N 2 PEs and typically adopts the local memory model where each PE has a processor and a local memory connected to it. Data are transferred from one processor to the other by routing messages through the mesh. The torus architecture is one variant of the 2D mesh where PEs on the sides are connected to those on the other side. Every PE (i,j) is connected to (i, (j+1) mod N), (i, (j-1) mod N), ((i-1) mod N, j) and ((i+1) mod N, j). Hypercubes and 3D meshes are also other variations on meshes. In 2D meshes, propagation delay between adjacent processors is quite small which facilitates high speed communication due to the short local connections between processors. Links between processors are bidirectional and capable of carrying data in both directions concurrently. The mesh can be indexed in a row-major or column-major order. A linear array can be considered as a 1D mesh as processing elements are connected in a chain-like manner. Each processor communicates with its two neighbors directly as in figure 1 (b). In a bidirectional linear array, input can be fed in from the two ends of the chain where the inputs are propagated in one direction (El-Rewini & Abd-El-Barr 2005). In this paper, we attempt to exploit the arrangement of processors and the communication pattern in both 2D mesh and linear array architectures to attain high speedup and efficiency for queries-keywords comparisons. 2. Related Work Some parallel algorithms are based on the idea of domain decomposition in which a certain domain of interest is partitioned prior to computation. This is typically applied on numerical problems where the domain of interest is a matrix, vector or geometries (Panitanaraka & Shontza 2011). The divide-and-conquer approach has been one of the most common approaches in parallel algorithm design. It relies on splitting the original problem into a number of