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:

Olivia LufkinInformasi latar belakangNama lahirOlivia LufkinNama lainOLIVIA inspi' REIRA (TRAPNEST)Lahir9 Desember 1979 (umur 44)Asal Naha, Prefektur OkinawaGenreJ-Pop, J-RockPekerjaanPenyanyi, pencipta laguTahun aktif1996 - sekarangLabelAvex trax (1996 - sekarang)Artis terkaitJeff LufkinSitus webhttp://www.avexnet.or.jp/olivia/ Olivia Lufkin atau biasanya dipanggil OLIVIA (lahir 9 Desember 1979) adalah wanita penyanyi dan pencipta lagu berkebangsaan Jepang dengan bahasa utama Inggris. A...

 

Dataran Tinggi Yunnan-GuizhouDataran Tinggi YunguiGeografi karst di Dataran Tinggi Yungui dekat GuiyangElevasi dasar500 m (1.600 ft) sampai dengan 2.500 m (8.200 ft)GeografiKoordinat26°N 105°E / 26°N 105°E / 26; 105Koordinat: 26°N 105°E / 26°N 105°E / 26; 105 Dataran Tinggi Yunnan-Guizhou Hanzi tradisional: 雲貴高原 Hanzi sederhana: 云贵高原 Alih aksara Mandarin - Hanyu Pinyin: Yúnguì Gāoyuán - Wade-Giles:...

 

New Zealand news TV programme Not to be confused with News Hub. 3 News redirects here. For 3News Ireland, see Virgin Media News. NewshubPresented bySam Hayes and Mike McRoberts (weeknights, Newshub Live at 6pm)Laura Tupou (weekends, Newshub Live at 6pm)Bernadine Oliver-Kerby (AM)Rebecca Wright (Newshub Late)Country of originNew ZealandProductionCamera setupMulti-cameraRunning time6 am: 180 minutes6 pm: 60 minutes9:30 pm: 30 minutes(all including advertisements)Production companies MediaWorks ...

Museum IrakMuseum Irak pada 2008Didirikan1926LokasiBaghdad, IrakUkuran koleksi170.000 – 200.000WisatawanTerbukaDirekturAhmed Kamil MuhammadSitus webIraqMuseum.com Museum Irak (Bahasa Arab: المتحف العراقي) adalah sebuah museum nasional Irak, yang terletak di Baghdad, Irak. Museum tersebut terkadang secara salah kaprah disebut Museum Nasional Irak, sebuah fenomena saat ini yang dipengaruhi oleh penamaan museum nasional dari negara lain; namun nama Museum Irak terinspirasi oleh na...

 

Fad diet in which only fruit and vegetable juices are consumed A pitcher of freshly-juiced kale, wheat grass, cauliflower, broccoli, carrot, apple, and lemon A cup of sweet lime juice Juice fasting, also known as juice cleansing, is a fad diet in which a person consumes only fruit and vegetable juices while abstaining from solid food consumption. It is used for detoxification, an alternative medicine treatment, and is often part of detox diets. The diet can typically last from one to seven da...

 

Numerical grade assigned following Common Criteria The Evaluation Assurance Level (EAL1 through EAL7) of an IT product or system is a numerical grade assigned following the completion of a Common Criteria security evaluation, an international standard in effect since 1999. The increasing assurance levels reflect added assurance requirements that must be met to achieve Common Criteria certification. The intent of the higher levels is to provide higher confidence that the system's principal sec...

