Concurrent code and expensive instructions
Concurrent code and expensive instructions
Posted Feb 10, 2011 22:24 UTC (Thu) by Julie (guest, #66693)Parent article: Concurrent code and expensive instructions
A really absorbing article.
I find Paul's Quick Quiz feature incredibly useful too by helping the points he's making sink in more thoroughly, particularly as I read LWN mostly late at night when my mental acuity is past its best ;-/
It would be great if more technical articles or discussions included this.
One tiny niggling point with Quick Quiz 1 though:
Is atomic_add_return() SNC? In other words, are multiple concurrent calls to this function SNC?
Answer: Yes. Suppose that an atomic_t variable named a is initially zero and that a pair of concurrent atomic_add_return(1, &a) functions execute. The first one to execute will return zero, and the second one will return one.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
