Browse Prior Art Database

Method for Standard Behavior in Transactional Lock Elision Implementations of Pthreads Mutex Locks

IP.com Disclosure Number: IPCOM000245442D
Publication Date: 2016-Mar-10
Document File: 3 page(s) / 98K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a method to track the Pthreads mutex locks to which each thread is applying transactional lock elision (TLE). The method determines which cases of applying TLE are guaranteed to conform to the standard specification, and then disallows those that are not guaranteed.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 53% of the total text.

Page 01 of 3

Method for Standard Behavior in Transactional Lock Elision Implementations of Pthreads Mutex Locks

Standard Portable Operating System Interface (POSIX) specifications of Pthreads mutex lock operations require specific behavior and/or reporting of errors in certain cases of incorrect use of Pthreads mutex locks .

Prior art transactional lock elision (TLE) implementations of Pthreads mutex locks (which allow higher concurrency and reduced overheads) are incapable of detecting certain cases of incorrect use of Pthreads mutex and are incapable of producing behavior consistent with the standard specification.

Figure 1: TLE implementations of Pthreads mutex do not conform to the standard specification

Figure 2: Errors Undetected by TLE

The novel contribution is a method to track the mutex (es) to which each thread is applying TLE. The method includes the ability to determine , based on this information,

which cases of applying TLE are guaranteed to conform to the standard specification . In cases where conformance with the specification is not guaranteed , TLE is not

1


Page 02 of 3

allowed and the conventional lock acquisition mechanism is used .

In a preferred embodiment, the method performs as follows:
Variables: Per thread pointer-sized variable called TLE_MUTEX that is initially NULL; may be placed in the thread structure

Steps in pthread_mutex_lock(mutex):

1. If TLE_MUTEX == mutex then issue HTM_abort() to abort the existing TLE transaction, preferably with an indication not to retry TLE

2. If TLE_MUTEX != NULL then fallback on the conventional non-TLE implementa...