American singer and TV personality (1919–1991) Tennessee Ernie FordFord in 1957Background informationBirth nameErnest Jennings FordBorn(1919-02-13)February 13, 1919Fordtown, Tennessee, USDiedOctober 17, 1991(1991-10-17) (aged 72)Reston, Virginia, USGenres Country pop gospel Occupation(s) Musician actor Instrument(s) Vocals acoustic guitar harmonica piano Years active1949–1991LabelsCapitol Records, Word RecordsMusical artist Ernest Jennings Ford (February 13, 1919 – October 17, 1991...

 

Motorcycle road racing event 2022 F.I.M. Grand Prix motorcycle racing season Previous 2021 Next 2023 2022 Moto2 World Championship2022 Moto3 World Championship2022 MotoE World Cup Francesco Bagnaia was the 2022 MotoGP World Riders' Champion. Fabio Quartararo, the defending World Riders' Champion, finished second. Enea Bastianini finished third in his second season in the MotoGP class. Marco Bezzecchi (pictured in 2023) became 'Rookie of the Year' in this season. The 2022 FIM MotoGP World Cham...

 

Designated marksman rifle United States Marine Corps Designated Marksman Rifle 7.62×51mm NATO Designated marksman rifleTypeDesignated marksman riflePlace of originUnited StatesService historyIn service2001–2014WarsWar in Afghanistan War in IraqSpecificationsMass4.5–5.0 kg (9.9–11.0 lb)Length1,118 mm (44.0 in)Barrel length559 mm (22.0 in)Cartridge7.62×51mm NATOActionGas-operated, rotating boltRate of fireSemi-automaticMuzzle&#...

此條目需要擴充。 (2015年11月27日)请協助改善这篇條目,更進一步的信息可能會在討論頁或扩充请求中找到。请在擴充條目後將此模板移除。 卡洛斯·梅内姆阿根廷總統府官方照片第47任阿根廷總統任期1989年7月8日—1999年12月10日副总统爱德华多·杜阿尔德卡洛斯·鲁考夫(英语:Carlos Ruckauf)前任劳尔·阿方辛 个人资料出生(1930-07-02)1930年7月2日 阿根廷拉里奥哈省阿尼利亚�...

 

Historic estate in Devon, England Great Fulford House in 2015, view from south-east Great Fulford House, view from south-east. 1780 watercolour, British Library.[1] The later remodelling by James Wyatt in 1805 replaced the gables with battlements and added full height bay windows at the corners Tudor main entrance to courtyard pierced through east front, Great Fulford House. Beyond is the front door leading to the great hall in the west wing. Above is an Elizabethan (16th century) rel...

 

American judge (born 1937) For the naval officer, see Charles W. Pickering (United States Navy officer). This biography of a living person needs additional citations for verification. Please help by adding reliable sources. Contentious material about living persons that is unsourced or poorly sourced must be removed immediately from the article and its talk page, especially if potentially libelous.Find sources: Charles W. Pickering – news · newspapers · books ...

Mathematical operation with two operands Not to be confused with Bitwise operation. A binary operation ∘ {\displaystyle \circ } is a rule for combining the arguments x {\displaystyle x} and y {\displaystyle y} to produce x ∘ y {\displaystyle x\circ y} In mathematics, a binary operation or dyadic operation is a rule for combining two elements (called operands) to produce another element. More formally, a binary operation is an operation of arity two. More specifically, a binary o...

 

Pietro Aretino Aretino retratado por Tiziano (1545). Palacio Pitti, FlorenciaInformación personalNacimiento 19 de abril de 1492Arezzo, República de FlorenciaFallecimiento 21 de octubre de 1556(64 años)Venecia, República de VeneciaCausa de muerte Morir de risa Sepultura Iglesia de San LucasNacionalidad ItalianoInformación profesionalOcupación Poeta, escritor y dramaturgo[editar datos en Wikidata] Pietro Aretino (Arezzo, 19 de abril de 1492 - Venecia, 21 de octubre de 1556) fue ...

 

Ruta Nacional 3 Comandante Luis Piedrabuena Provincia de Buenos Aires, Provincia de Río Negro, Provincia de Chubut, Provincia de Santa Cruz y Provincia de Tierra del Fuego, Antártida e islas del Atlántico Sur,  Argentina Desde arriba, de izquierda a derecha: Vista de la ruta en Chubut • La ruta en su paso por Buenos Aires • Parque eólico junto a la ruta • Puente de la ruta sobre el Río Olivia en Tierra del Fuego • Paso de la ruta por Santa Cruz Datos de la rutaIdentific...

Corporate identity guide Front cover of the manual The British Rail Corporate Identity Manual is a corporate identity guide created in 1965 by British Rail. It was conceived in 1964, and finished in July 1965 by British Rail's Design Research Unit,[1] and introduced British Rail's enduring double arrow logo, created by Gerald Barney and still in use today as the logo for National Rail.[2] The manual spanned four volumes, and was created as part of a comprehensive redesign of B...

 

Head of state and government of Egypt This article needs to be updated. Please help update this article to reflect recent events or newly available information. (May 2014) President of theArab Republic of Egyptرئيس جمهورية مصر العربيةPresidential StandardIncumbentAbdel Fattah el-Sisisince 8 June 2014StyleHis/Her ExcellencyResidenceHeliopolis Palace, Cairo, EgyptTerm length6 years,renewable oncePrecursorKing of EgyptFormation18 June 1953First holderMohamed NaguibSucce...

 

Evolutionary mechanism for speciation The mechanisms of reproductive isolation are a collection of evolutionary mechanisms, behaviors and physiological processes critical for speciation. They prevent members of different species from producing offspring, or ensure that any offspring are sterile. These barriers maintain the integrity of a species by reducing gene flow between related species.[1][2][3][4] The mechanisms of reproductive isolation have been classif...

BodhisenaBorn704 Died760  (aged 55–56) Bodhisena or Bodaisenna (704–760) was an Indian Buddhist scholar and monk known for traveling to Japan and China and establishing the Kegon school, the Japanese transmission of the Huayan school of Chinese Buddhism. His stay has been noted in the official history records called the Shoku Nihongi, where he is referred to as Bodai-Senna. Early years Bodhisena was born in Madurai around 704 AD. He got mystical inspiration from Manjusri Bodhis...

 

يو-4705   الجنسية  ألمانيا النازية الشركة الصانعة فريدريش كروب[1]  المالك  كريغسمارينه المشغل كريغسمارينه (2 فبراير 1945–3 مايو 1945)[1]  المشغلون الحاليون وسيط property غير متوفر. المشغلون السابقون وسيط property غير متوفر. التكلفة وسيط property غير متوفر. منظومة التعاريف ...