Time-optimal, space-efficient single-scanner snapshots & multi-scanner snapshots using CAS
Time-optimal, space-efficient single-scanner snapshots & multi-scanner snapshots using CAS
复制标题
时间最优、空间高效的单扫描仪快照
DOI:
--
复制
发表时间:
2007
期刊:
影响因子:
--
通讯作者:
Nikolaos D. Kallimanis
中科院分区:
文献类型:
--
作者:
P. Fatourou;Nikolaos D. Kallimanis
Snapshots are fundamental shared objects which provide consistent views of blocks of shared memory. A snapshot object consists of an array of m memory cells and allows processes to execute UPDATES to write new values in any of the snapshot cells, and SCANS to return consistent views of all m cells. An interesting (weaker) form of snapshot with several applications is a single-scanner snapshot which allows to only one process, called scanner, to execute SCANS (UPDATES can still be executed concurrently).
We present the first time-optimal, single-scanner snapshot implementations from read-write registers for an asynchronous system of n processes. Our first algorithmis very simple and has time complexity O(1) for UPDATE and O(m) for SCAN, which is optimal. However, in systems with no garbage collector, the number of registers it uses is proportional to the number of executed SCANS. Our second implementation employs an interesting recycling technique to reduce the space complexity to O(mn) bounded-size registers still achieving optimal time complexities for both operations. These algorithms are simple and practical, and improve upon all previous algorithms in terms of time and space complexity. For systems that provide stronger primitives, like Compare-And-Swap (CAS), we provide a multi-scanner snapshot implementation that uses m+1 CAS registers and m read-write registers, and has time complexity O(1)for UPDATE and O(m) for SCAN.