Browse Prior Art Database

Method for managing resources with minimum spin-lock usage in multithreaded and asynchronous environments

IP.com Disclosure Number: IPCOM000022134D
Publication Date: 2004-Feb-25
Document File: 2 page(s) / 37K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a method for managing resources with minimum spin-lock usage in multithreaded and asynchronous environments. Benefits include improved functionality and improved performance.

This text was extracted from a Microsoft Word document.
This is the abbreviated version, containing approximately 61% of the total text.

Method for managing resources with minimum spin-lock usage in multithreaded and asynchronous environments

Disclosed is a method for managing resources with minimum spin-lock usage in multithreaded and asynchronous environments. Benefits include improved functionality and improved performance.

Background

         Guarded lists and queues typically include the following functions:

•         IsEmpty()

•         Length()

•         Push(Entry)

•         Pop()

•         PushHead(Entry)

•         InitializeWithLock()

•         AcquireLock()

•         ReleaseLock()

         Lists and queues are two data structure types used to dynamically maintain shared software resources. When software is designed for multithreaded environments, the lists and queues should be guarded by spinlocks. To get or place an entry from a list, the typical procedure is to obtain the list’s spinlock, get/place the entry, and release the spinlock (see Figure 1).

         The acquisition and release operations are expensive, taking more than 100 clock cycles as compared to a few cycles for other operations.

Description

         The disclosed method introduces three new functions:

•         PushList(List) – pushes the specified list at the end of the current list

•         PopList() – pops the current list

•         PushHeadList(List) – pushes the specified list to the head of the current list

         With the disclosed method the whole list can be obtained from the current list with the PopList function using one pair of acquire and release operations. The whole list can be saved using either PushList or PushHeadList function (see Figure 2).

         Expensive operations, such as acquire and release locks, can be avoided while maintaining synchronization.

         The disclosed method obtains (PopList) or places (PushList) an entire list with one pair of acquire/release operations. The...