ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (IGNITE-1346) Implement striped spin busy lock.
Date Thu, 04 Aug 2016 05:52:20 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vladimir Ozerov resolved IGNITE-1346.
-------------------------------------
    Resolution: Fixed

> Implement striped spin busy lock.
> ---------------------------------
>
>                 Key: IGNITE-1346
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1346
>             Project: Ignite
>          Issue Type: Task
>          Components: general
>    Affects Versions: 1.1.4
>            Reporter: Vladimir Ozerov
>            Assignee: Vladimir Ozerov
>             Fix For: 1.8
>
>
> We have lots of places in code which require "busy" state semantics:
> 1) Multiple readers access some resource concurrently setting "busy" state.
> 2) At some point a single writer comes, prevents all further readers from accessing the
resource, and blocks until all other previous reades are out.
> Currently we do that using either GridBusyLock or GridSpinBusyLock. The first one is
based on ReentrantReadWriteLock and the second one is based on GridSpinReadWriteLock. 
> Both implementation have the same performance characteristics, being limited by CPU bus
bandwidth when trying to update atomically a shared variable. 
> Better approach is to "stripe" the lock across multiple variables this minimizing contention
between threads. That is, in ideal case each thread increments/decrements his own variable
without any contention. Writer will have to iterate over all these variables and block on
each until all readers are out.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message