Journal of Computer Networks and Communications / 2008 / Article / Alg 1

Research Article

Internal Clock Drift Estimation in Computer Clusters

Algorithm 1

Pseudocode for the modified main interrupt request handler, used to sample the cycle counter at every GPS pulse per second in the Linux kernel.
/* Pseudocode for modified low level interrupt handling routine */
do_IRQ ()
/* Modification to read the cycle counter as early as possible */
if   ( interrupt is 4 (serial port) and clock experiment active ) {
read TSC cycle counter and store in buffer;
increment buffer pointer;
/* Normal content of do_IRQ in Linux */
Call the specialized interrupt handler based on interrupt number;
/* Modification for transferring the results to user space */
if   ( clock experiment active and buffer is full ) {
check that the alternate buffer was read by the daemon;
switch to the alternate buffer;
signal the daemon to read the filled buffer;

Article of the Year Award: Outstanding research contributions of 2020, as selected by our Chief Editors. Read the winning articles.