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:

Distrik Banat Selatan Južnobanatski okrugDistrikLokasi di SerbiaNegara SerbiaRegionVojvodinaIbu kotaPančevoLuas • Total4.245 km2 (1,639 sq mi)Populasi (2011) • Total291.327 • Kepadatan69/km2 (180/sq mi)Kode ISO 3166-2RS-04 Distrik Banat Selatan adalah salah satu dari 29 distrik di Serbia. Menurut sensus 2011, Banat Selatan memiliki luas 4.245 kilometer persegi dan populasi 291.327 jiwa. Kode ISO 3166-2 daerah ini adalah RS-04...

 

U.S. presidential election in Maryland Main article: 2004 United States presidential election 2004 United States presidential election in Maryland ← 2000 November 2, 2004 2008 →   Nominee John Kerry George W. Bush Party Democratic Republican Home state Massachusetts Texas Running mate John Edwards Dick Cheney Electoral vote 10 0 Popular vote 1,334,493 1,024,703 Percentage 55.91% 42.93% County Results Kerry   50-60%   60-70% &#...

 

18th-century English diplomat and politician The Right HonourableThe Lord GranthamKB PCLeader of the House of CommonsIn office23 March 1754 – October 1755Preceded byHenry PelhamSucceeded byHenry FoxSecretary of State for the Southern DepartmentIn office23 March 1754 – October 1755Preceded byThe Earl of HoldernessSucceeded byHenry Fox Personal detailsBorn1695Grantham, EnglandDied30 September 1770 (aged 74/75)Cause of deathStrokePolitical partyWhigSpouseFrances W...

University of Arizona team Arizona Wildcats men's basketball 2023–24 Arizona Wildcats men's basketball team UniversityUniversity of ArizonaAll-time record1,889–986–1 (.657)[1]Athletic directorDesiree Reed-FrancoisHead coachTommy Lloyd (3rd season)ConferencePac-12LocationTucson, ArizonaArenaMcKale Center (Capacity: 14,688)NicknameWildcatsColorsCardinal and navy[2]   Uniforms Home Away Alternate NCAA tournament champions1997NCAA tournament runner-u...

 

College basketball team Mississippi State Bulldogs 2023–24 Mississippi State Bulldogs men's basketball team UniversityMississippi State UniversityFirst season1908All-time record1347–1142 (.541)Head coachChris Jans (2nd season)ConferenceSECLocationStarkville, MississippiArenaHumphrey Coliseum (Capacity: 10,575)NicknameBulldogsColorsMaroon and white[1]   Uniforms Home Away NCAA tournament Final Four1996NCAA tournament Elite Eight1996NCAA tournament Sweet Six...

 

Loi constitutionnelle du 10 juillet 1940 Données clés Recto de l'acte constitutionnel numéro 2. Présentation Pays  État français Type Loi constitutionnelle Branche Droit constitutionnel Adoption et entrée en vigueur Adoption 10 juillet 1940 Abrogation 9 août 1944 Lire en ligne Consulter Lois constitutionnelles de 1875 (IIIe République) Loi constitutionnelle du 2 novembre 1945 (Gouvernement provisoire de la République française) modifier La loi constitutionnelle du 10 jui...

Bulgarian football club Football clubPavlikeniFull nameFootball Club PavlikeniFounded1928; 96 years ago (1928)GroundGancho Panov Stadium, PavlikeniCapacity10,000ManagerDimitar Todorov[1]LeagueNorth-West Third League2020–21North-West Third League, 8th Home colours Away colours Football Club Pavlikeni (Bulgarian: Павликени) are a Bulgarian football club based in Pavlikeni, who compete in the North-West Third League, the third division of Bulgarian football. ...

 

Untuk kegunaan lain, lihat Transformers (disambiguasi). Transformers Perang abadi Autobots yang dipimpin Optimus Prime/Optimus Convoy vs. Decepticon/Destron yang dipimpin Megatron.PengarangTakara Original Version.IlustratorHidetsugu Yoshioka, Jim Shotter, Dennis O’Neil, Bob Budiansky, Aaron ArcherNegara Jepang Amerika Serikat Inggris Kanada IndonesiaBahasaInggris/Jepang IndonesiaSubjekFiksi ilmiahGenreLaga/PetualanganPenerbitTakara ComicMarvel ComicsIDW PublishingDreamwave ProductionsBotCon...

 

Genus of shrubs This article is about a genus of shrubs. For other uses, see Larrea (disambiguation). Larrea Larrea tridentata Scientific classification Kingdom: Plantae Clade: Tracheophytes Clade: Angiosperms Clade: Eudicots Clade: Rosids Order: Zygophyllales Family: Zygophyllaceae Subfamily: Larreoideae Genus: LarreaCav. Species Larrea ameghinoi Larrea cuneifolia Larrea divaricata Larrea nitida Larrea tridentata Synonyms Covillea Vail Neoschroetera Briq. Schroeterella Briq.[1] Larre...

Lagu-Lagu Terbaik II Ebiet G. Adeterbaik karya Ebiet G. AdeDirilisdesember 1987Direkam?GenrePopLabelJackson RecordsKronologi Ebiet G. Ade Lagu-Lagu Terbaik I Ebiet G. Ade (1987)'Lagu-Lagu Terbaik I Ebiet G. Ade'1987 Lagu-Lagu Terbaik II Ebiet G. Ade (1987) Lagu-Lagu Terbaik III Ebiet G. Ade (1987)'Lagu-Lagu Terbaik III Ebiet G. Ade'1987 Lagu-Lagu Terbaik II Ebiet G. Ade adalah album kompilasi dari penyanyi Ebiet G. Ade yang dirilis pada tahun 1987. Pranala luar Situs Ebiet G. Ade lbsEbiet...

 

