Solved

Thread cache: explanation needed

Posted on 2013-12-17
5
373 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

What is Waterfall Model? Waterfall model is the classic Software Development Life Cycle method practiced in software development process. As the name "waterfall" describes, this development is flowing downwards steadily like waterfall, i.e., procee…
The Fluent Interface Design Pattern You can use the Fluent Interface (http://en.wikipedia.org/wiki/Fluent_interface) design pattern to make your PHP code easier to read and maintain.  "Fluent Interface" is an object-oriented design pattern that r…
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.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

860 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