Programming Models Flashcards
What is Flynn’s Taxonomy?
• Michael J. Flynn in 1972 came up with models of computing, by separating Instruction Streams and Data Streams
What is Shared Memory Programming?
All memory is accessible
• Limited to addressable memory
• Limited to the number of cores
What is Distributed Memory Programming?
• Data exchange has to be explicit
• Network latency/bandwidth become important.
• Expandable; more memory/cores as and when you need them
How is Shared Memory Programming programmed?
• Programmed using OpenMP (among other thread-programming models)
• Easier to program, but easier to make mistakes like race conditions
• Directives based (#pragma omp…)
• Incremental changes to code
• Same code also works well on single core, without OpenMP
• MPI works for shared memory as well
How is Distributed Memory Programming programmed?
Programmed with MPI
• Message parsing interface
• Explicit communication using library calls
• More intrusive – your code typically needs to be (re)written with MPI in mind
• Different implementations of the MPI standard
• Non-portable – Code written with MPI has to use MPI
How is Shared Memory Programming distributed?
• Used within a single node distributed over cores
How is Shared Memory Programming limited?
• Mostly limited by memory:
• Resource contention (traffic on the bus, accessing the same memory)
Context switching can be an issue (not on Barkla)
What is a Makefile?
• A makefile is used to place compiler instructions under simple commands