Browse Prior Art Database

Method And System For Optimizing Cache Locks

IP.com Disclosure Number: IPCOM000201626D
Publication Date: 2010-Nov-16
Document File: 2 page(s) / 34K

Publishing Venue

The IP.com Prior Art Database

Abstract

A method and system for optimizing cache locks is disclosed. Here, a set of locks is used to serialize access to cache objects and a single lock is used to serialize the addition and deletion of cache objects.

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

Page 01 of 2

Method And System For Optimizing Cache Locks

Disclosed is a method and system for optimizing cache locks when multiple threads are accessing a common cache. The method involves, using a set of locks to serialize accesses to cache objects and using a single lock to serialize the addition and deletion of cache objects. Each incoming object is assigned a lock from the set of locks. The assignment of a lock for an object may be done based on the first letter of the object name, based on a receiving socket or thread ID, or by hashing the object name. For example, for financial market data, the first letter of a symbol name may be used to preselect a suitable object lock.

As soon as a financial market data message

(comprising symbol name, price, etc.) is received, the pre-assigned lock for that symbol name is retrieved from the set of locks without using any cache lock. Using this lock, a processing thread will lock the incoming object in the cache. During this period, if a new object is to be added to the cache, then the single cache lock is used to lock the entire cache. Subsequently, the new object is added and the cache lock is released.

The figure exemplarily illustrates a stock exchange sending financial data on three channels. Here, the financial data is partitioned such that channel 1 transmits symbols

A to C, channel 2 transmits symbols D to F and channel 3

(This page contains 00 pictures or other non-text object)

Figure

The data corresponding to each channel...