Multi-socket Clock Calibration via Pre-computed Datasets
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In multi-socket computing systems, discrepancies in clock frequencies across nodes complicate determining the duration of tasks executed by multiple threads, leading to inefficiencies and unnecessary delays in timekeeping, especially with system calls and changes in node topology.
Innovation Solution
A method for calibrating clocks at each node relative to real time using calibration datasets that describe the relationship between CPU ticks and wall clock time, allowing for accurate task duration determination without relying on wall clock timestamps, and implementing a lock mechanism for data structure updates to ensure consistency and concurrent access.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If clock calibration is performed using wall clock timestamps, then time measurement accuracy is improved, but system call overhead and delays increase
Solution Approach 1:
The patent performs clock calibration in advance by comparing CPU ticks with wall clock timestamps before actual task execution. The calibration dataset is pre-computed and stored, eliminating the need for real-time wall clock queries during task duration measurement. This preliminary calibration action resolves the contradiction by preparing accurate time conversion relationships beforehand, thus maintaining measurement precision while avoiding system call overhead during critical operations.
2Measurement precision
If frequent clock recalibration is performed, then time measurement accuracy is improved, but system performance and productivity deteriorate
Solution Approach 1:
The patent implements periodic recalibration where the calibration interval dynamically increases after each calibration event. Instead of frequent continuous recalibration, the system performs calibration at spaced intervals, with the next calibration time being set to a future point based on the current calibration results. This periodic approach maintains clock accuracy while minimizing performance impact by avoiding excessive recalibration operations.
3Speed
If data structures are updated without locking mechanisms, then concurrent access speed is improved, but data consistency and reliability deteriorate
Solution Approach 1:
The patent extracts the critical section protection mechanism by using locks specifically for data structure updates while allowing free access to calibration data. The lock is acquired only when updating the calibration dataset in the data structure, and released immediately after. This selective locking approach protects data consistency during modifications while maintaining high-speed concurrent access during reading operations, resolving the contradiction between speed and reliability.
Data Source
AI summary
A thread executing a task at a node in a multi-socket computing system may access a first data structure to obtain a first calibration dataset for the node. The first thread may generate a timestamp based on the first calibration dataset and a first quantity of time measured by a clock at the first node. The real-time duration of the task may be determined based on the timestamp. The first thread may recalibrate the first clock by at least generating, based on the first quantity of time measured by the clock and a second quantity of time measured by a wall clock of an operating system of the multi-socket computing system, a second calibration dataset. The first thread may update the first data structure to include the second calibration dataset while a second thread accesses a second data structure to obtain calibration data.


