• An efficient speculation predictor to identify opportunities to relax concurrency constraints
• Design and implementation of efficient support for speculation and conflict detection
• Experimental evaluation of the speculation overheads
and accuracy.
2. BACKGROUND AND MOTIVATION
Consider the example program in Figure 1(a) that computes array A. The corresponding recursive version (Figure 1(a)) divides the work into four quadrants and computes
them recursively. The spawn and sync keywords in the recursive program represent the concurrency and synchronization annotations in a Cilk program. The dependences (a.k.a.
the spawn and sync annotations) in the recursive program
are induced by dependences in the loop program. The quadrant A00 begins execution of a given task. A01 and A10
depend on A00 and are separated from the processing of
A00 by a sync. A01 and A10 can themselves be processed
concurrently and are invoked with a spawn keyword without
any intervening synchronization. A11 depends on both A01
and A10 and is ordered appropriately.
Recursive programs exhibit many desirable properties. The
recursive structure often mirrors the dependence structure
in the element-level program specification, simplifying programming. Besides the ease of programming, such a structure accesses recursively smaller portions of the array. As
a result, recursive structure is often employed in designing
cache-oblivious algorithms [3].
While recursive programs alleviate the burden on the programmer, their structures can prevent them from achieving
good speedups on large multi-core systems. On occasion, recursive programming can incur the cost of increased critical
path length. For example, the optimal critical path length
for the example in Figure 1(a) is Θ(n), whereas the critical
path length of the recursive version is Θ(nlog2 3) for a nxn
matrix. The cause for this suboptimal critical path length is
the inherently coarser dependencies required by the recursive expression. In Figure 1(a), not all of the quadrant A01
(or A10) must wait for all of quadrant A00 to be computed.
In Figures 1(b) and 2(a), the dependence-induced dags and
corresponding critical paths are illustrated for a problem
size of 4 (ihi-ilo=jhi-jlo=4). For example, given a problem
size of 4, the dependence-induced dag for the loop version
in Figure 1(a) has a critical path length of 7, compared to 9
for the recursive Cilk version.
In general, mapping a computation dag onto a Cilk-like
recursive parallel model can increase the critical path length
and result in reduced scalability due to decreased available parallelism. Decreased available parallelism caused by
coarser dependencies, together with large core counts, can
lead to poor scalability. We aim to preserve the simplicity
of recursive programming by recovering the lost concurrency
in such overly constrained recursive programs.
3. CilkSpec OVERVIEW
As identified in Section 2, certain dependencies in recursive parallel programs are extraneous. To overcome the constraints they impose, we need a mechanism that at runtime
determines which of the expressed dependencies are true
and which ones are artificial, merely an artifact of recursive expression. To this end, a classic technique employed
is speculation that enables optimistic elision of an expressed
dependency while relying on precise data access tracking to
rollback in the event of a conflict. In our approach (referred
to as CilkSpec), we too employ speculation to explore the
expressed dependencies and derive newer, more relaxed dependencies to recover the concurrency lost due to recursive
program specification. While employed in varied contexts,
such as loops, speculation for recursive parallel programs
presents some interesting opportunities and challenges.
One key challenge in optimistic concurrency involves identifying valid speculation opportunities. While this challenge
is inherent in any speculation approach, the structured nature of recursive programs aids in designing a speculation
predictor, which not only can quickly learn the profitable
speculation opportunities, but also accomplish this by tracking only a subset of all tasks in the system. The parent-child
relationship present in recursive programs implies that any
speculation in the parent could depend only on tasks present
in the child computations, which are incomplete. We exploit
this opportunity to design an efficient predictor with learns
fast, tracks less, and has low space overhead.
Another key challenge in speculation is maintaining correctness, which requires precise data access tracking to detect when a true data dependency is violated or a conflict
is detected. The overhead for such tracking largely depends
on the granularity at which this tracking is done. Again,
the regular structure of recursive programs aids in keeping
this overhead in check. Recursive programs typically have a
base case that works on the smallest division of work present
in the computation. Instead of tracking
- ประสิทธิภาพการทำนายเพื่อระบุโอกาสที่จะผ่อนคลายข้อจำกัดการเห็นพ้องด้วยบริการออกแบบและการสนับสนุนที่มีประสิทธิภาพสำหรับการตรวจสอบความขัดแย้ง- ทดลองการประเมินการเก็งกำไรพรึ่บและความถูกต้อง2 . แรงจูงใจและภูมิหลังพิจารณาตัวอย่างในรูปที่ 1 ( a ) ที่คำนวณโดยวิธีการที่หลากหลายรุ่น ( รูปที่ 1 ( a ) ) แบ่งงานออกเป็นสี่เขต .พวกเขา recursively . การวางไข่และซิงค์ข้อมูลในโปรแกรมของการ recursive อื่นประสานในโปรแกรม cilk . การ dependences ( a.k.a .การวางไข่อื่นซิงค์ ) ในโปรแกรมผลจะเกิดจาก dependences ในโปรแกรมลูป ด้าน a00 เริ่มต้นการกำหนดงาน และ a01 A10ขึ้นอยู่กับ a00 และถูกแยกออกจากการประมวลผลของa00 โดยการซิงค์ a01 A10 สามารถตัวเองและถูกประมวลผลกัน หรือจะเรียกใช้ด้วยการวางไข่โดยใด ๆที่แทรกประสาน ขึ้นอยู่กับทั้ง a01 A11กับ A10 และสั่งให้อย่างเหมาะสมโปรแกรมแสดงผลคุณสมบัติที่พึงปรารถนามาก ที่โครงสร้าง recursive โครงสร้างการพึ่งพากระจกบ่อยๆด้านสเปคระดับโปรแกรมปรับปรุงโปรแกรม นอกจากความสะดวกในการเขียนโปรแกรม เช่นโครงสร้างการเข้าถึงส่วน recursively เล็กของเรย์ เป็นผล , มักใช้ในการออกแบบโครงสร้าง recursiveแคชลบเลือนขั้นตอนวิธี [ 3 ]ในขณะที่วิธีการโปรแกรมบรรเทาภาระในการเขียนโปรแกรมโครงสร้างของพวกเขาสามารถป้องกันพวกเขาจากการบรรลุspeedups ที่ดีบนระบบแบบขนาดใหญ่ ในโอกาสนี้ ผู้เขียนโปรแกรมสามารถทำให้ต้นทุนเพิ่มขึ้น วิกฤตความยาวของเส้นทาง ตัวอย่างเช่น , ที่เหมาะสมความยาวพาธสำหรับตัวอย่างในรูปที่ 1 ( a ) Θ ( N ) ส่วนอย่างมีวิจารณญาณความยาวของเส้นทางของรุ่น recursive คือΘ ( nlog2 nxn 3 ) สำหรับเมทริกซ์ สาเหตุนี้ suboptimal มีความยาวเส้นทางคือโดยเนื้อแท้ coarser การอ้างอิงบังคับใช้โดยการแสดงออกของผู้ . ในรูปที่ 1 ( a ) , ไม่ทั้งหมดของ a01 ตอ.หรือ ( A10 ) ต้องรอทั้งหมดของ a00 ต้องคํานวณตัวเลข 1 ( B ) และ 2 ( ) , และการกระตุ้นเดคากรัมที่สำคัญเส้นทางเป็นภาพประกอบ สำหรับปัญหาขนาด 4 ( ihi องค์การแรงงานระหว่างประเทศ = jhi jlo = 4 ) ตัวอย่าง ระบุปัญหาขนาด 4 , การพึ่งพาการแดกให้ห่วงรุ่นในรูปที่ 1 ( a ) มีความยาวพาธ 7 , เมื่อเทียบกับ 9สำหรับผู้ cilk รุ่นโดยทั่วไป แผนที่การคำนวณวันที่ลงบน cilk เหมือนวิธีการแบบขนานสามารถเพิ่มความยาวพาธและผลในการลดลงของตลาด เนื่องจากความ . ลดลงของความเท่าเทียม ที่เกิดจากชนิดการอ้างอิงพร้อมกับนับหลักขนาดใหญ่ สามารถนำไปสู่การทำงานที่ไม่ดี เรามุ่งมั่นที่จะรักษาความเรียบง่ายผลของโปรแกรมการกู้คืนหายไปพร้อมกันโดยเช่นข้อ จำกัด มากเกินไป วิธีการทำโปรแกรม3 . cilkspec ภาพรวมตามที่ระบุในมาตรา 2 , หนึ่งในโปรแกรมแบบขนานจะพึ่งพาผู้ที่ไม่เกี่ยวข้อง เพื่อเอาชนะอุปสรรคที่พวกเขากำหนด เราต้องมีกลไกที่ไทม์กำหนดของแสดงการอ้างอิงจริงและคนที่จะประดิษฐ์ เป็นสิ่งประดิษฐ์ของการแสดงออกของผู้ . จบเรื่องนี้ คลาสสิคเทคนิคคือ การ ที่ ช่วย ให้ การตัดออกในแง่ดีของการแสดงโดยอาศัยข้อมูลที่แม่นยำในขณะที่การติดตามย้อนไปในเหตุการณ์ความขัดแย้ง ในแนวทางของเรา ( เรียกว่าเป็น cilkspec ) เราก็จ้าง การสำรวจแสดงการอ้างอิงและการสืบทอดใหม่ผ่อนคลายมากขึ้นพึ่งพาการกู้คืนสูญหายเนื่องจากผู้เห็นพ้องด้วยรายละเอียดโปรแกรม ในขณะที่ใช้ในบริบทที่หลากหลายเช่น ลูป , การโปรแกรมแบบขนาน recursive สำหรับของขวัญบางอย่างที่น่าสนใจ โอกาสและความท้าทายหนึ่งความท้าทายที่สำคัญในการระบุโอกาสในการเกี่ยวข้องกับการคาดการณ์ที่ถูกต้อง ในขณะที่ความท้าทายนี้อยู่ในการใด ๆวิธีการ แบบธรรมชาติของโปรแกรมช่วยในการออกแบบวิธีการเก็งทำนาย , ซึ่งไม่เพียง แต่สามารถเรียนรู้ปฏิโอกาสในการเก็งกำไร แต่ยังทำได้โดยการติดตามเพียงส่วนย่อยของงานทั้งหมดในระบบ ระหว่างความสัมพันธ์ที่มีอยู่ในโปรแกรมใด ๆ วิธีการ หมายถึงการเก็งกำไรในผู้ปกครองจะขึ้นอยู่เฉพาะในงานปัจจุบันเด็กในรูป ที่ไม่สมบูรณ์ เราใช้ประโยชน์จากโอกาสนี้ได้รับการปฏิบัติที่มีประสิทธิภาพเรียนรู้รวดเร็วติดตามน้อยลง และมีพื้นที่เหนือศีรษะต่ำอีกหนึ่งความท้าทายสำคัญในการรักษาความถูกต้อง ซึ่งต้องการข้อมูลที่แม่นยำ การติดตามเพื่อตรวจสอบเมื่อการพึ่งพาข้อมูลที่เป็นจริงเป็นละเมิดหรือขัดแย้งตรวจพบ ค่าใช้จ่ายสำหรับการติดตามดังกล่าวส่วนใหญ่ขึ้นอยู่บน granularity ที่ติดตามนี้เสร็จ อีกครั้งปกติโครงสร้าง recursive เอดส์ ใน การ รักษาค่าใช้จ่ายในการตรวจสอบ โปรแกรมโดยทั่วไปจะมีผลฐานกรณีที่ทำงานในส่วนที่เล็กที่สุดของงานปัจจุบันในการคำนวณได้ แทน
การแปล กรุณารอสักครู่..
