multicore

Can 2 threads run concurrently? Or just 1? (given the possibility of hyperthreading)

狂风中的少年 提交于 2019-12-12 02:59:47
问题 The following is the output of cat /etc/cpuinfo and does not state whether the core is hyperthreaded or not. How do I find out whether or not two threads can potentially run concurrently? processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 26 model name : Intel(R) Xeon(R) CPU E5507 @ 2.27GHz stepping : 5 microcode : 0x11 cpu MHz : 2266.750 cache size : 4096 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 6 fpu : yes fpu_exception : yes cpuid

When is SJF worse than FCFS?

ぃ、小莉子 提交于 2019-12-12 02:57:29
问题 In operating systems of supercomputers, which handles a big quantity of tasks at the same time, is there any situation when SJF policy is taking longer than FCFS policy, speaking of waiting time metric? It can be assumed that more than one core are present in the system. 回答1: First I thought that it is not possible, then I took some time and finally arrived at this result: Yes it can be. Suppose that ready queue is filled with processes with equal burst times(all = x): Process Burst time P1 x

gensim.LDAMulticore throwing exception:

放肆的年华 提交于 2019-12-11 17:24:31
问题 I am running LDAMulticore from the python gensim library, and the script cannot seem to create more than one thread. Here is the error: Traceback (most recent call last): File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run self._target(*self._args, **self._kwargs) File "/usr/lib64/python2.7/multiprocessing/pool.py", line 97, in worker initializer(*initargs) File "/usr/lib64/python2

Resources: Parallelism in Java for OpenGL realtime applications

天涯浪子 提交于 2019-12-11 09:27:39
问题 I recently went to a lecture on the benefits of Parallelism in regards to tapping the power of multicore processors more efficiently for real time 3d graphics applications. This discussion was about C++ and TBB (Threading Building Blocks) (Intel). I have found out about Fork/Join in Java 7 but I would like to learn more about running realtime 3d graphics through OpenGL / JOGL. I have heard that OpenGL/JOGL must exist in one thread. I do not know if this is true. If you have experience with

Check which thread is running on which CPU in linux

坚强是说给别人听的谎言 提交于 2019-12-11 04:24:07
问题 I'm interested in finding which thread is running on which core/CPU. My Tomcat6 is using a single CPU core 100% and all other CPUs (my server has 16 other cores idle) are not being utilized... so I'm trying to figure out what went wrong. 回答1: Funny that people downvotes but don't tell why. I searched for a while and found that following command gives which thread running on which CPU: ps -p <PID> -L -o pid,tid,psr Where < PID > is the pid of the process we are interested in. 来源: https:/

On which operationg system is threaded programming sufficient to utilize multiple cores?

余生颓废 提交于 2019-12-11 03:55:43
问题 I would like to use my multi-threading programming skills (I got skills), but I realize that that is not enough. My threads may still compete for the same core if the operating system is not aware of the potential. What OS/compiler/library combination can I use on Intel Xeon architecture to thread to the cores? 回答1: All modern OSs distribute threads on all available cores; but there are several languages or libraries that prevent this from happening. the most common issues are: green threads.

R Checking for duplicates is painfully slow, even with mclapply

时光毁灭记忆、已成空白 提交于 2019-12-10 20:01:37
问题 I've got some data involving repeated sales for a bunch of of cars with unique Ids. A car can be sold more than once. Some of the Ids are erroneous however, so I'm checking, for each Id, if the size is recorded as the same over multiple sales. If it isn't, then I know that the Id is erroneous. I'm trying to do this with the following code: library("doMC") Data <- data.frame(ID=c(15432,67325,34623,15432,67325,34623),Size=c("Big","Med","Small","Big","Med","Big")) compare <- function(v) all

What happens to a Startup IPI sent to an Active AP that is not in a Wait-for-SIPI state

别说谁变了你拦得住时间么 提交于 2019-12-10 19:24:07
问题 In a previous Stackoverflow answer Margaret Bloom says: Waking the APs This is achieved by inssuing a INIT-SIPI-SIPI (ISS) sequence to the all the APs. The BSP that will send the ISS sequence using as destination the shorthand All excluding self, thereby targeting all the APs. A SIPI (Startup Inter Processor Interrupt) is ignored by all the CPUs that are waked by the time they receive it, thus the second SIPI is ignored if the first one suffices to wake up the target processors. It is advised

Fast inter-process (inter-threaded) communications IPC on large multi-cpu system

↘锁芯ラ 提交于 2019-12-10 17:07:54
问题 What would be the fastest portable bi-directional communication mechanism for inter-process communication where threads from one application need to communicate to multiple threads in another application on the same computer, and the communicating threads can be on different physical CPUs). I assume that it would involve a shared memory and a circular buffer and shared synchronization mechanisms. But shared mutexes are very expensive (and there are limited number of them too) to synchronize

Ruby 1.9.3 multicore?

北慕城南 提交于 2019-12-10 16:14:08
问题 Yestereday I read a little about threading in ruby (like this article), and what I generally understood was, that (except a few implementations like JRuby), there is the so-called Global Interpreter Lock, and because of that, one cannot run ruby code on multiple CPUs at a time. I did a little test (I have AMD Turion II Dual-Core Mobile M500 processors, and running ubuntu 11.04, +rvm), to see this in action, with this code: threads = [] CPU = 2 CPU.times do threads << Thread.new { x=0 time