| OCR Text |
Show 4.7.6 Comparative Measurements The measurements in the previous section show the maximum performance of the Unison algorithm on a synthetic benchmark. In real applications, the algorithm usually executes with less than the maximum efficiency. The reason for less efficiency is that we may be able to combine together less than a full computer word of Boolean operations. To obtain realistic performance figures, the Unison algorithm was tested on a real application, the processing of events. During a process execution, events that describe the execution are collected. Events include information such as the program counter, instructions executed, memory accesses, and so on. Since only certain conditions of a computer system that occur during the execution are interesting, events are postprocessed to detect these conditions. The conditions are specified as Boolean expressions [69]. An example that is used here is to find all events where a chosen procedure sets a chosen variable to a nonzero value. Such a condition can be useful in checking the synchronization of concurrent processes. The Boolean expression, denoted as D, for the condition is: D = (PC > addr_0) && (PC < addr_l) && (memory == addr_2) && (value != 0). The first two comparisons in D check if the program counter value is inside the chosen function. The third comparison in D checks if the memory location accessed is the chosen variable. The fourth comparison in D checks if the value written is nonzero. All four comparisons are combined with logical AND to get the final result. Boolean expression D was evaluated using four different methods: compiled, compiled with precalculated comparisons, interpreted, and the Unison algorithm. The code for these four methods is shown below. I l l |