Share to: share facebook share twitter share wa share telegram print page

Parallel RAM

In computer science, a parallel random-access machine (parallel RAM or PRAM) is a shared-memory abstract machine. As its name indicates, the PRAM is intended as the parallel-computing analogy to the random-access machine (RAM) (not to be confused with random-access memory).[1] In the same way that the RAM is used by sequential-algorithm designers to model algorithmic performance (such as time complexity), the PRAM is used by parallel-algorithm designers to model parallel algorithmic performance (such as time complexity, where the number of processors assumed is typically also stated). Similar to the way in which the RAM model neglects practical issues, such as access time to cache memory versus main memory, the PRAM model neglects such issues as synchronization and communication, but provides any (problem-size-dependent) number of processors. Algorithm cost, for instance, is estimated using two parameters O(time) and O(time × processor_number).

Read/write conflicts

Read/write conflicts, commonly termed interlocking in accessing the same shared memory location simultaneously are resolved by one of the following strategies:

  1. Exclusive read exclusive write (EREW)—every memory cell can be read or written to by only one processor at a time
  2. Concurrent read exclusive write (CREW)—multiple processors can read a memory cell but only one can write at a time
  3. Exclusive read concurrent write (ERCW)—mostly never considered because it mostly doesn't add more power[2]
  4. Concurrent read concurrent write (CRCW)—multiple processors can read and write. A CRCW PRAM is sometimes called a concurrent random-access machine.[3]

Here, E and C stand for 'exclusive' and 'concurrent' respectively. The read causes no discrepancies while the concurrent write is further defined as:

Common—all processors write the same value; otherwise is illegal
Arbitrary—only one arbitrary attempt is successful, others retire
Priority—processor rank indicates who gets to write
Another kind of array reduction operation like SUM, Logical AND or MAX.

Several simplifying assumptions are made while considering the development of algorithms for PRAM. They are:

  1. There is no limit on the number of processors in the machine.
  2. Any memory location is uniformly accessible from any processor.
  3. There is no limit on the amount of shared memory in the system.
  4. Resource contention is absent.
  5. The programs written on these machines are, in general, of type SIMD.

These kinds of algorithms are useful for understanding the exploitation of concurrency, dividing the original problem into similar sub-problems and solving them in parallel. The introduction of the formal 'P-RAM' model in Wyllie's 1979 thesis[4] had the aim of quantifying analysis of parallel algorithms in a way analogous to the Turing Machine. The analysis focused on a MIMD model of programming using a CREW model but showed that many variants, including implementing a CRCW model and implementing on an SIMD machine, were possible with only constant overhead.

Implementation

PRAM algorithms cannot be parallelized with the combination of CPU and dynamic random-access memory (DRAM) because DRAM does not allow concurrent access to a single bank (not even different addresses in the bank); but they can be implemented in hardware or read/write to the internal static random-access memory (SRAM) blocks of a field-programmable gate array (FPGA), it can be done using a CRCW algorithm.

However, the test for practical relevance of PRAM (or RAM) algorithms depends on whether their cost model provides an effective abstraction of some computer; the structure of that computer can be quite different than the abstract model. The knowledge of the layers of software and hardware that need to be inserted is beyond the scope of this article. But, articles such as Vishkin (2011) demonstrate how a PRAM-like abstraction can be supported by the explicit multi-threading (XMT) paradigm and articles such as Caragea & Vishkin (2011) demonstrate that a PRAM algorithm for the maximum flow problem can provide strong speedups relative to the fastest serial program for the same problem. The article Ghanim, Vishkin & Barua (2018) demonstrated that PRAM algorithms as-is can achieve competitive performance even without any additional effort to cast them as multi-threaded programs on XMT.

Example code

This is an example of SystemVerilog code which finds the maximum value in the array in only 2 clock cycles. It compares all the combinations of the elements in the array at the first clock, and merges the result at the second clock. It uses CRCW memory; m[i] <= 1 and maxNo <= data[i] are written concurrently. The concurrency causes no conflicts because the algorithm guarantees that the same value is written to the same memory. This code can be run on FPGA hardware.

