Solved

Thread cache: explanation needed

Posted on 2013-12-17
5
370 Views
Last Modified: 2013-12-22
Ah hello.

Can someone please provide an explanation of/give references to recommended books I can read:

1) What exactly a thread-cache is, and how it differs from a processor cache
2) How we can have "cache misses"
3) This SO answer, specifically the last paragraph about how "locks typically reduce contention".

I have tried googling for this but cannot find anything.

(Hopefully I have chosen the best zones for this, had a bit of a hard time deciding:))

TIA
0
Comment
Question by:mrwad99
  • 3
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 39725322
"thread cache" could actually refer to two things, one solution described here http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.genprogc%2Fdoc%2Fgenprogc%2Fmalloc_threadcache.htm for OS-specific implementations:

The Malloc Thread Cache maintains a per-thread pool of unallocated memory for the purpose of reducing contention for the global heap structures.

This cache attempts to preallocate memory pieces for future use according to the pattern of allocations already performed by the thread. If an allocation request can be serviced using one of the unallocated pieces in the Thread Cache, it is removed from the cache and returned to the caller. If an allocation request cannot be serviced using an unallocated piece in the cache, the request is passed on to the global heap structure.

and the other discussed in the paper at http://www.hpcaconf.org/hpca11/papers/32_chandra-predictinginter-thread.pdf ("Predicting Inter-Thread Cache Contention on a Chip Multi-Processor Architecture", consider this one "suggested reading" ;o)
0
 
LVL 19

Author Comment

by:mrwad99
ID: 39733841
Disappointingly few responses on this one!

Thanks for participating.
0
 
LVL 19

Author Comment

by:mrwad99
ID: 39733846
Oh, I almost forgot; do you have any comment on the SO question query I linked to?
0
 
LVL 86

Expert Comment

by:jkr
ID: 39734295
I wished I could, but as for new EE policy, SO does not exist. But I guess it is safe to say that while there are some truisms in it, it's on point ;o)
0
 
LVL 19

Author Comment

by:mrwad99
ID: 39734616
>> new EE policy

Have I missed that?  Could you provide a link with this on at all?
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the most frequent problems a "newbie" developer may encounter is having to deal with different data formats. One for all: THE DATE We, as humans, need to "see" a date and then interpret it (much of the times this is an automatic operation)…
Software development teams often use in-memory caches to improve performance. They want to speed up access to, or reduce load on, a backing store (database, file system, etc.) by keeping some or all of the data in memory.   You should implement a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question