Posts

Watching the world from the intersection of Software and Life

In the beginning ... Over the many years of my career I have gained a strong respect for many software development practitioners. I have known may people with amazing talent, energy, intellect, and understanding of software development issues, languages, and practices. These people produced in me a naive respect for the entire field of software development.  Recently I have been asking myself Who put the sham in the shamalma dingdong? I see software products on the market with minimal connection to either correct behavior or robust behavior. For decades now the most frequent software vulnerability has been buffer overflows. While many buffer overflows have been fixed over the years, there does not seem to be any reduction in buffer overflow vulnerabilities. While some programming languages provide garbage collection, memory leaks abound in current operational code. Java and C# provide garbage collection as the default behavior of their implementations, but sometimes Java...

Parallel Addition

Image
Parallel Addition Description While sequential addition of a set of numbers, such as the elements of an array, is well understood, the implementation of a parallel addition algorithm provides both a new set of challenges and an opportunity to use more than one core on your computer. The concept behind this parallel addition algorithm is to create several tasks, each of which reads a pair of values from the set of values to be added, performs the addition, then puts its result back into the set of values to be added. When the set of values to be added is reduced to 1 the addition is complete, and the remaining value in the set is the final total. The following figures graphically show a concept of how the algorithm works. In practice the exact pairing of values to be added may differ. That difference is not important to the result of the program because addition is commutative. Illustration 1: Initial Data Set In this example each parallel task will extract two values fro...

Concurrency Behaviors

Concurrency Behaviors General concurrency behaviors Prior to the general availability of multiple core hardware architectures there was very little to be gained by the use of concurrent or parallel program design. The overhead of thread switching on a single processor almost always resulted in slower performance than could be achieved with traditional serial programming design. Now that a majority of our computing systems, whether personal computers, laptops, tablets, mainframes, super computers, or cell phones operate on hardware with multiple processor cores, there is a real need to build an understanding of concurrent or parallel processing design. Concurrent program design promises high efficiency, if we can only master the complexity of sharing and combining data from concurrent, and therefore largely asynchronous execution paths in our programs. While one can assign work to separate cores, if that work is performed in a synchronous manner, such as is done with t...