13.07.2015 Views

automatically exploiting cross-invocation parallelism using runtime ...

automatically exploiting cross-invocation parallelism using runtime ...

automatically exploiting cross-invocation parallelism using runtime ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

municates these numbers to the checker thread. The checker compares the task’s accesssignature with all signatures from epochs earlier than the signature’s epoch, but at least asrecent as the epoch-task number pair recorded when the task began. Signatures from thesame epoch are safely ignored since they are not separated by a barrier. This avoids unnecessarycomparisons between two tasks in the same epoch to reduce the <strong>runtime</strong> overheadof the checker thread.Figure 4.6 is a timing diagram for speculative barrier execution. In the timing diagram,a task marked as indicates that the thread updates its epoch number to A and tasknumber to B when the task starts executing. Epoch number-task number pairs are notunique a<strong>cross</strong> threads, since each thread counts tasks independently. When worker thread3 starts task , the other worker threads are still executing task in the secondepoch. The access signatures of these three tasks need to be checked against that of task. Before task finishes, all other threads have already begun the fourth epoch.As a result, the access signatures of task in threads 1, 2, and 4 and in thread4 need to be checked against that of task .Figure 4.7 shows the order of operations for worker threads. At the beginning of a task,the worker thread updates the epoch and task numbers, then records the current epoch andtask numbers for the other threads. Next, the worker executes the task. While executingthe task, the worker computes the memory access signature. Finally, the worker threadsaves its signature in a signature log and sends information to the checker thread so thechecker thread can detect misspeculation asynchronously. Figure 4.8 demonstrates the datastructure used for signature logging. Each worker threads has one thousand entries in thesignature log because checkpointing is operated every thousandth epochs. Worker threadssynchronize at the checkpoint and signature log entries can be re-used after checkpointing.Each entry of the signature log contains a pointer to an array used for saving signatureswithin a single epoch. The size of the array is initialized to store 1024 signatures andexpand if the number of tasks exceeds the array size. For 24 threads, this signature log61

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!