module FindMax #(parameter int len = 8)
                (input bit clock, resetN, input bit[7:0] data[len], output bit[7:0] maxNo);
    typedef enum bit[1:0] {COMPARE, MERGE, DONE} State;
                    
    State state;
    bit m[len];
    int i, j;
    
    always_ff @(posedge clock, negedge resetN) begin
        if (!resetN) begin
            for (i = 0; i < len; i++) m[i] <= 0;
            state <= COMPARE;
        end else begin
            case (state)
                COMPARE: begin
                    for (i = 0; i < len; i++) begin
                        for (j = 0; j < len; j++) begin
                            if (data[i] < data[j]) m[i] <= 1;
                        end
                    end
                    state <= MERGE;
                end
                
                MERGE: begin
                    for (i = 0; i < len; i++) begin
                        if (m[i] == 0) maxNo <= data[i];
                    end
                    state <= DONE;
                end
            endcase
        end
    end
endmodule

See also

References

  1. ^ Fortune, Steven; Wyllie, James (1978-05-01). "Parallelism in random access machines". Proceedings of the tenth annual ACM symposium on Theory of computing - STOC '78. New York, NY, USA: Association for Computing Machinery. pp. 114–118. doi:10.1145/800133.804339. hdl:1813/7454. ISBN 978-1-4503-7437-8.
  2. ^ MacKenzie, Philip D.; Ramachandran, Vijaya (1998-04-06). "ERCW PRAMs and optical communication". Theoretical Computer Science. 196 (1): 153–180. doi:10.1016/S0304-3975(97)00199-0. ISSN 0304-3975.
  3. ^ Neil Immerman, Expressibility and parallel complexity. SIAM Journal on Computing, vol. 18, no. 3, pp. 625-638, 1989.
  4. ^ Wyllie, James C. The Complexity of Parallel Computations, PhD Thesis, Dept. of Computer Science, Cornell University

Read other articles:

Jadi Kekasihku SajaSingel oleh Keisya Levronkadari album LevronkaDirilis31 Juli 2020 (2020-07-31)FormatUnduhan digitalGenrePop, Bubblegum, Neo soulDurasi2:50LabelUniversal Music IndonesiaPenciptaBemby NoorProduserBemby NoorKronologi singel — Jadi Kekasihku Saja (2020) Tergesa (2020) Video musikJadi Kekasihku Saja di YouTube Jadi Kekasihku Saja adalah singel perdana oleh Keisya Levronka yang dirilis pada 2020 setelah dirinya lulus dari kompetisi Indonesian Idol musim 10.[1] Lata...

IgelsjönInsjöLand SverigeLänStockholms länKommunNorrtälje kommunLandskapUpplandSockenHäverö sockenKoordinater   WGS 8460°02′10″N 18°39′05″Ö / 60.03614°N 18.65128°Ö / 60.03614; 18.65128 (Igelsjön (Häverö socken, Uppland))  SWEREF 99 TM6661053, 703369 Igelsjön Topografiska kartan över Igelsjön. FlödenHuvudavrinnings­områdeSkeboån-Broströmmens kustområde (57058)ÖvrigtSjöID666088-165861L...

Wappen derer von Bandemer Bandemer ist der Name eines alten pommerschen Adelsgeschlechts. Die Familie, deren Zweige zum Teil bis heute bestehen, gehört zum Uradel in Hinterpommern. Inhaltsverzeichnis 1 Geschichte 1.1 Herkunft 1.2 Ausbreitung und Persönlichkeiten 1.3 Besitzungen 2 Wappen 2.1 Familienwappen 2.2 Wappengeschichte 3 Familienmitglieder 4 Literatur 5 Siehe auch 6 Weblinks 7 Einzelnachweise Geschichte Herkunft Als erster Angehöriger des Geschlechts erscheint Bendzmirus (Bandemer) ...

