Questions Parallel Programming Shared memory performance issues

Slides:



Advertisements
Similar presentations
Optimizing single thread performance Dependence Loop transformations.
Advertisements

Section 3. True/False Changing the order of semaphores’ operations in a program does not matter. False.
1 Programming Explicit Thread-level Parallelism  As noted previously, the programmer must specify how to parallelize  But, want path of least effort.
Slides 8d-1 Programming with Shared Memory Specifying parallelism Performance issues ITCS4145/5145, Parallel Programming B. Wilkinson Fall 2010.
PARALLEL PROGRAMMING WITH OPENMP Ing. Andrea Marongiu
Computer Architecture II 1 Computer architecture II Programming: POSIX Threads OpenMP.
1 ITCS4145/5145, Parallel Programming B. Wilkinson Feb 21, 2012 Programming with Shared Memory Introduction to OpenMP.
CS 470/570 Lecture 7 Dot Product Examples Odd-even transposition sort More OpenMP Directives.
Determine whether each curve below is the graph of a function of x. Select all answers that are graphs of functions of x:
Programming with Shared Memory Introduction to OpenMP
1 Copyright © 2010, Elsevier Inc. All rights Reserved Chapter 5 Shared Memory Programming with OpenMP An Introduction to Parallel Programming Peter Pacheco.
15-740/ Oct. 17, 2012 Stefan Muller.  Problem: Software is buggy!  More specific problem: Want to make sure software doesn’t have bad property.
Work Replication with Parallel Region #pragma omp parallel { for ( j=0; j
Consider the program fragment below left. Assume that the program containing this fragment executes t1() and t2() on separate threads running on separate.
Sum of Arithmetic Sequences. Definitions Sequence Series.
Symbolic Analysis of Concurrency Errors in OpenMP Programs Presented by : Steve Diersen Contributors: Hongyi Ma, Liqiang Wang, Chunhua Liao, Daniel Quinlen,
Special Topics in Computer Engineering OpenMP* Essentials * Open Multi-Processing.
CPE779: More on OpenMP Based on slides by Laxmikant V. Kale and David Padua of the University of Illinois.
Synchronization Questions answered in this lecture: Why is synchronization necessary? What are race conditions, critical sections, and atomic operations?
1 Programming with Shared Memory - 3 Recognizing parallelism Performance issues ITCS4145/5145, Parallel Programming B. Wilkinson Jan 22, 2016.
1 Programming with Shared Memory - 2 Issues with sharing data ITCS 4145 Parallel Programming B. Wilkinson Jan 22, _Prog_Shared_Memory_II.ppt.
Synchronization Exercises. Exercise 1 r Let S be a semaphore that is initialized to 2 r Consider the following: down(S) up(S) down(S) r Does this program.
Potential for parallel computers/parallel programming
Introduction to OpenMP
SHARED MEMORY PROGRAMMING WITH OpenMP
Loop Parallelism and OpenMP CS433 Spring 2001
Introduction to OpenMP
SHARED MEMORY PROGRAMMING WITH OpenMP
Rational and Irrational Numbers 2
OpenMP Quiz B. Wilkinson January 22, 2016.
מפגש 2 חשיבה תוצאתית שמעיה דוד
Instructor’s Intent for this course
Synchronization Memory Consistency
Unit 6 Review Sheet Answers
X-STANDARD MATHEMATICS ONE MARK QUESTIONS
Further Mathematics Support Programme
Introduction to High Performance Computing Lecture 20
Programming with Shared Memory Introduction to OpenMP
Quiz Questions Suzaku pattern programming framework
Quiz Questions Parallel Programming Parallel Computing Potential
Quiz Questions Seeds pattern programming framework
Hybrid Parallel Programming
Programming with Shared Memory Specifying parallelism
Questions Parallel Programming Shared memory performance issues
Multithreading Why & How.
OpenMP Quiz.
Userspace Synchronization
Instructor: Craig Duckett
Quiz Questions Seeds pattern programming framework
QUIZ 5 – RESULT.
Why we have Counterintuitive Memory Models
Potential for parallel computers/parallel programming
Programming with Shared Memory - 2 Issues with sharing data
Questions Parallel Programming Shared memory performance issues
Quiz Questions Iterative Synchronous Pattern
Programming with Shared Memory - 3 Recognizing parallelism
Potential for parallel computers/parallel programming
Programming with Shared Memory Specifying parallelism
Quiz Questions Parallel Programming Parallel Computing Potential
Quiz Questions Parallel Programming Parallel Computing Potential
Quiz Questions Parallel Programming Parallel Computing Potential
Shared memory programming
Quiz Questions CUDA ITCS 4/5145 Parallel Programming, UNC-Charlotte, B. Wilkinson, 2013, QuizCUDA.ppt Nov 12, 2014.
Data Parallel Pattern 6c.1
9 x 14 9 x 12 Calculate the value of the following: 1 9 × 5 =
BANKER’S ALGORITHM Prepared by, Prof
Quiz Questions Iterative Synchronous Pattern
EN Software Carpentry Python – A Crash Course Esoteric Sections Parallelization
Data Parallel Computations and Pattern
Data Parallel Computations and Pattern
Presentation transcript:

Questions Parallel Programming Shared memory performance issues ITCS 4/5145 Parallel Programming, UNC-Charlotte, B. Wilkinson, 2013, QuizQuestions8d.ppt Oct 8, 2013

Both locks and semaphores can be used to control access to critical sections. Name one additional feature provided with semaphores? (More than one acceptable answer.) . None of the other answers.

Use Bernstein’s conditions to determine whether the sequence can be executed in parallel: a = b + c; y = 3; a = 3; x = y + z: Clearly show how you got your answer. (No marks for just yes or no!)

Use Bernstein’s conditions to determine whether the two code sequences: forall (i = 0 i < 4; i++) a[i] = a[i+3]; for (i = 0 i < 4; i++) always produce the same results. Clearly show how you got your answer. (No marks for just yes or no!)

How many threads could be used for the computation below, each thread executing one or more of the instructions: x++ ; a = x + 2; b = a + 3; c++; without changing the code. Explain clearly your answer. . None of the other answers.

Bernstein’s conditions are sufficient but not necessary conditions (in the mathematical sense) to establish whether statements can be executed in parallel. Devise a sequence of two statements that fails Bernstein’s conditions but still can be executed in parallel or in any order?

How many conditions need to be tested to determine whether 4 statement can be executed in parallel according to Bernstein’s conditions? . None of the other answers.

Why does false sharing reduce performance of shared memory programs Why does false sharing reduce performance of shared memory programs? (This question is not asking what is false sharing.) . It doesn’t. None of the other answers.

Explain the potential false sharing effect in the following code main { int x,y; ... #pragma omp parallel (shared x,y) { tid = omp_get_thread_num(); if (tid == 0) x++; if (tid == 1) y++; } … Suggest how could false sharing be prevented in this code.