multicore

Can I force cache coherency on a multicore x86 CPU?

对着背影说爱祢 提交于 2019-11-26 11:56:07
问题 The other week, I wrote a little thread class and a one-way message pipe to allow communication between threads (two pipes per thread, obviously, for bidirectional communication). Everything worked fine on my Athlon 64 X2, but I was wondering if I\'d run into any problems if both threads were looking at the same variable and the local cached value for this variable on each core was out of sync. I know the volatile keyword will force a variable to refresh from memory, but is there a way on

R package that automatically uses several cores?

人盡茶涼 提交于 2019-11-26 11:53:19
问题 I have noticed that R only uses one core while executing one of my programs which requires lots of calculations. I would like to take advantage of my multi-core processor to make my program run faster. I have not yet investigated the question in depth but I would appreciate to benefit from your comments because I do not have good knowledge in computer science and it is difficult for me to get easily understandable information on that subject. Is there a package that allows R to automatically

What's the status of multicore programming in Haskell?

天涯浪子 提交于 2019-11-26 11:43:52
问题 What\'s the status of multicore programming in Haskell? What projects, tools, and libraries are available now? What experience reports have there been? 回答1: In the 2009-2012 period, the following things have happened: 2012: From 2012, the parallel Haskell status updates began appearing in the Parallel Haskell Digest. 2011: Parallel and Concurrent Programming in Haskell, a tutorial. version 1.1 released by Simon Marlow Haskell and parallelism, mentioned in an article in the Economist magazine,

CPU TSC fetch operation especially in multicore-multi-processor environment

ぐ巨炮叔叔 提交于 2019-11-26 09:32:42
问题 In Linux world, to get nano seconds precision timer/clockticks one can use : #include <sys/time.h> int foo() { timespec ts; clock_gettime(CLOCK_REALTIME, &ts); //--snip-- } This answer suggests an asm approach to directly query for the cpu clock with the RDTSC instruction. In a multi-core, multi-processor architecture, how is this clock ticks/timer value synchronized across multiple cores/processors? My understanding is that there in inherent fencing being done. Is this understanding correct?

rdtsc accuracy across CPU cores

雨燕双飞 提交于 2019-11-26 09:19:30
问题 I am sending network packets from one thread and receiving replies on a 2nd thread that runs on a different CPU core. My process measures the time between send & receive of each packet (similar to ping). I am using rdtsc for getting high-resolution, low-overhead timing, which is needed by my implementation. All measurments looks reliable. Still, I am worried about rdtsc accuracy across cores, since I\'ve been reading some texts which implied that tsc is not synced between cores. I found the

Do the new C# 5.0 &#39;async&#39; and &#39;await&#39; keywords use multiple cores?

爷,独闯天下 提交于 2019-11-26 08:47:57
问题 Two new keywords added to the C# 5.0 language are async and await, both of which work hand in hand to run a C# method asynchronously without blocking the calling thread. My question is, do these methods actually take advantage of multiple cores and run in parallel or does the async method run in the same thread core as the caller? 回答1: Two new keywords added to the C# 5.0 language are async and await, both of which work hand in hand to run a C# method asynchronously without blocking the

Forcing multiple threads to use multiple CPUs when they are available

狂风中的少年 提交于 2019-11-26 08:45:25
问题 I\'m writing a Java program which uses a lot of CPU because of the nature of what it does. However, lots of it can run in parallel, and I have made my program multi-threaded. When I run it, it only seems to use one CPU until it needs more then it uses another CPU - is there anything I can do in Java to force different threads to run on different cores/CPUs? 回答1: When I run it, it only seems to use one CPU until it needs more then it uses another CPU - is there anything I can do in Java to

What does multicore assembly language look like?

柔情痞子 提交于 2019-11-26 03:19:02
问题 Once upon a time, to write x86 assembler, for example, you would have instructions stating \"load the EDX register with the value 5\", \"increment the EDX\" register, etc. With modern CPUs that have 4 cores (or even more), at the machine code level does it just look like there are 4 separate CPUs (i.e. are there just 4 distinct \"EDX\" registers) ? If so, when you say \"increment the EDX register\", what determines which CPU\'s EDX register is incremented? Is there a \"CPU context\" or \

Does python support multiprocessor/multicore programming?

半腔热情 提交于 2019-11-26 02:40:28
问题 What is the difference between multiprocessor programming and multicore programming? preferably show examples in python how to write a small program for multiprogramming & multicore programming 回答1: There is no such thing as "multiprocessor" or "multicore" programming. The distinction between "multiprocessor" and "multicore" computers is probably not relevant to you as an application programmer; it has to do with subtleties of how the cores share access to memory. In order to take advantage

Parallel execution of shell processes

余生颓废 提交于 2019-11-25 23:49:52
问题 Is there a tool available to execute several process in parallel in a Windows batch file? I have found some interesting tools for Linux (parallel and PPSS), however, I would need a tool for Windows platforms. Bonus: It would be great if the tool also allowed to distribute processes in an easy way among several machines, running the processes remotely a la PsExec. Example: I would like that in the following for loop for %F in (*.*) do processFile.exe %F a limited amount of instances of