multicore

view multi-core or mlti-cpu utlization on linux

左心房为你撑大大i 提交于 2019-12-03 04:12:14
问题 I have a program running on Linux and I need to determine how it is utilizing all the CPUs/cores. Is there any program for viewing this information? 回答1: When runnging the top command, press f then j to display the P column (last CPU used by process), in addition to the 1 command in top, you should view some multi core occupation informations :) 回答2: Run the ' top ' command and press ' 1 ' to see the individual cores. 回答3: htop shows you the cpu usage of each core in a graphical manner

Obtaining thread Core affinity in C++ 11 through pthreads

半世苍凉 提交于 2019-12-03 03:16:13
I'm trying to set core affinity (Thread #1 goes on first core, Thread #2 goes on second core, ...) while using std::thread in C++ 11. I've already searched around various topics and on the internet and it seems C++ 11 API doesn't provide such low level feature. On the other hand, pthreads come with pthread_setaffinity_np which would be useful if I could get the "pthread_t" value of my std::thread (I don't know if this is human reasonable or at least legitimate asking for it). An example program of what I'd want to have in the end is this: #include <thread> #include <pthread.h> #include

Java 8 automatically using multicore?

五迷三道 提交于 2019-12-03 02:58:57
I did some tests a year ago concerning multicore with java 7. First I implemented some calculations only in the main thread (CPU usage showed that only one core did all the work) and then I implemented Callable with an ExecutorService instance. While running it all cores where doing the work. Now, one year, later I have to implement a little programm (using java 8) which interpolates a lot of data. All the work is implemented in the main thread (without Callable and ExecutorService) but when I'm running the programm the CPU usage shows me, that all 4 cores are at 98%. So does java 8

Detect the number of cores on windows

余生长醉 提交于 2019-12-03 02:14:43
If I am running R on linux or on a mac, I can detect the number of available cores using multicore:::detectCores() . However, there's no windows version of the multicore functions, so I can't use this technique on windows. How can I programmatically detect the number of cores on a windows machine, from within R? The parallel package now has a function to detect the number of cores: parallel:::detectCores() . This thread has a number of suggestions, including: Sys.getenv('NUMBER_OF_PROCESSORS') Note also the posting in that thread by Prof. Ripley which talks to the difficulties of doing this.

Multithreading and multicore differences

你说的曾经没有我的故事 提交于 2019-12-03 00:31:54
问题 I have a couple of small questions. Firstly is there a difference between multithreading and multicore? Are they two completely different things or does multithreading use more than one core if it needs? Secondly Most cores have two threads but when profiling my app I noticed lots of different threads ranging from thread 128 to thread 3460. What dictates how many threads your computer has? Thanks 回答1: Firstly is there a difference between multithreading and multicore? Yes. Multithreading and

Parallel and Multicore Processing in R [closed]

↘锁芯ラ 提交于 2019-12-03 00:21:29
Closed . This question needs details or clarity. It is not currently accepting answers. Learn more . Want to improve this question? Add details and clarify the problem by editing this post . This is towards the extreme in R's capabilities I think, but here goes... I'm doing some heavy processing in R in which I've written a function which does all the leg work from a single call. However, I'd like to thread or utilise more than a single core. I've looked at the Parallel package, which comes up as deprecated. I'd ideally like to call function as a new thread. I understand the complexities of

Is Multi-Threaded algorithm required to make use of Multi-core processors?

房东的猫 提交于 2019-12-03 00:02:17
I was just wondering whether we actually need the algorithm to be muti-threaded if it must make use of the multi-core processors or will the jvm make use of multiple core's even-though our algorithm is sequential ? UPDATE: Related Question: Muti-Threaded quick or merge sort in java I don't believe any current, production JVM implementations perform automatic multi-threading. They may use other cores for garbage collection and some other housekeeping, but if your code is expressed sequentially it's difficult to automatically parallelize it and still keep the precise semantics. There may be some

Scalability of the .NET 4 garbage collector

浪尽此生 提交于 2019-12-02 20:49:45
I recently benchmarked the .NET 4 garbage collector, allocating intensively from several threads. When the allocated values were recorded in an array, I observed no scalability just as I had expected (because the system contends for synchronized access to a shared old generation). However, when the allocated values were immediately discarded, I was horrified to observe no scalability then either! I had expected the temporary case to scale almost linearly because each thread should simply wipe the nursery gen0 clean and start again without contending for any shared resources (nothing surviving

How do interrupts work on multicore ARM cpu

﹥>﹥吖頭↗ 提交于 2019-12-02 19:50:03
This question has already been answered for x86 however, I couldn't find much about ARM MP cpus like Cortex-A9, Cortex-A15 etc... More importantly i want to know if interrupts can be raised on non-primary cpu without any configuration etc. I am working on a software which deals only with the primary cpu hence i put the rest in WFI state however I am unaware of how interrupts work on the MP arm cpus, Is it possible that the main cpu continues executing code and one of the secondary cpu picks it up and jumps to the instruction in vector table and execute that code ? btw here is the code I'm

How to run processes piped with bash on multiple cores?

与世无争的帅哥 提交于 2019-12-02 19:38:33
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 this case. What component of the system is responsible for that and what should I do to utilize multicore feature? Note that there's no such problem on 2.6.30 kernel. Clarification : Having followed Dennis Williamson 's advice, I made sure with top program, that piped