TWA – Ticket Locks Augmented with a Waiting Array

10/03/2018
by   Dave Dice, et al.
0

The classic ticket lock consists of ticket and grant fields. Arriving threads atomically fetch-and-increment ticket and then wait for grant to become equal to the value returned by the fetch-and-increment primitive, at which point the thread holds the lock. The corresponding unlock operation simply increments grant. This simple design has short code paths and fast handover (transfer of ownership) under light contention, but may suffer degraded scalability under high contention when multiple threads busy wait on the grant field – so-called global spinning. We propose a variation on ticket locks where long-term waiting threads wait on locations in a waiting array instead of busy waiting on the grant field. The single waiting array is shared among all locks. Short-term waiting is accomplished in the usual manner on the grant field. The resulting algorithm, TWA, improves on ticket locks by limiting the number of threads spinning on the grant field at any given time, reducing the number of remote caches requiring invalidation from the store that releases the lock. In turn, this accelerates handover, and since the lock is held throughout the handover operation, scalability improves. Under light or no contention, TWA yields performance comparable to the classic ticket lock, avoiding the complexity and extra accesses incurred by MCS locks in the handover path, but providing performance above or beyond that of MCS at high contention.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/27/2017

Light field super resolution through controlled micro-shifts of light field sensor

Light field cameras presents new capabilities, such as post-capture refo...
research
07/11/2016

Recurrent Memory Array Structures

The following report introduces ideas augmenting standard Long Short Ter...
research
01/17/2022

Real-Time Computer-Generated EIA for Light Field Display by Pre-Calculating and Pre-Storing the Invariable Voxel-Pixel Mapping

The elemental image array (EIA) for light field display, especially inte...
research
08/16/2018

A Pipeline for Lenslet Light Field Quality Enhancement

In recent years, light fields have become a major research topic and the...
research
12/31/2019

Microlens array grid estimation, light field decoding, and calibration

We quantitatively investigate multiple algorithms for microlens array gr...
research
06/18/2020

Structure and Design of HoloGen

Increasing popularity of augmented and mixed reality systems has seen a ...
research
10/03/2018

BRAVO – Biased Locking for Reader-Writer Locks

Designers of modern reader-writer locks confront a difficult trade-off r...

Please sign up or login with your details

Forgot password? Click here to reset