Parallel external memory

PEM Model

In computer science, a parallel external memory (PEM) model is a cache-aware, external-memory abstract machine.[1] It is the parallel-computing analogy to the single-processor external memory (EM) model. In a similar way, it is the cache-aware analogy to the parallel random-access machine (PRAM). The PEM model consists of a number of processors, together with their respective private caches and a shared main memory.

Model

Definition

The PEM model[1] is a combination of the EM model and the PRAM model. The PEM model is a computation model which consists of processors and a two-level memory hierarchy. This memory hierarchy consists of a large external memory (main memory) of size and small internal memories (caches). The processors share the main memory. Each cache is exclusive to a single processor. A processor can't access another’s cache. The caches have a size which is partitioned in blocks of size . The processors can only perform operations on data which are in their cache. The data can be transferred between the main memory and the cache in blocks of size .

I/O complexity

The complexity measure of the PEM model is the I/O complexity,[1] which determines the number of parallel blocks transfers between the main memory and the cache. During a parallel block transfer each processor can transfer a block. So if processors load parallelly a data block of size form the main memory into their caches, it is considered as an I/O complexity of not . A program in the PEM model should minimize the data transfer between main memory and caches and operate as much as possible on the data in the caches.

Read/write conflicts

In the PEM model, there is no direct communication network between the P processors. The processors have to communicate indirectly over the main memory. If multiple processors try to access the same block in main memory concurrently read/write conflicts[1] occur. Like in the PRAM model, three different variations of this problem are considered:

  • Concurrent Read Concurrent Write (CRCW): The same block in main memory can be read and written by multiple processors concurrently.
  • Concurrent Read Exclusive Write (CREW): The same block in main memory can be read by multiple processors concurrently. Only one processor can write to a block at a time.
  • Exclusive Read Exclusive Write (EREW): The same block in main memory cannot be read or written by multiple processors concurrently. Only one processor can access a block at a time.

The following two algorithms[1] solve the CREW and EREW problem if processors write to the same block simultaneously. A first approach is to serialize the write operations. Only one processor after the other writes to the block. This results in a total of parallel block transfers. A second approach needs parallel block transfers and an additional block for each processor. The main idea is to schedule the write operations in a binary tree fashion and gradually combine the data into a single block. In the first round processors combine their blocks into blocks. Then processors combine the blocks into . This procedure is continued until all the data is combined in one block.

Comparison to other models

Model Multi-core Cache-aware
Random-access machine (RAM) No No
Parallel random-access machine (PRAM) Yes No
External memory (EM) No Yes
Parallel external memory (PEM) Yes Yes

Examples

Multiway partitioning

Let be a vector of d-1 pivots sorted in increasing order. Let A be an unordered set of N elements. A d-way partition[1] of A is a set , where and for . is called the i-th bucket. The number of elements in is greater than and smaller than . In the following algorithm[1] the input is partitioned into N/P-sized contiguous segments in main memory. The processor i primarily works on the segment . The multiway partitioning algorithm (PEM_DIST_SORT[1]) uses a PEM prefix sum algorithm[1] to calculate the prefix sum with the optimal I/O complexity. This algorithm simulates an optimal PRAM prefix sum algorithm.

// Compute parallelly a d-way partition on the data segments 
for each processor i in parallel do
    Read the vector of pivots M into the cache.
    Partition  into d buckets and let vector  be the number of items in each bucket.
end for

Run PEM prefix sum on the set of vectors  simultaneously.

// Use the prefix sum vector to compute the final partition
for each processor i in parallel do
    Write elements  into memory locations offset appropriately by  and .
end for

Using the prefix sums stored in  the last processor P calculates the vector B of bucket sizes and returns it.

If the vector of pivots M and the input set A are located in contiguous memory, then the d-way partitioning problem can be solved in the PEM model with I/O complexity. The content of the final buckets have to be located in contiguous memory.

Selection

The selection problem is about finding the k-th smallest item in an unordered list A of size N. The following code[1] makes use of PRAMSORT which is a PRAM optimal sorting algorithm which runs in , and SELECT, which is a cache optimal single-processor selection algorithm.

if  then 
    
    return 
end if 

//Find median of each 
for each processor i in parallel do 
    
end for 

// Sort medians


// Partition around median of medians


if  then 
    return 
else 
    return 
end if

Under the assumption that the input is stored in contiguous memory, PEMSELECT has an I/O complexity of:

Distribution sort

