Monday, June 1, 2009

comp.programming.threads - 7 new messages in 4 topics - digest

comp.programming.threads
http://groups.google.com/group/comp.programming.threads?hl=en

comp.programming.threads@googlegroups.com

Today's topics:

* AMD Advanced Synchronization Facility: HTM - 1 messages, 1 author
http://groups.google.com/group/comp.programming.threads/t/c1c6c6327aed79b6?hl=en
* Advertisement for 2D Game Developers Central - 1 messages, 1 author
http://groups.google.com/group/comp.programming.threads/t/a0486dfa09cbcc18?hl=en
* Thread within a thread - 2 messages, 1 author
http://groups.google.com/group/comp.programming.threads/t/94f39a94cfc85076?hl=en
* Marketing Professional Seeking Apprentice! - 3 messages, 2 authors
http://groups.google.com/group/comp.programming.threads/t/cc6b98f147c5d71c?hl=en

==============================================================================
TOPIC: AMD Advanced Synchronization Facility: HTM
http://groups.google.com/group/comp.programming.threads/t/c1c6c6327aed79b6?hl=en
==============================================================================

== 1 of 1 ==
Date: Sat, May 30 2009 8:12 am
From: EricP


EricP wrote:
>
> It depends on what one thinks of blocking events vs wait loops.
> One must remember that with ASF, the act of reading a memory
> location during an update causes an Abort.
> So contenders must go away and do something else for a while.
>
> If going with a wait loop approach, I decided in the end that
> using an atomic up-down counter to allocate delay time slots was
> the best approach.

In a nut shell, this is just a global counter to reserve time
delay slots and prevent contention. What we want to avoid is
an Abort loop where A locks some lines, B aborts A,
C aborts B, A aborts C, etc.

A locker is susceptible to contention during its Update Time (UT)
which is from the point where it does its first locked write
and begins to acquire exclusive ownership over the cache lines
until it COMMITs its changes. UT is primarily the time it
takes to move the cache lines from remote L2 to our local L2.

As I mentioned previously, the maximum UT window seems to be
quite variable across systems, from 50ns to 400ns so the code
would need to be able to learn how big a delay was required
for each contender.

The example below serializes contention, gives approximate
FIFO order, a linear delay for each contender,
and automatic timer adjustment.

Eric

// Up-down counter for allocating delay slots.
volatile LONG g_DelaySlotNum;

// Delay duration for each delay slot, automatically adjusted
volatile LONG g_DelayTicks = 100;

void DlinkSafePushAfter (DlinkPT priorP, DlinkPT newP)
{
LONG slotNum, count, curTicks, newTicks, slotTicks = 0;
DlinkPT nextP;

for (;;)
{
SPECULATE
{ nextP = LOCK MOV priorP->FlinkP;
LOCK PREFETCHW nextP;
LOCK PREFETCHW newP;
LOCK MOV newP->FlinkP = priorP->FlinkP;
LOCK MOV priorP->FlinkP = newP;
LOCK MOV newP->BlinkP = priorP;
LOCK MOV newP->FlinkP = nextP;
LOCK MOV nextP->BlinkP = newP;
COMMIT;
break;
}
catch (int reason)
{
// The abort could be spurious, like an interrupt,
// or due to collision, or uncorrectable.
if (reason & ASF_ABORTCODE_CONTENTION)
{
// Serialize access by waiting a little.
// Assign a unique delay slot to each wait.
// We don't know how big a delay slot should be so
// adjust the size up by 50% until we stop colliding.
if (slotTicks == 0)
{ // First collision, use current slot size
slotTicks = g_DelayTicks;
}
else
{ // Subsequent collision. Increase slot size by 50%
// but only if no one else has just done so.
// Otherwise use their updated value.
newTicks = slotTicks + (slotTicks >> 1);
curTicks = InterlockedCompareExchange
(&g_DelayTicks, newTicks, slotTicks);
if (curTicks == slotTicks)
slotTicks = newTicks; // Use our new slot size
else
slotTicks = curTicks; // Use others slot size
}

// Reserve a delay slot and wait a while
slotNum = InterlockedIncrement (&g_DelaySlotNum);
for(count = slotNum*slotTicks; count > 0; count--)
{ Pause;
}
InterlockedDecrement (&g_DelaySlotNum);
}
else
{
FatalExit (0);
}
}
}
}


==============================================================================
TOPIC: Advertisement for 2D Game Developers Central
http://groups.google.com/group/comp.programming.threads/t/a0486dfa09cbcc18?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, May 31 2009 5:07 am
From: NerdierNerds Advertiser


Bored of playing the same games over an over again? Feel you need a
change from the humdrum of trying to get that extra Achievement? Feel
that you have a really good idea for a game but don't know where to
begin? Need a community that offers you friendly support and help on
designing and developing your very own game projects? Well, come and
join us at 2D Game Developers Central!

2D Game Developers Central, part of the NerdierNerds groups chain, is
a new group on Google Groups, dedicated to the designing and
developing of 2D computer games. Whatever the game, be it a Shooter,
Strategy, Role-Playing or even a simple Puzzle game, there'll be
opportunities abound on 2DGDC for budding, young and fresh-faced
developers and designers to ask for help and join in with other
projects going on in the group- and those rugged, experienced and wise
industry veterans who've made their fair share of computer games that
can mentor and provide you with expert advice on how to go about
making your very own 2D computer games!

