multicore

Recommended book about parallel programming - theory & best practice?

I'm looking for a book or books about multicore, multithreaded programming. The perfect book should focus on best practices and maybe include a bit of theory background. I'm not interested in a book which only describes a single library and focuses on its API. OS actually doesn't matter. ...

How to use multicores in Ocaml to do Monte Carlo simulations?

Ocaml process can use just one core and in order to use multiple cores I have to run several processes. Are there any Ocaml frameworks to use to parallelize Monte Carlo simulations? ...

Synchronizing access to variable

I need to provide synchronization to some members of a structure. If the structure is something like this struct SharedStruct { int Value1; int Value2; } and I have a global variable SharedStruct obj; I want that the write from a processor obj.Value1 = 5; // Processor B to be immediately visible to the other proce...

How to run processes piped with bash on multiple cores?

I have a simple bash script that pipes output of one process to another. Namely:. dostuff | filterstuff It happens that on my Linux system (openSUSE if it matters, kernel 2.6.27) these both processes run on a single core. However, running different processes on different cores is a default policy that doesn't happen to trigger in th...

Code for detecting APIC id returns same ids for different logical processors

I run my NT service on an Intel Core2 based Win2k3 machine where I need to iterate through all logical CPUs (all bits in process affinity). To do so I call GetProcessAffinityMask() to retrieve the system affinity mask and then switch the process to each processor in turn: DWORD systemMask; GetProcessAffinityMask( ... &systemMask ); D...

How do I turn on multi-CPU/Core C++ compiles in the Visual Studio IDE (2008)?

I have a Visual Studio 2008 C++ project that has support for using multiple CPUs/cores when compiling. In the VCPROJ file I see this: <Tool Name="VCCLCompilerTool" AdditionalOptions="/MP" ... I can't find where that was turned added via the IDE and I want to set up another project that uses all of my cores during compilat...

C# - Multicore threading for database intensive app

I have an application, which need to do some validation on the database end. Each process goes through database validation (search on the table that has around 6 million records), then goes through some Lucene Index searcher (the index is built off this 6 million record table). As these steps are disjoint for each line items being passe...

Multi thread .NET application causes Application Error in KERNEL32.dll running on 64 bit quad core Windows Server.

I have a multi-threaded .NET application that occasionally terminates without any message. When I check the log there is an entry for an "Application Error in KERNEL32.dll". What could be causing this? Here is some basic code: foreach (int id in ids) { ThreadPool.QueueUserWorkItem(new WaitCallback(ProcessData), id); } The ProcessDa...

Is an Intel i7 (4 cores, 8 HT-based logical cores) better than an Intel Core 2 Quad for VisualC++ development?

I have to make a recommendation to management regarding whether or not we should spend the extra money to purchase new computers with Intel i7 CPUs (i7 950s) or whether we should buy Intel Core 2 Quad processors (Q9550s or something equivalent.) Our main task are Microsoft Visual C++ development, thus we are aiming to ensure the best co...

Assembly and multicore CPUs

What x86-64 instructions are used to enable/disable other cores/processors and how does one start executing code on them? Is there documentation somewhere on how this is done by the operating system? ...

Building universal binaries on Mac - Forcing single compiler child process

Cheers, at company, we're creating a port of our games, and we need to compile PythonOgre, a wrapper of Ogre3d for Python. This is an enormous chunk of code, particularly the generated wrapper code. We have a Mac Mini with 1GB RAM. We've built i386 version. Since we have only 1GB of RAM, we've forced the build system to use only one co...

Can I call multiple FFMPEG processes on a multi-core LAMP machine from PHP?

I am using PHP to call an FFMPEG command using exec(). The script that initiates this command is called from another PHP script using proc_close(proc_open('php /phpdirectory/process.php &', array(), $foo)); This works great. The ffmpeg command is called and runs 'in the background' leaving the first script to return to the user and i...

What are useful tips for making multi-core optimised ASP.NET MVC applications?

I see a lot of the multi-core information on the web applied to desktop applications - but I am interested: what tips and pointers would be useful for ASP.NET MVC web developers building applications that make the most of multiple cores/processors? ...

.NET movement of threads between cores

Follow up question from Multi-core usage, threads, thread-pools. Are threads moved from one core to another during their lifetime? Of course. Imagine you have three threads running on a dualcore system. Show me a fair schedule that doesn't involve regularly moving threads between cores. This is my first time on...

Do Unit Tests target Multiple Cores in Visual Studio?

As our unit test numbers increase we are finding it increasingly difficult to continually run all the tests on our developer machines. Does anyone know if Visual Studio 2008: natively targets multiple cores doesn't target multiple cores automatically, but it's configurable doesn't target multiple cores at all ...

Why are closures suddenly useful for optimizing programs to run on multiple cores?

I read an article that claims that closures (or "blocks") are a useful weapon in the "War on Multicores", because [...] they allow you to create units of work, which each have their own copy of the stack, and don’t step on each others toes as a result. What’s more, you can pass these units around like they are values, when ...

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

AMD multi-core programming

I want to start to write applications(C++) that will utilize the additional cores to execute portions of the code that have a need to perform lots of calculations and whose computations are independent of each other. I have the following processor : x64 Family 15 Model 104 Stepping 2 Authentic AMD ~1900 Mhz running on Windows Vista Home...

Would a multithreaded Java application exploit a multi-core machine very well?

Hi, Say I have a dual-core windows laptop and I run a multithreaded application on it. Does the JVM run only on one core or do the JVM and the OS somehow communicate to split threads between the two cores? A similar question has been asked for C#. I've also had a look into a couple of Sun's performance white papers. I read that threads...

What's a good multi-core 64-bit "Hello World" program?

I recently got my home PC upgraded to a quad-core CPU and 64-bit OS. I have some former experience with C/C++ and I'm really "itching" to try exercising some 64-bit CPU capabilities. What's a good "Hello World" type program that demonstrates 64-bit multi-core capabilities by doing some simple things that don't work well at all in 32-bit ...