Application Exploitation

There are some very attractive benefits of OS/2 for SMP V2.11 beyond the increased raw CPU power. Caching is a technique that is employed in both hardware and software to increase performance. SMPs increase the effectiveness of the various caches dramatically. An application that can divide its work into separate executing units such as threads will see performance increases across the hardware and software.

Each x86 processor (assuming 386 or higher) has a translation lookaside buffer (TLB) that keeps the most recent page translation addresses in a cache, so that every time the processor needs to translate a linear address into a physical address it does not have access the Page Directory and Page Table which reside in much slower memory. This cache is very limited in size. The more unique entries it encounters the less its effectiveness. An application which is single threaded makes use of only one TLB and probably causes thrashing within the TLB because of branching. However, with multiple processors, multithreaded applications will make use of N TLBs (where N is the number of threads and processors available). Thus the performance increase is more than just raw CPU power.

Beyond the TLB cache, these processors also contain Level 1 (L1) caches and OEMs will sometimes add Level 2 (L2) caches to their systems. The same advantages are applicable here but to a further degree.

There are also some advantages for software caches as well. Consider a file system cache where the effectiveness of the cache is largely determined by the hit ratio. If the cache receives large number of hits compared to misses, it is effective. The best way to achieve this is to keep the Most Recently Used (MRU) data in the cache. The best way to achieve this is to keep referencing the same data. A multithreaded application running on OS/2 for SMP V2.11 will cause this behavior to exist because the file system cache is being accessed in a shorter period of time by the same application. A single-threaded application with longer periods of access could allow for the cache to be flushed.

Secondly, an important aspect of a demand paged OS is its ability to keep the right set of pages in memory at the right times. With OS/2 for SMP V2.11 and a multithreaded application, the Page Manager can make a better decision because pages for this application are being accessed more frequently than before.


[Back: Application Compatibility Requirements]
[Next: New OS/2 for SMP V2.11 APIs]