multicore-programming

Which scripting languages support multi-core programming?

I have written a little python application and here you can see how Task Manager looks during a typical run. While the application is perfectly multithreaded, unsurprisingly it uses only one CPU core. Regardless of the fact that most modern scripting languages support multithreading, scripts can run on one CPU core only. Ruby, Python,...

Which is more Efficient? More Cores or More CPUs

I realize this is more of a hardware question, but this is also very relevant to software, especially when programming for mult-threaded multi-core/cpu environments. Which is better, and why? Whether it be regarding efficiency, speed, productivity, usability, etc. 1.) A computer/server with 4 quad-core CPUs? or 2.) A computer/server...

Running Python code in different processors

In order to do quality assurance in a critical multicore (8) workstation, I want to run the same code in different processors but not in parallel or concurrently. I need to run it 8 times, one run for each processor. What I don't know is how to select the processor I want. How can this be accomplished in Python? ...

Multicore programming: what's necessary to do it?

I have a quadcore processor and I would really like to take advantage of all those cores when I'm running quick simulations. The problem is I'm only familiar with the small Linux cluster we have in the lab and I'm using Vista at home. What sort of things do I want to look into for multicore programming with C or Java? What is the ling...

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...

Triple checked locking?

So in the meanwhile we know that double-checked-locking as is does not work in C++, at least not in a portable manner. I just realised I have a fragile implementation in a lazy-quadtree that I use for a terrain ray tracer. So I tried to find a way to still use lazy initialization in a safe manner, as I wouldn't like to quadruple memory ...

Do Scala and Erlang use green threads?

I've been reading a lot about how Scala and Erlang does lightweight threads and their concurrency model (actors). However, I have my doubts. Do Scala and Erlang use an approach similar to the old thread model used by Java (green threads) ? For example, suppose that there is a machine with 2 cores, so the Scala/Erlang environment will ...

multicore application cygwin

If I run a parallized application (using f.e. OpenMP) on a windows multicore within cygwin - do I have the full multicore performance the windows machine is offering or is there a significant speed reduction to expect due to the cygwin layer? Any experiences? ...

Tips for measuring the parallelism speed-up in multi-core development.

I have read many of the good questions and answers around multi-core programming how-tos etc. I am familiar with concurrency, IPC, MPI etc but what I need is advice on how to measure speed-up which will help in making a business case of spending the time to write such code. Please don't answer with "well run it with single-core code then...

What features make the functional language better for parallel programming?

The functional programming provides stateless way of programming that enables the user free of side effect. declarative way of programming that enables the user describe the problem sets that the computer should solve, not the way of the problems are solved. Combining those features, users can program in higher level that can be swa...

Multi-Threading on multi core architecture

When you have a situation where Thread A reads some global variable and Thread B writes to the same variable, now unless read/write is not atomic on a single core, you can do it without synchronizing, however what happens when running on a multi-core machine? ...

x86 LOCK question on multi-core CPUs

Is it true that the x86 ASM "LOCK" command prefix causes all cores to freeze while the instruction following "LOCK" is being executed? I read this in a blog post and it doesn't make sense. I can't find anything that indicates if this is true or not. ...

Performance gain issue in multicore application

Hi, I have a serial(nonparallel) application written in C. I have modified and re-written it using Intel Threading Building Blocks. When I run this parallel version on an AMD Phenom II machine which is a quad-core machine, I get a performance gain of more than 4X which conflicts with the Amdahl's law. Can anyone give me a reason why thi...

Multi core CPU single thread behaviour, not achieving 100%

As you can see from the attached image the CPU graph on my dual core machine is weirdly symmetrical! Is this some sort of load balancing to prevent one core being used more than the other? What are the reasons behind it (heat distribution maybe)? Of course my main concern: is my single thread PSNR image algorithm achieving 100%? CPU...

The state of programming and compiling for multicore systems

I'm doing some research on multicore processors; specifically I'm looking at writing code for multicore processors and also compiling code for multicore processors. I'm curious about the major problems in this field that would currently prevent a widespread adoption of programming techniques and practices to fully leverage the power of...

How are applications run on multi-core machines?

I'm trying to gain a better understanding of how multi-core processors work and how as a programmer I can take advantage of them. Let's say I have a standard .net console app. It doesn't do any multithreading. Does it only run on 1 of the cores? If so which core does it run on and is it the same one everytime? Now let's say I have anot...

Memory Fences - Need help to understand

Hello all, I'm reading Memory Barriers by Paul E. McKenney http://www.rdrop.com/users/paulmck/scalability/paper/whymb.2010.07.23a.pdf everything is explained in great details and when I see that everything is clear I encounter one sentence, which stultifies everything and make me think that I understood nothing. Let me show the example ...