[Technology Report]
Parallel Programming Is Here To Stay
One size does not fit all, and it never will. Parallel programming looks to level the playing field by leveraging multicore hardware.
Guaranteeing that a function always returns the same value for a set of parameters means the code can be replicated. This type of distribution will be critical as the number of cores rises to the thousands and system-wide shared memory becomes a special case rather than the norm.
Likewise, unchanging variables means distribution of data can occur by copying information without regard to its source. This is akin to data that’s transmitted via a message-passing environment.
Unfortunately, programming with a pure functional programming language isn’t easy. This is especially true with a programming background in a non-functional programming language. One of the more notable pure functional programming languages is Haskell, which is named for Haskell Curry, a mathematician and logician.
The Haskell language appeared in the 1990s. Its features include pattern matching, single assignment semantics, and lazy evaluation. Lazy evaluation allows a list to be returned as a result from a function call but where the contents have not been generated.
The value of the list entries is computed when they are evaluated. This leads to the concept of an infinite list. It’s similar to generator functions or objects found in conventional languages such as C++. However, the next value isn’t returned through an explicit function call but rather when a value is evaluated.
Monads are an interesting abstract data-type concept that Haskell supports to address I/O, typically an area where side effects are common in conventional programming implementations. Monads are similar to lazy infinite lists, as they generate information on demand. Monads are object/method-oriented in implementation, though, making them easier to use in many instances.
While functional programming can be challenging, it can have significant benefits for parallel programming.
PARALLEL DEBUGGING Debugging needs to be addressed regardless of the parallel programming approach. Existing debuggers are simply the starting point, because most don’t address many of the features inherent in parallel programming, such as messaging, data distribution, and loading.
Tools like tracing, profiling, and optimizers will need to handle lots of data as well as provide insight into the parallel nature of the application. Tools created in academia are moving quickly to the production side. Real-time monitoring tools and declarative debuggers are just some areas where new ideas can come into play. Parallel programming will play an important role in taking advantage of the multicore hardware that’s being delivered.