Multicore and atomic operations

N

Neo

Hi All,
In order to utilize the mutiple core inside a single chip, I am
planning to implement a library of basic data types which will support
atomic operations. I believe that due to this it will minimize the
waiting time which generally occures due to mutiple threads asking for
same resource.
I need your comments for
1) Can atomic operations really to help me to use mutiple core in
efficient way?
2) How in general people do this? (any pointers?)
3) I am not sure about concurrent containers and algorithms. Do I need
to develope them as well?
automic opersions will not be sufficient?
4) Due I need any OS support for this? in which case ?

Please let me know if there is any misconception.
 
V

Victor Bazarov

Neo said:
Hi All,
In order to utilize the mutiple core inside a single chip, I am
planning to implement a library of basic data types which will support
atomic operations. I believe that due to this it will minimize the
waiting time which generally occures due to mutiple threads asking for
same resource.
I need your comments for
1) Can atomic operations really to help me to use mutiple core in
efficient way?
2) How in general people do this? (any pointers?)
3) I am not sure about concurrent containers and algorithms. Do I need
to develope them as well?
automic opersions will not be sufficient?
4) Due I need any OS support for this? in which case ?

Please let me know if there is any misconception.

Right now one misconception is that C++ cares about this. Instead
try posting to 'comp.programming.threads' or to the newsgroup that
deals with multicore architecture.

V
 
L

Lance Diduck

Hi All,
  In order to utilize the mutiple core inside a single chip, I am
planning to implement a library of basic data types which will support
atomic operations. I believe that due to this it will minimize the
waiting time which generally occures due to mutiple threads asking for
same resource.
   I need your comments for
1) Can atomic operations really to help me to use mutiple core in
efficient way?
2) How in general people do this? (any pointers?)
3) I am not sure about concurrent containers and algorithms. Do I need
to develope them as well?
automic opersions will not be sufficient?
4) Due I need any OS support for this? in which case ?

Please let me know if there is any misconception.

1. Yes
2. By inline assembler in C/C++ programs, or if you are lucky, your
compiler has extensions (usually called builtins) newer version of GCC
has these, and also Intel, and MSVC that I know of. Otherwise, the
Linux source has good examples, and also libatomic-ops
3. Yes, and these are the most difficult. To help here, Google "thread
building blocks" and also "Maged Micheal"
4. you dont need OS support. You DO need processor support. If you are
just learning, start off with Intel, since this has the most
documentation and examples. Then move on to other processors.

Start off (as I did) by making an allocator that is concurrent. You
will need this. The one I built was based on Treiber's stack (to
maintain a free list of equal sized blocks), and then used this
allocator to build a Micheal-Scott queue. This works like a champ!

Lance
 
N

Neo

1. Yes
2. By inline assembler in C/C++ programs, or if you are lucky, your
compiler has extensions (usually called builtins) newer version of GCC
has these, and also Intel, and MSVC that I know of. Otherwise, the
Linux source has good examples, and also libatomic-ops
3. Yes, and these are the most difficult. To help here, Google "thread
building blocks" and also "Maged Micheal"
4. you dont need OS support. You DO need processor support. If you are
just learning, start off with Intel, since this has the most
documentation and examples. Then move on to other processors.

Start off (as I did) by making an allocator that is concurrent. You
will need this. The one I built was based on Treiber's stack (to
maintain a free list of equal sized blocks), and then used this
allocator to build a Micheal-Scott queue. This works like a champ!

Lance- Hide quoted text -

- Show quoted text -

Thanks for great information !
 
J

Joe Seigh

Neo said:
Hi All,
In order to utilize the mutiple core inside a single chip, I am
planning to implement a library of basic data types which will support
atomic operations. I believe that due to this it will minimize the
waiting time which generally occures due to mutiple threads asking for
same resource.
I need your comments for
1) Can atomic operations really to help me to use mutiple core in
efficient way?
2) How in general people do this? (any pointers?)
3) I am not sure about concurrent containers and algorithms. Do I need
to develope them as well?
automic opersions will not be sufficient?
4) Due I need any OS support for this? in which case ?

Please let me know if there is any misconception.
Followup set to comp.programming.threads where this kind of stuff
has been going on for a while.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top