Distribution sort partitions an input list A of size N into d disjoint buckets of similar size. Every bucket is then sorted recursively and the results are combined into a fully sorted list.

If the task is delegated to a cache-optimal single-processor sorting algorithm.

Otherwise the following algorithm[1] is used:

// Sample  elements from A
for each processor i in parallel do
    if  then
        
        Load  in M-sized pages and sort pages individually
    else
        
        Load and sort  as single page
    end if
    Pick every 'th element from each sorted memory page into contiguous vector  of samples
end for 

in parallel do
    Combine vectors  into a single contiguous vector 
    Make  copies of : 
end do

// Find  pivots 
for  to  in parallel do
    
end for

Pack pivots in contiguous array 

// Partition Aaround pivots into buckets 


// Recursively sort buckets
for  to  in parallel do
    recursively call  on bucket jof size 
    using  processors responsible for elements in bucket j
end for

The I/O complexity of PEMDISTSORT is:

where

If the number of processors is chosen that and the I/O complexity is then:

Other PEM algorithms

PEM Algorithm I/O complexity Constraints
Mergesort[1]
List ranking[2]
Euler tour[2]
Expression tree evaluation[2]
Finding a MST[2]

Where is the time it takes to sort N items with P processors in the PEM model.

See also

References

  1. ^ a b c d e f g h i j k l Arge, Lars; Goodrich, Michael T.; Nelson, Michael; Sitchinava, Nodari (2008). "Fundamental parallel algorithms for private-cache chip multiprocessors". Proceedings of the twentieth annual symposium on Parallelism in algorithms and architectures. New York, New York, USA: ACM Press. pp. 197–206. doi:10.1145/1378533.1378573. ISBN 9781595939739. S2CID 11067041.
  2. ^ a b c d Arge, Lars; Goodrich, Michael T.; Sitchinava, Nodari (2010). "Parallel external memory graph algorithms". 2010 IEEE International Symposium on Parallel & Distributed Processing (IPDPS). IEEE. pp. 1–11. doi:10.1109/ipdps.2010.5470440. ISBN 9781424464425. S2CID 587572.

Read other articles:

Elizabeth II's reign in Sierra Leone from 1961 to 1971 Queen of Sierra LeoneCoat of arms of Sierra LeoneElizabeth II DetailsStyleHer MajestyFormation27 April 1961Abolition19 April 1971 Elizabeth II was Queen of Sierra Leone from 1961 to 1971, when Sierra Leone was an independent constitutional monarchy. She was also the monarch of other Commonwealth realms, including the United Kingdom. Her constitutional roles in Sierra Leone were mostly delegated to the governor-general of Sierra Leone. His...

 

2005 contemporary classical album RitualsStudio album by John ZornReleasedFebruary 22, 2005RecordedOctober 2004GenreAvant-garde, Contemporary classical musicLength26:36LabelTzadik TZ 8011ProducerJohn ZornJohn Zorn chronology 50th Birthday Celebration Volume 10(2005) Rituals(2005) Filmworks XV: Protocols of Zion(2005) Rituals is an album of contemporary classical music by American avant-garde composer John Zorn. The piece takes the form of an opera in five parts and was premiered at the Ba...

 

Den här artikeln eller det här avsnittet innehåller inaktuella uppgifter och behöver uppdateras. (2014-03)Motivering: inaktuell information, den verkar vara skriven före premiären av HP7del2. Hjälp gärna Wikipedia att åtgärda problemet genom att redigera artikeln eller diskutera saken på diskussionssidan. Harry Potter Harry Potter GenreFantasyRegissörChris Columbus (I, II)Alfonso Cuarón (III)Mike Newell (IV)David Yates (V, VI, VII)ProducentDavid Heyman (alla)Chris Columbus (III)M...

The Italian general election of 1958 took place on 25 May 1958. Christian Democracy (DC) was by far the largest party in Veneto with 55.5%, while the Italian Socialist Party (PSI) came distant second with 16.1%. Veneto was thus one of the few regions of Italy where the Socialists were stronger than the Italian Communist Party (PCI), even without counting the Italian Democratic Socialist Party (PSDI). Results Chamber of Deputies Party votes votes (%) seats Christian Democracy 1,274,152 55.5 27...

 

