Concurrency
Kuling, wt., 2010-02-23 20:07
Cytat:
Example 1: Memory accesses and performance
Example 2: Impact of cache lines
Example 3: L1 and L2 cache sizes
Example 4: Instruction-level parallelism
Example 5: Cache associativity
Example 6: False cache line sharing
Example 7: Hardware complexities
http://igoro.com/archive/gallery-of-processor-cache-effects/
- Kuling's blog
- Odpowiedz
- 6 odsłon
Kategorie:
Kuling, wt., 2010-01-26 19:31
- Kuling's blog
- Odpowiedz
- 15 odsłon
Kategorie:
Kuling, wt., 2010-01-26 17:54
- Kuling's blog
- Odpowiedz
- 18 odsłon
Kategorie:
Kuling, czw., 2010-01-14 18:49
Cytat:
Overly aggressively admitting messages may seem like the right thing to do, until you’ve wedged yourself into some unforeseen inconsistent state. You can avoid this by making each message handler atomic; see Argus. But if you can't or don't have the discipline to do that, or aren't quite sure, you must not pump. You either avoid pumping altogether or you selectively pump messages that do not touch the state encapsulated by the pump. Or you lock access to state with a non-recursive lock and run the risk of deadlock.
http://www.bluebytesoftware.com/blog/2010/01/08/MusingOnMessagesAndBlocking.aspx
- Kuling's blog
- Odpowiedz
- 21 odsłon
Kategorie:
Kuling, wt., 2009-12-29 15:31
Cytat:
SleepEx(INFINITE, TRUE);
http://blogs.msdn.com/oldnewthing/archive/2006/05/03/589110.aspx
- Kuling's blog
- Odpowiedz
- 27 odsłon
Kategorie:
Kuling, wt., 2009-12-22 22:44
http://blogs.msdn.com/oldnewthing/archive/2004/06/29/168719.aspx
http://en.wikipedia.org/wiki/Reentrant_%28subroutine%29
- Kuling's blog
- Odpowiedz
- 29 odsłon
Kategorie:
Kuling, czw., 2009-11-12 18:32
Cytat:
Where possible, prefer structured lifetimes: ones that are local, nested, bounded, and deterministic. This is true no matter what kind of lifetime we're considering, including object lifetimes, thread or task lifetimes, lock lifetimes, or any other kind. Prefer scoped locking, using RAII lock-owning objects (C++, C# via using) or scoped language features (C# lock, Java synchronized). Prefer scoped tasks, wherever possible, particularly for divide-and-conquer and similar strategies where structuredness is natural. Unstructured lifetimes can be perfectly appropriate, of course, but we should be sure we need them because they always incur at least some cost in each of code complexity, code clarity and maintainability, and run-time performance. Where possible, avoid slippery spaghetti code, which becomes all the worse a nightmare to build and maintain when the lifetime issues are amplified by concurrency.
http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=221601309
- Kuling's blog
- Odpowiedz
- 39 odsłon
Kategorie:
Kuling, pt., 2009-10-30 21:54
Cytat:
concurrent_queue<T> is very similar to std::queue<T> and it offers push, try_pop interfaces and ‘unsafe’ iterators and size accessors (these aren’t threadsafe during concurrent pushes and pops).
concurrent_vector<T> is most similar to a std::vector<T> and it offers a push_back method that is internally synchronized across threads and allows efficient thread safe growth of the vector. Like std::vector, concurrent_vector has random access iterators, but unlike std::vector, the guarantee of contiguous storage is removed and there are no insert and erase methods.
- Kuling's blog
- Odpowiedz
- 43 odsłony
Kategorie:
Kuling, ndz., 2009-10-25 20:31
http://blogs.msdn.com/ericlippert/archive/2009/10/19/what-is-this-thing-you-call-thread-safe.aspx
Cytat:
My point is not that the definition is wrong; as informal definitions of thread safety go, this one is not terrible. Rather, my point is that the definition indicates that the concept itself is completely vague and essentially means nothing more than "behaves correctly in some situations". Therefore, when I'm asked "is this code thread safe?" I always have to push back and ask "what are the exact threading scenarios you are concerned about?" and "exactly what is correct behaviour of the object in every one of those scenarios?"
- Kuling's blog
- Odpowiedz
- 39 odsłon
Kategorie:
Kuling, pon., 2009-10-12 14:55
- Kuling's blog
- Odpowiedz
- 47 odsłon
Kategorie:
- 1
- 2
- 3
- 4
- 5
- 6
- następna ›
- ostatnia »
