[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.programming.threads

Re: About lockfree and waitfree... (2nd try

Chris M. Thomasson

5/1/2014 7:48:00 AM

> "Ivan Godard" wrote in message news:lj6qhp$vus$1@dont-email.me...

> On 4/22/2014 2:21 PM, Chris M. Thomasson wrote:
[...]

> Conclusion: classic RCU should work with the same costs and scale
> factors, but using the Mill optimistic concurrency is more general and
> scales better than classic, especially in high-update and high core
> count environments.

> That is, if I have understood the RCU :-)

I think you have: Thanks Ivan.


FWIW, here is some more interesting
information on RCU:

https://lwn.net/Artic...

There is a quick quiz in the article on
using RCU within the realm of Linux...

;^)
3 Answers

Joel

3/1/2008 2:50:00 AM

0

The fix is easy

from
For Each cell In Columns(firstcol)
to
For Each cell In Range(firstcol)

"Sheryl" wrote:

> Wow, I don't think I had a chance to blink before you responded. Awesome
> response time. My code is stopping at the
> If cell <> "" Then
> I haven't messed with much code lately and don't know where to begin to get
> this to run. Am I missing something I need to add?
>
> "Joel" wrote:
>
> > Here is a more complete solution
> >
> > Sub fixcolumn()
> >
> > firstcol = "D:D"
> > For Each cell In Columns(firstcol)
> > If cell <> "" Then
> > First_Underscore = InStr(cell, "_")
> > Second_Underscore = InStr(First_Underscore + 1, cell, "_")
> > If Second_Underscore > 0 Then
> > FirstWord = Left(cell, Second_Underscore - 1)
> > SecondWord = Mid(cell, Second_Underscore + 1)
> > cell = FirstWord
> > cell.Offset(0, 1) = SecondWord
> > End If
> > End If
> > Next cell
> >
> > "Sheryl" wrote:
> >
> > > I need to write code for Text to Columns for the cells I select and they
> > > would always be in the same column, but could be any column. Each cell
> > > contains one or more underscores, but I need it split up at the second
> > > underscore. I don't have a clue on how to write this, can you help?
> > > Example starting with would be:
> > > First-Set-Of-Words_SecondSet_ThirdSet
> > > I need:
> > > First Column Second Column
> > > First-Set-Of-Words_SecondSet ThirdSet
> > > I need this split between the second and third set dropping the second
> > > underscore too and to remain as text format.

Joel

3/1/2008 2:51:00 AM

0

You didn't specify the column so I used D:D. Change this as necessary

"Sheryl" wrote:

> Wow, I don't think I had a chance to blink before you responded. Awesome
> response time. My code is stopping at the
> If cell <> "" Then
> I haven't messed with much code lately and don't know where to begin to get
> this to run. Am I missing something I need to add?
>
> "Joel" wrote:
>
> > Here is a more complete solution
> >
> > Sub fixcolumn()
> >
> > firstcol = "D:D"
> > For Each cell In Columns(firstcol)
> > If cell <> "" Then
> > First_Underscore = InStr(cell, "_")
> > Second_Underscore = InStr(First_Underscore + 1, cell, "_")
> > If Second_Underscore > 0 Then
> > FirstWord = Left(cell, Second_Underscore - 1)
> > SecondWord = Mid(cell, Second_Underscore + 1)
> > cell = FirstWord
> > cell.Offset(0, 1) = SecondWord
> > End If
> > End If
> > Next cell
> >
> > "Sheryl" wrote:
> >
> > > I need to write code for Text to Columns for the cells I select and they
> > > would always be in the same column, but could be any column. Each cell
> > > contains one or more underscores, but I need it split up at the second
> > > underscore. I don't have a clue on how to write this, can you help?
> > > Example starting with would be:
> > > First-Set-Of-Words_SecondSet_ThirdSet
> > > I need:
> > > First Column Second Column
> > > First-Set-Of-Words_SecondSet ThirdSet
> > > I need this split between the second and third set dropping the second
> > > underscore too and to remain as text format.

Chris M. Thomasson

5/25/2014 8:17:00 PM

0

> "Chris M. Thomasson" wrote in message
> news:ljsu7l$1ou$1@speranza.aioe.org...

> > "Ivan Godard" wrote in message news:lj6qhp$vus$1@dont-email.me...

> On 4/22/2014 2:21 PM, Chris M. Thomasson wrote:
> [...]

> > Conclusion: classic RCU should work with the same costs and scale
> > factors, but using the Mill optimistic concurrency is more general and
> > scales better than classic, especially in high-update and high core
> > count environments.

The writer side of RCU can be based on clever optimistic
concurrency impl for sure. IMVHO, a mix of simple
atomic exchange, and fetch-and-add along with the
existing optimistic concurrency scheme might be able
to give the best of both worlds.


> That is, if I have understood the RCU :-)

FWIW, the reader side of RCU has to be "as free as can
be". If it is not, then the read part of RCU can quickly loose
its luster.

A DEC Alpha forces RCU to execute a damn memory barrier
for a simple data-dependent load... Ouch.