Hvidbjerg kan verwijzen naar: Hvidbjerg (Skive), plaats in de Deense gemeente Skive Hvidbjerg (Struer), plaats in de Deense gemeente Struer Hvidbjerg (Vejle), plaats in de Deense gemeente Vejle Hvidbjerg (parochie, Morsø) Hvidbjerg (parochie, Skive) Hvidbjerg (parochie, Struer) Hvidbjerg Vesten Å (parochie) Bekijk alle artikelen waarvan de titel begint met Hvidbjerg of met Hvidbjerg in de titel. Dit is een doorverwijspagina, bedoeld om de verschillen in betekenis of...

 

一般道道 北海道道305号紋別丸瀬布線 総延長 52.2 km 制定年 1957年(昭和32年) 起点 北海道紋別市渚滑町5丁目 終点 北海道紋別郡遠軽町丸瀬布金山 接続する主な道路(記法) 国道238号国道273号国道333号北海道道137号遠軽雄武線 ■テンプレート(■ノート ■使い方) ■PJ道路 紋別市鴻之舞。閉鎖精錬所の煙突が見える 金八トンネル紋別方 北海道道305号紋別丸瀬布線(ほっ

This article is part of a series onPolitics of Greece Constitution Constitutional history Human rights Executive Head of state President of the Republic (list): Katerina Sakellaropoulou Presidential Departments Government Prime Minister (list): Kyriakos Mitsotakis Cabinet: Kyr. Mitsotakis II Legislature Speaker: Konstantinos Tasoulas Presidium Conference of Presidents Parliamentary committees Constituencies Apportionment Judiciary Supreme courts Special Highest Court Court of Cassation Counci...

 

Vicente Iborra Informasi pribadiNama lengkap Vicente Iborra de la FuenteTanggal lahir 16 Januari 1988 (umur 35)Tempat lahir Moncada, SpanyolTinggi 1,90 m (6 ft 3 in)Posisi bermain GelandangInformasi klubKlub saat ini Leicester CityNomor 21Karier junior LevanteKarier senior*Tahun Tim Tampil (Gol)2007–2008 Levante B 17 (4)2008–2013 Levante 165 (8)2013– 2017 Sevilla 113 (24)2017 - Leicester City 0 (0) * Penampilan dan gol di klub senior hanya dihitung dari liga domestik...

 

APBA1 التراكيب المتوفرة بنك بيانات البروتينOrtholog search: PDBe RCSB قائمة رموز معرفات بنك بيانات البروتين 1AQC, 1U37, 1U38, 1U39, 1U3B, 1X11, 1X45, 1Y7N المعرفات الأسماء المستعارة APBA1, D9S411E, LIN10, MINT1, X11, X11A, X11ALPHA, amyloid beta precursor protein binding family A member 1 معرفات خارجية الوراثة المندلية البشرية عبر الإنترنت 602414 MGI: MGI:18602...

Family of flowering plants DipterocarpaceaeTemporal range: Maastrichtian - recent[1] PreꞒ Ꞓ O S D C P T J K Pg N Dipterocarpus retusus Scientific classification Kingdom: Plantae Clade: Tracheophytes Clade: Angiosperms Clade: Eudicots Clade: Rosids Order: Malvales Family: DipterocarpaceaeBlume (1825)[2] Genera AnisopteraAnthoshoreaCotylelobiumDipterocarpusDryobalanopsHopeaMarquesiaMonotesNeobalanocarpusParashoreaPseudomonotesShoreaStemonoporusUpunaVateriaVateriopsisVatica D...

 

Polish television channel Television channel PolsatCountryPolandHeadquartersul. Ostrobramska 7704-175 WarsawProgrammingLanguage(s)PolishPicture format1080i HDTV(downscaled to 16:9 576i for the SDTV feed)OwnershipOwnerTV4TV6Polsat CafePolsat PlayPolsat NewsPolsat News 2Eska TVDisco Polo MusicNowa TVPolo TVPolsat MusicPolsat SportPolsat Sport ExtraPolsat Sport NewsPolsat Sport FightPolsat 1Super PolsatPolsat 2HistoryLaunched5 December 1992; 31 years ago (1992-12-05)Former name...

 

خلية شجيرية الخلايا الجذعية في الجلد الخلايا ذات الزوائد أو الخلايا التغصنية وتعرف أيضا باسم الخلايا العارضة للمستضد المتخصصة APC. هي الخلايا المناعية التي تشكل جزءا من النظام الخلوي النسجي الشبكي، خلية مقدمة للمستضد، والتي تحدث تحت شروط معينة، كما يوحي اسمها،تغصن (من ملح...

Grup Baja Baowu TiongkokMarkas besar Baowu di Menara Baosteel di Pudong, ShanghaiJenisBUMN TiongkokIndustriBajaPendahuluShanghai Baosteel Group CorporationWuhan Iron and Steel CorporationDidirikan1978; 44 tahun lalu (1978)KantorpusatShanghai, TiongkokTokohkunciChen Derong (Ketua)ProdukBaja, produk baja datar, produk baja panjang, produk kawat, pelatPendapatan$.79,932 miliar [1]PemilikPemerintah Pusat Tiongkok (100%)Karyawan195 434 (2019) [2]IndukKomisi Pengawasan dan Admi...

 

2010 studio album by Kerry EllisAnthemsStudio album by Kerry EllisReleased13 September 2010 (2010-09-13)Recorded2002–10Allerton Hill, EnglandGenrePop rockLength44:41LabelDecca, UniversalProducerBrian MayKerry Ellis chronology Wicked in Rock(2008) Anthems(2010) Acoustic by Candlelight(2013) Singles from Anthems I'm Not that Girl / DangerlandReleased: 6 September 2010 AnthemReleased: 12 December 2010 Anthems is the debut studio album by actress and singer Kerry Ellis wh...

 

Pour les articles homonymes, voir Acide hydroxyeicosatétraénoïque. Acide 12-hydroxyeicosatétraénoïque Structure du 12-HETE Identification Nom UICPA acide 12-hydroxyicosa-5,8,10,14-tétraénoïque No CAS 54397-83-0 PubChem 1413 ChEBI 34146 SMILES CCCCCC=CCC(C=CC=CCC=CCCCC(=O)O)O PubChem, vue 3D InChI Std. InChI : vue 3D InChI=1S/C20H32O3/c1-2-3-4-5-10-13-16-19(21)17-14-11-8-6-7-9-12-15-18-20(22)23/h7-11,13-14,17,19,21H,2-6,12,15-16,18H2,1H3,(H,22,23) Std. InChIKey : ZNHVWPK...

ハリー・ポッターシリーズ > ハリー・ポッターシリーズの用語一覧 ハリー・ポッターシリーズの用語一覧(ハリー・ポッターシリーズのようごいちらん)では、J・K・ローリングの小説『ハリー・ポッター』シリーズで使用される用語について述べる。 魔法族とマグル 『ハリー・ポッター』シリーズでは、魔法族(魔法使いや魔女)の起源は不明である。 魔法を...

 

Annual conference for developers and IT professionals This article relies largely or entirely on a single source. Relevant discussion may be found on the talk page. Please help improve this article by introducing citations to additional sources.Find sources: Microsoft Ignite – news · newspapers · books · scholar · JSTOR (March 2010) Keynote at TechEd Europe 2007 Microsoft Ignite is an annual conference for developers and IT professionals hosted by Micr...

 

Mexican chess player In this Spanish name, the first or paternal surname is Guerrero and the second or maternal family name is Rodríguez. Alejandra GuerreroGuerrero in 2012Full nameAlejandra Guerrero RodríguezCountryMexicoBorn (1974-11-05) 5 November 1974 (age 49)Durango City, MexicoTitleWoman International Master (2004)Peak rating2157 (April 2006) Alejandra Guerrero Rodríguez (born 5 November 1974 in Durango City) is a Mexican chess player. She has been a FIDE-recog...

Questa voce o sezione sull'argomento centri abitati della Spagna non cita le fonti necessarie o quelle presenti sono insufficienti. Puoi migliorare questa voce aggiungendo citazioni da fonti attendibili secondo le linee guida sull'uso delle fonti. Segui i suggerimenti del progetto di riferimento. Sancedocomune Sancedo – Veduta LocalizzazioneStato Spagna Comunità autonoma Castiglia e León Provincia León TerritorioCoordinate42°40′00.12″N 6°38′07.08″W / ...

 

Cinnamomum Cinnamomum camphora Klasifikasi ilmiah Kerajaan: Plantae Klad: Tracheophyta Klad: Angiospermae Klad: Magnoliid Ordo: Laurales Famili: Lauraceae Genus: CinnamomumSchaeff. Spesies Lihat teks. Sinonim Sassafridium Meisn. Temmodaphne Kosterm. Cinnamomum tamala, dengan daun-daun muda, di Kerala, India Cinnamomum adalah suatu genus tumbuhan pepohonan dan perdu aromatik evergreen yang tergolong famili Lauraceae (Suku Kamper-kamperan). Pohon Cinnamomum dalam sebuah naskah bahasa Arab dari...

 

Strategi Solo vs Squad di Free Fire: Cara Menang Mudah!