Zahlbach Markt Burkardroth Koordinaten: 50° 16′ N, 10° 0′ O50.2652099.993318310Koordinaten: 50° 15′ 55″ N, 9° 59′ 36″ O Höhe: 310 m ü. NHN Einwohner: 740 (31. Dez. 2022)[1] Eingemeindung: 1. Januar 1972 Postleitzahl: 97705 Vorwahl: 09734 Zahlbach (Bayern) Lage von Zahlbach in Bayern Zahlbach ist ein Ortsteil des unterfränkischen Marktes Burkardroth im Landkreis Bad Kissingen in Bayern. I...

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (أكتوبر 2019) مفهوم حرية التعبير هو حق الإنسان الطبيعي في التعبير عن الرأي علناً دون خوف من الرقابة أو العقاب. لا يقتصر «التعبير» على التحدث أمام العامة بل يتضمن عددًا من ط

Koto TinggiNagariNegara IndonesiaProvinsiSumatera BaratKabupatenAgamKecamatanBasoKodepos26192Kode Kemendagri13.06.08.2001 Luas15,6 km²Jumlah penduduk9.239 jiwaKepadatan592 jiwa/km² Koto Tinggi merupakan salah satu nagari yang terdapat dalam kecamatan Baso, Kabupaten Agam, Provinsi Sumatera Barat, Indonesia. Nagari ini berjarak 12 KM dari Kota Bukittinggi. Ibu kota Nagari Koto Tinggi adalah Lambau. Pembagian Wilayah Nagari Koto Tinggi terdiri dari 4 (empat) Jorong, yaitu: Jorong Batu Ta...

Die Neue Synagoge in Berlin Die Geschichte der Juden in Deutschland ist die einer seit mehr als 1700 Jahren im deutschen Sprachraum – wie in ganz Mitteleuropa – lebenden ethnischen und religiösen Minderheit. Die sehr unterschiedlich dokumentierten Epochen dieser Geschichte wechselten zwischen Blütezeiten, in denen Toleranz gegenüber Juden herrschte, und Zeiten antijudaistischer Verfolgungen und antisemitischer Gewalt, die im 20. Jahrhundert zum Holocaust führte. Seit 1990 wächst die ...

Airin Rachmi Dianyᮃᮄᮛᮤᮔ᮪ ᮛᮂᮙᮤ ᮓᮤᮃᮔᮤWali Kota Tangerang Selatan ke-1Masa jabatan20 April 2011 – 20 April 2021PresidenSusilo Bambang YudoyonoJoko WidodoGubernurRatu Atut ChosiyahRano Karno Wahidin HalimWakilBenyamin DavniePendahuluHidayat Djohari(Sebagai Pejabat Wali Kota)PenggantiBambang Noertjahjo (Plh.)Benyamin Davnie Informasi pribadiLahir28 Agustus 1976 (umur 47)Banjar, Jawa Barat, IndonesiaKebangsaanIndonesiaPartai politik  Golka...

Ten artykuł dotyczy walk o Wilno toczonych przez samoobronę wileńską. Zobacz też: Bitwa o Wilno – stronę ujednoznaczniającą. Walki o Wilno (1918–1919) wojna polsko-bolszewicka Armia Czerwona w Wilnie, 6 stycznia 1919 roku Czas 31 grudnia 1918 – 5 stycznia 1919 Miejsce Wilno, Nowa Wilejka Przyczyna polsko-bolszewicki spór o Wilno Wynik zwycięstwo bolszewików, wycofanie sił polskich Strony konfliktu  Polska  Rosyjska FSRR Niemcy Wileńska Miejska Rada Delegatów Robo...

エドワード・ルーカス・ホワイトEdward Lucas White 作者不明の肖像画 (1927年)誕生 1866年5月11日 バーゲン郡死没 (1934-03-30) 1934年3月30日(67歳没) ボルチモア職業 歴史家・著作家・詩人・語学教師国籍 アメリカ合衆国ジャンル 歴史小説・怪奇小説・詩文学活動 オートマティスム代表作 『ルクンドオ』(こびとの呪い)配偶者 Agnes Gerry (1927年に死別) ウィキポータル 文学テン...

Pour les articles homonymes, voir Albula. Cet article est une ébauche concernant le chemin de fer et la Suisse. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. Tunnel de l’Albula Portail nord du tunnel à Preda. Type Tunnel ferroviaire Géographie Pays Suisse Canton Grisons Itinéraire Thusis à Saint-Moritz Traversée Col de l'Albula Altitude 1 823 m pour le point culminant Coordonnées 46° 34′ 3...

