Parallel Programming
Prolog: Why Bother?
- As an architect why should you be concerned with parallel programming?
- Understanding program behavior is very important in developing high-performance computers
- An architect designs machines that will be used by the software programmers: so need to understand the needs of a program
- Helps in making design trade-offs and cost/performance analysis i.e. what hardware feature is worth supporting and what is not
- Normally an architect needs to have a fairly good knowledge in compilers and operating systems
Agenda
- Steps in writing a parallel program
- Example
Writing a Parallel Program
- Start from a sequential description
- Identify work that can be done in parallel
- Partition work and/or data among threads or processes
- Decomposition and assignment
- Add necessary communication and synchronization
- Map threads to processors ( Mapping )
- How good is the parallel program?
- Measure speedup = sequential execution time/parallel execution time = number of processors ideally
|