UnThread:Background
In recent years, the impending repeal of Moore's Law has been postponed by hardware manufacturers producing more processors in the same physical package, rather than continuing to ramp up the clock-speed of their processors. This means that software manufacturers now have the challenge of multithreading operations some of which are naturally monolithic tasks. This may be accomplished at one of 3 levels
- low-level multithreading: mostly compiler-assisted, semi-automatic use of multithreading in loops and other iteration constructs
- high-level multithreading: dividing the main task up into distinct phases and pipelining or overlapping these phases
- mid-level multithreading: multithreading a subtask more substantial than a local loop, but less substantial than an entire program phase
There are, of course, advantages and disadvantages to each approach – low-level multithreading often has little source code change, but usually only provides sporadic full utilization of resources; high-level multithreading also requires little source code change, but is simply not possible in every case; mid-level multithreading is more widely applicable, and capable of providing better resource utilization, but generally requires the most source code change vis-à-vis a single-threaded approach.
In addition, the current incarnation of multi-processor hardware has the property that the processors are not fully symmetric, in the sense that there exist resources that are shared by some processors (but not all) – some of this sharing is cooperative (e.g., RAM cache) and some is competitive (e.g. hyperthreading). This, in turn means that (at least potentially) gains may be made in multi-threaded programs by optimally setting the processor affinity of the various threads.
There are numerous programming challenges with the mid-level approach to multithreading – memory synchronization, hardware abstraction, effective affinity setting, bookkeeping issues – but the broad applicability and full resource utilization possible with this method make it applicable for use with high value software.
UnThread provides mid-level multithreading with significantly less source code changes, helping developers achieve significant speed improvements, sustained concurrency, better scalability and a faster time to market

