Programming model: Difference between revisions

Content deleted Content added
m 1- Adding a must "For example" clause. 2- Editing some sentences to make sense to some extent!
m top: Removed the term's capitalization and cleaned up the artifacts of external copy writing (invisible for readers but could be quite annoying to the editors).
Line 1:
{{About| the definition of the term 'programming model'| classification of programming languages| Programming paradigm}}
 
A '''Programming Modelmodel''' refers to the style of programming where execution is invoked by making what appear to be [[Programming library|library]] calls. Examples include the [[POSIX Threads]] library and Hadoop's [[MapReduce]].<ref>{{cite web
| url = https://www.ibm.com/software/data/infosphere/hadoop/mapreduce/
| title = What is MapReduce
| author = IBM
}}</ref> In both cases, the [[execution model]] is different from that of the base language in which the code is written. For example, the [[C programming language]] has no execution model for thread behavior. But thread behavior can be invoked from C syntax, by making, what appears to be, a call to a normal C library.
 
What distinguishes a programming model from a normal library is that the behavior of the call cannot be understood in terms of the language the program is written in. For example, the behavior of calls to the POSIX thread library cannot be understood in terms of the C language. The reason is that the call invokes an execution model that is different from the execution model of the language. This invocation of an outside execution model is the defining characteristic of a programming model.
 
In [[parallel computing]], the execution model often must expose features of the hardware in order to achieve high performance. The large amount of variation in parallel hardware causes a concurrent need for a similarly large number of parallel execution models. It is impractical to make a new language for each execution model, hence it is a common practice to invoke the behaviors of the parallel execution model via an API. So, most of the programming effort is done via parallel programming models rather than parallel languages. Unfortunately, the terminology around such programming models tends to focus on the details of the hardware that inspired the execution model, and in that insular world the mistaken belief is formed that a programming model is only for the case when an execution model is closely matched to hardware features.<ref>{{cite web
| url = https://asc.llnl.gov/content/assets/docs/exascale-pmWG.pdf
| title = Programming Models