この項目には、一部のコンピュータや閲覧ソフトで表示できない文字が含まれています(詳細)。 数字の大字(だいじ)は、漢数字の一種。通常用いる単純な字形の漢数字(小字)の代わりに同じ音の別の漢字を用いるものである。 概要 壱万円日本銀行券(「壱」が大字) 弐千円日本銀行券(「弐」が大字) 漢数字には「一」「二」「三」と続く小字と、「壱」「�...

 

李光耀逝世及葬礼李光耀(1923年-2015年)日期2015年3月23日-2015年3月29日地点新加坡斯里淡马锡(私人守灵)新加坡国会大厦(民众瞻仰)新加坡国立大学文化中心(国葬)万礼火葬场(英语:Mandai Crematorium and Columbarium)(火葬)网站www.rememberingleekuanyew.sg 2015年3月23日凌晨3時18分(新加坡標準時間),新加坡建国后首任总理、前內閣资政和执政人民行动党首任秘书长李光�...

2020年夏季奥林匹克运动会波兰代表團波兰国旗IOC編碼POLNOC波蘭奧林匹克委員會網站olimpijski.pl(英文)(波兰文)2020年夏季奥林匹克运动会(東京)2021年7月23日至8月8日(受2019冠状病毒病疫情影响推迟,但仍保留原定名称)運動員206參賽項目24个大项旗手开幕式:帕维尔·科热尼奥夫斯基(游泳)和马娅·沃什乔夫斯卡(自行车)[1]闭幕式:卡罗利娜·纳亚(皮划艇)&#...

 

روبا فييخامعلومات عامةالمنشأ كوبا فنزويلا كولومبيا المكسيك مدريد الأندلس جزر الكناري البحر الكاريبي بورتوريكو بنما كوستاريكا الفلبين.بلد المطبخ مطبخ فنزويلي النوع طبق لحم بقر تعديل - تعديل مصدري - تعديل ويكي بيانات روبا فييخا (بالإسبانية: Ropa vieja، وتعني حرفيا باللغة الإسب�...

 

Parliamentary constituency in the United Kingdom, 1885–1983 East FifeFormer County constituencyfor the House of CommonsSubdivisions of ScotlandFife1885–1983SeatsOneCreated fromFife and (from 1918) St Andrews BurghsReplaced byNorth East Fife and Central Fife[1] East Fife was a county constituency represented in the House of Commons of the Parliament of the United Kingdom from 1885 to 1983. Along with West Fife, it was formed by splitting the old Fife constituency. It elected one Me...

Mit Fried und Freud ich fahr dahinHymn by Martin LutherText and melody with biblical illustration, Bapstsches Gesangbuch, 1545CatalogueZahn 3986Textby Martin LutherLanguageGermanBased onNunc dimittisPublished1524 (1524) Mit Fried und Freud ich fahr dahin (German: [mɪt ˈfʁiːt ʔʊnt ˈfʁɔʏt ʔɪç ˈfaːɐ̯ daˈhɪn]; In peace and joy I now depart) is a hymn by Martin Luther, a paraphrase in German of the Nunc dimittis, the canticle of Simeon. Luther wrote the te...

 

Resident population of each U.S. state, the District of Columbia, and Puerto Rico in 2022 according to the U.S. Census Bureau[needs update] Average annual population growth rate in each U.S. state, the District of Columbia, and Puerto Rico between 2020 and 2022 according to the U.S. Census Bureau[needs update] The states and territories included in the United States Census Bureau's statistics for the United States population, ethnicity, and most other categories include the 5...

 

EgittoDati amministrativiLingue parlateAntico egizio CapitaleTebe Dipendente daRegno d'Egitto (XV dinastia)? PoliticaForma di governoMonarchia assoluta Nascita1580 a.C. Fine1550 a.C. Territorio e popolazioneReligione e societàReligione di StatoReligione egizia Evoluzione storicaPreceduto daRegno d'Egitto (XVI dinastia)Regno d'Egitto (XV dinastia) Succeduto daNuovo Regno Modifica dati su Wikidata · Manuale La XVII dinastia egizia, inquadrabile del secondo periodo intermedio, raccoglie i...

Beep used to censor profanity, typically at 1000 Hz A bleep censor is the replacement of offensive language or classified information with a beep sound (usually a 1000 Hz sine waveⓘ), used in television and radio. History Censor boxes, such as the one above, may be used along with the bleeps to prevent the audience from lip reading the swearer's words. Above, this animation says Oh-, followed by the censor. Bleeping has been used for many years as a means of censoring TV and radio programs ...

 

Television miniseries WashingtonPromotional posterGenreDocudramaWar dramaHistoryCreated byMatthew GinsburgWritten byKristen BurnsDirected byRoel ReinéStarring Nicholas Rowe James Robinson Nicholas Audsley Nia Roberts Narrated byJeff DanielsTheme music composerStephen PhillipsCountry of originUnited StatesOriginal languageEnglishNo. of episodes3ProductionProducersDoris Kearns Goodwin[1]Beth LaskiProduction locationBucharest, RomaniaCinematographyRolf DekensEditorsAlex DurhamWes Lipman...