Alliance française de San FranciscoPrésentationType École de langue, centre culturelFondation 1889Construction 1889Site web (en) afsf.comLocalisationLocalisation San Francisco, Californie  États-Unismodifier - modifier le code - modifier WikidataSi ce bandeau n'est plus pertinent, retirez-le. Cliquez ici pour en savoir plus. Cet article ne s'appuie pas, ou pas assez, sur des sources secondaires ou tertiaires (mars 2018). Pour améliorer la vérifiabilité de l'article ainsi que ...

River in California, United StatesTenaja Canyon Creek[1]Tenaja CanyonMap of San Mateo Creek and Arroyo San Onofre drainage basins. San Mateo Creek basin is in dark green.LocationCountryUnited StatesStateCaliforniaRegionRiverside CountyPhysical characteristicsSourceat the head of Tenaja Canyon, at the confluence of arroyos from El Potrero del Tenaja, Redonda Mesa and Tenaja Mountain highlands. • coordinates33°30′23″N 117°21′51″W / 33.50639...

Unmanned robotic utility vehicle R-Gator, autonomous vehicle developed by iRobot and John Deere. The iRobot R-Gator is an unmanned robotic platform from iRobot Corporation and John Deere. The 1,450 pounds (660 kg) robot is built upon Deere's M-Gator currently in use by the US Military. The R-Gator can operate autonomously, performing perimeter patrol and other missions while keeping personnel out of harm's way.[1][2] It can operate autonomously by following a map or choos...

Tevin Campbell discographyCampbell in 1996.Studio albums4Compilation albums2EPs1Singles21 This article contains the discography of American R&B singer, Tevin Campbell. This includes studio albums, compilation albums, and singles. Studio albums List of studio albums, with selected chart positions, sales figures and certifications Title Album details Peak chart positions Certifications US[1] USR&B[1] AUS[2] NZ[3] T.E.V.I.N. Release date: November 15, 1991...

Curdled milk food product For other uses, see Cheese (disambiguation). A platter with cheese and garnishes Cheeses in art: Still Life with Cheeses, Almonds and Pretzels, Clara Peeters, c. 1615 Cheese is a dairy product produced in a wide range of flavors, textures, and forms by coagulation of the milk protein casein. It comprises proteins and fat from milk (usually the milk of cows, buffalo, goats, or sheep). During production, milk is usually acidified and either the enzymes of rennet ...

German dialect of Prague, Czech Republic Prague GermanPrager DeutschNative to Prague, Czech RepublicExtinct(date missing)Language familyIndo-European GermanicGermanPrague GermanWriting systemLatinLanguage codesISO 639-3– Prague German (German: Prager Deutsch, Czech: Pražská němčina) was the dialect of German spoken in Prague in what is now the Czech Republic. The written form of this dialect from the Luxembourg rule played an important role in the history of the German language for...

1996 video gameMicrosoft Flight Simulator for Windows 95Developer(s)MicrosoftPublisher(s)MicrosoftSeriesMicrosoft Flight SimulatorPlatform(s)WindowsReleaseOctober 1, 1996Genre(s)Amateur flight simulationMode(s)Single-player Microsoft Flight Simulator for Windows 95, abbreviated commonly as FS95, is a flight simulator video game. It was released in October 1996 for Windows. With the release of Windows 95, a new version (6.0) was developed for that platform. Although this was essentially just a...

國立中央大學太空及遙測研究中心大樓 國立中央大學太空及遙測研究中心(Center for Space and Remote Sensing Research, National Central University,縮寫:CSRSR)是國立中央大學的校級研究單位,常簡稱為太遙中心,負責太空與遙測的研究與教學。 歷史 國立中央大學太空及遙測研究中心成立於1984年7月1日。之後於1986年1月1日在行政院國家科學委員會支持下成立國科會中壢貴重儀器使用中...

Физкультуре и спорту руководство Лаоса придаёт большое значение. Много внимания занятиям физкультурой и спортом уделяется в школах, учебных заведениях, в воинских частях. Развиваются как традиционные, так и новые виды спорта. Среди традиционных видов спорта наиболее по...

Kembali kehalaman sebelumnya