Our community within 2DGDC - and those within the NerdierNerds groups
chain - is probably one of the friendliest, well-to-do and supportive
communities you'll find on Google Groups- though we'll leave that up
to you to decide. We're a emergent and ever-growing group and, as
such, the earlier you join, the more prestige you'll have as the group
grows and the more valued - although all our members, new and old are
valued - a member you'll be within the group- especially by younger
members who will more than most need help by more experienced members
on their projects.

Whether you're a hardcore programmer, skilled graphics artist,
accomplished audioman or just new to the scene, there's always
something to take part in. Discussions, Mini-Pages and Files galore!

----------------------------------------
Join us at:
http://groups.google.co.uk/group/2d-game-developers-central?hl=en
----------------------------------------

==============================================================================
TOPIC: Thread within a thread
http://groups.google.com/group/comp.programming.threads/t/94f39a94cfc85076?hl=en
==============================================================================

== 1 of 2 ==
Date: Sun, May 31 2009 5:17 am
From: "Chris M. Thomasson"


> That method should cut down on subsequent corrections...
> But, when your excited, mistakes can and _will_ be made. Luckily he cares
> enough to actually post corrections and document shortcomings...
>
> ;^/
> [...]

BTW, `errno' is the reporter of errors in `sem_wait()'...


BARF..... BARF...


Do type code into newsreader!


== 2 of 2 ==
Date: Sun, May 31 2009 5:19 am
From: "Chris M. Thomasson"


"Chris M. Thomasson" <no@spam.invalid> wrote in message
news:GzuUl.94031$9w4.34661@newsfe08.iad...
>> That method should cut down on subsequent corrections...
>> But, when your excited, mistakes can and _will_ be made. Luckily he cares
>> enough to actually post corrections and document shortcomings...
>>
>> ;^/
>> [...]
>
> BTW, `errno' is the reporter of errors in `sem_wait()'...
>
>
> BARF..... BARF...
>
>
> Do type code into newsreader!

LOL!!!!!!!

Do NOT type code into newsreader!


WOW!!!


==============================================================================
TOPIC: Marketing Professional Seeking Apprentice!
http://groups.google.com/group/comp.programming.threads/t/cc6b98f147c5d71c?hl=en
==============================================================================

== 1 of 3 ==
Date: Sun, May 31 2009 5:34 am
From: David Schwartz


On May 29, 10:31 am, Brandon Noe <hidetor...@gmail.com> wrote:
> Sitting there wondering how your going to pay your bills? Tired of
> living paycheck to paycheck? Then boy do I have the answer for you!
> Self-made Millionaire is revealing his Wealth making blueprint to a

Let me guess -- get a whole bunch of people to pay you $49 for a
wealth-making blueprint?

DS


== 2 of 3 ==
Date: Sun, May 31 2009 5:41 am
From: "Chris M. Thomasson"


"David Schwartz" <davids@webmaster.com> wrote in message
news:febc1cdb-26ba-4a52-99b3-52339fe5ec4f@k8g2000yqn.googlegroups.com...
On May 29, 10:31 am, Brandon Noe <hidetor...@gmail.com> wrote:
> > Sitting there wondering how your going to pay your bills? Tired of
> > living paycheck to paycheck? Then boy do I have the answer for you!
> > Self-made Millionaire is revealing his Wealth making blueprint to a

> Let me guess -- get a whole bunch of people to pay you $49 for a
> wealth-making blueprint?

Perhaps $49.99?

Weeeee!

== 3 of 3 ==
Date: Sun, May 31 2009 5:48 am
From: "Chris M. Thomasson"

"Chris M. Thomasson" <no@spam.invalid> wrote in message
news:PVuUl.94033$9w4.81060@newsfe08.iad...
> "David Schwartz" <davids@webmaster.com> wrote in message
> news:febc1cdb-26ba-4a52-99b3-52339fe5ec4f@k8g2000yqn.googlegroups.com...
> On May 29, 10:31 am, Brandon Noe <hidetor...@gmail.com> wrote:
>> > Sitting there wondering how your going to pay your bills? Tired of
>> > living paycheck to paycheck? Then boy do I have the answer for you!
>> > Self-made Millionaire is revealing his Wealth making blueprint to a
>
>> Let me guess -- get a whole bunch of people to pay you $49 for a
>> wealth-making blueprint?
>
> Perhaps $49.99?
>
>
>
> Weeeee!

You want marketing??? Wow... Read here!


http://groups.google.com/group/comp.programming.threads/browse_frm/thread/e0b3166db3c5518d


Forget about it and try to implement it yourself!


Performance, well, read here:

http://webpages.charter.net/appcore/vzoom/round-1.pdf


What a fuc%ing rip off!!!

==============================================================================

You received this message because you are subscribed to the Google Groups "comp.programming.threads"
group.

To post to this group, visit http://groups.google.com/group/comp.programming.threads?hl=en

To unsubscribe from this group, send email to comp.programming.threads+unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.programming.threads/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com/?hl=en

No comments: