multicore

Does Linux drop into the kernel on all cores?

Hi: For a multi-core computer running Linux 2.6.x, what happens when a thread makes a system call? Does it drop into the kernel only on the core that the thread is running on, or does it drop into the kernel on all cores (sorry if this is a newbie question). Is this behaviour (whichever is the correct one) the same when receiving inte...

How to speedup python unittest on muticore machines?

I'm using python unittest in order to test some other external application but it takes too much time to run the test one by one. I would like to know how can I speedup this process by using the power of multi-cores. Can I tweak unittest to execute tests in parallel? How? This question is not able python GIL limitation because in fact...

How can I get a count of "Available" processors for my application?

I know how to get the number of physical, and number of logical processors on my machine, but I want to know how many logical processors my application has access to. For instance, I develop on a quad core machine, but I have a number of single core users out there, and in many instances I "dumb down" the interface, or run into locking ...

Processor Affinity on Linux

Hi all, Thanks for all the answers so far! I am having a Dual Core processers and I would like to have all the processes running on core1 but one. I know now that I can use taskset to set all currently running to be bound to processor 1 for example. Now I would like that my OWN application is scheduled for execution on processor 2 inst...

Do you expect that future CPU generations are not cache coherent?

I'm designing a program and i found that assuming implicit cache coherency make the design much much easier. For example my single writer (always the same thread) multiple reader (always other threads) scenarios are not using any mutexes. It's not a problem for current Intel CPU's. But i want this program to generate income for at leas...

Is it too early to start designing for Task Parallel Library?

I have been following the development of the .NET Task Parallel Library (TPL) with great interest since Microsoft first announced it. There is no doubt in my mind that we will eventually take advantage of TPL. What I am questioning is whether it makes sense to start taking advantage of TPL when Visual Studio 2010 and .NET 4.0 are relea...

How to structure c++ app to utilize multicore processor

I am building an app that will do some object tracking from a video camera feed and use information from that to run a particle system in opengl. The code to process the video feed is somewhat slow 200 - 300 milliseconds per frame right now. The system that this will be running on has a dual core processor. To maximize performance I am...

How can I most effectively take advantage of multiple cores for short computations in .NET?

Here is the context: I am writing an interpreter in C# for a small programming language called Heron, and it has some primitive list operations which can be executed in parallel. One of the biggest challenges I am facing is to distribute the work done by the evaluator across the different cores effectively whenever a parallelizable ope...

Should access to a shared resource be locked by a parent thread before spawning a child thread that accesses it?

If I have the following psuedocode: sharedVariable = somevalue; CreateThread(threadWhichUsesSharedVariable); Is it theoretically possible for a multicore CPU to execute code in threadWhichUsesSharedVariable() which reads the value of sharedVariable before the parent thread writes to it? For full theoretical avoidance of even the remote...

Performance degrades, if number of threads is more than 2 on Xeon X5355

Hi All, I have a strange problem but may not be that much strange to some of you. I am writing an application using boost threads and using boost barriers to synchronize the threads. I have two machines to test the application. Machine 1 is a core2 duo (T8300) cpu machine (windows XP professional - 4GB RAM) where I am getting follow...

How do you make good use of multicore CPUs in your PHP/MySQL applications?

Hi, I maintain a custom built CMS-like application. Whenever a document is submitted, several tasks are performed that can be roughly grouped into the following categories: MySQL queries. HTML content parsing. Search index updating. Category 1 includes updates to various MySQL tables relating to a document's content. Category 2 inc...

Garbage-collectors for multi-core llvm?

Dear overflowers, I've been looking at LLVM for quite some time as a new back-end for the language I'm currently implementing. It seems to have good performance, rather high-level generation APIs, enough low-level support to optimize exotic optimizations. In addition, and although I haven't checked it myself, Apple seems to have success...

Running one thread on two cores

Do current architectures provide support for running the same single thread on multiple cores of a single system? What kind of issues would be involved in such a situation? ...

On multicore MacOSX, is the following c++ code threadsafe?

#define atomicAdd OSAtomicAdd32Barrier class PtrInterface: public Uncopyable { private: typedef volatile int RefCount; mutable RefCount rc; public: inline void newRef() const { atomicAdd(1, &rc); } inline void deleteRef() const { atomicAdd(-1, &rc); } }; [This is the basis of an invasive refcounted pointer; I just ...

Disabling multi core programmaticaly

Is there any possible way of disabling multi core functionality on windows and just using a single core using C\C++? Any library that allows it? My application access one of our chip modules used to communicate with the host. We suspect someone else is accessing this module and changes it. The strange thing is that it only happens on a m...

Are indivisible operations still indivisible on multiprocessor and multicore systems?

As per the title, plus what are the limitations and gotchas. For example, on x86 processors, alignment for most data types is optional - an optimisation rather than a requirement. That means that a pointer may be stored at an unaligned address, which in turn means that pointer might be split over a cache page boundary. Obviously this c...

Programming for Multi core Processors

As far as I know, the multi-core architecture in a processor does not effect the program. The actual instruction execution is handled in a lower layer. my question is, Given that you have a multicore environment, Can I use any programming practices to utilize the available resources more effectively? How should I change my code to gai...

Performance degrades for more than 2 threads on Xeon X5355

Hi All, I am writing an application using boost threads and using boost barriers to synchronize the threads. I have two machines to test the application. Machine 1 is a core2 duo (T8300) cpu machine (windows XP professional - 4GB RAM) where I am getting following performance figures : Number of threads :1 , TPS :21 Number of threa...

some pointer to understanding GCC source code

hi, I'm student working on optimizing GCC for multi-core processor. I tried going through the source code, it is difficult to follow through it since I need to add some code to the back end. Can anyone suggest some good resource which explains the code flow through the different phases. Also suggest some development environment for debug...

Scalable memory allocator experiences

I am currently evaluating a few of scalable memory allocators, namely nedmalloc and ptmalloc (both built on top of dlmalloc), as a replacement for default malloc / new because of significant contention seen in multithreaded environment. Their published performance seems to be good, however I would like to check what are experiences of ot...