multicore

What is the relationship between threads (in a Java or a C++ program) and number of cores in the CPU?

核能气质少年 提交于 2021-02-20 19:32:13
问题 Can someone shed some light on it? An i7 processor can run 8 threads but I am pretty sure we can create more than 8 threads in a JAVA or C++ program(not sure though). I have an i5 processor and while studying concurrency I have created 10 threads for assignments. I am just trying to understand how Core rating of CPU is related to threads. 回答1: The thread you are refering to is called a software thread ; and you can create as many software threads as you need, as long as your operating system

How does Linux kernel migrate the process among multiple cores?

依然范特西╮ 提交于 2021-02-19 08:13:11
问题 Context: Process-1 is executing on core-0. Core-1 is idle. Now, process-1 uses sched_setaffinity() to change its CPU affinity as core-1. Question: Which kernel function(s) migrate the process-1 to execute on core-1? 回答1: Here is the call sequence starting from the sched_setaffinity system call entry point in the kernel: sys_sched_setaffinity. sched_setaffinity. __set_cpus_allowed_ptr. In the last function, there are two cases as shown in the code at line 1101: if (task_running(rq, p) || p-

How does Linux kernel migrate the process among multiple cores?

你说的曾经没有我的故事 提交于 2021-02-19 08:13:05
问题 Context: Process-1 is executing on core-0. Core-1 is idle. Now, process-1 uses sched_setaffinity() to change its CPU affinity as core-1. Question: Which kernel function(s) migrate the process-1 to execute on core-1? 回答1: Here is the call sequence starting from the sched_setaffinity system call entry point in the kernel: sys_sched_setaffinity. sched_setaffinity. __set_cpus_allowed_ptr. In the last function, there are two cases as shown in the code at line 1101: if (task_running(rq, p) || p-

Can memcached make full use of multi-core?

血红的双手。 提交于 2021-02-07 05:20:34
问题 Is memcached capable of making full use of multi-core? Or is there any way tuning this? 回答1: memcached is multi-threaded by default and has no problem saturating many cores. It's a bit harder to saturate all cores on more massively parallel boxes (e.g. a 256-core CMT box) just because it gets harder to get the data in and out of the network. If you find areas where some sort of contention is preventing you from saturating cores, file a bug or start a discussion. 回答2: memcached has "-t" option

Can memcached make full use of multi-core?

情到浓时终转凉″ 提交于 2021-02-07 05:18:10
问题 Is memcached capable of making full use of multi-core? Or is there any way tuning this? 回答1: memcached is multi-threaded by default and has no problem saturating many cores. It's a bit harder to saturate all cores on more massively parallel boxes (e.g. a 256-core CMT box) just because it gets harder to get the data in and out of the network. If you find areas where some sort of contention is preventing you from saturating cores, file a bug or start a discussion. 回答2: memcached has "-t" option

Can two processes simultaneously run on one CPU core?

邮差的信 提交于 2021-02-04 14:49:28
问题 Can two processes simultaneously run on one CPU core, which has hyper threading? I learn from the Internet. But, I do not see a clear straight answer. Edit: Thanks for discussion and sharing! My purse to post my question here is not to discuss about parallel computing. It will be too big to be discussed here. I just want to know if a multithread application can benefit more from hyper threading than a multi process application. After further reading, I have following as my learning notes. 1)

Solr Search Across Multiple Cores

一曲冷凌霜 提交于 2021-01-29 02:21:50
问题 I have two Solr cores. Core0 imports data from a Oracle table called items. Each item has a unique id (item_id) and is either a video item or a audio item (item_type). Other fields contain searchable texts (description, comments etc) Core1 imports data from two tables (from a different database) called video_item_dates and audio_item_dates which record occurrence dates of an item in a specific market. The fields are item_id, item_market and dates. A single row would look like (item_001,

Solr Search Across Multiple Cores

痞子三分冷 提交于 2021-01-29 02:13:52
问题 I have two Solr cores. Core0 imports data from a Oracle table called items. Each item has a unique id (item_id) and is either a video item or a audio item (item_type). Other fields contain searchable texts (description, comments etc) Core1 imports data from two tables (from a different database) called video_item_dates and audio_item_dates which record occurrence dates of an item in a specific market. The fields are item_id, item_market and dates. A single row would look like (item_001,

(Batch) “wmic cpu” issue with multi-core system

不问归期 提交于 2021-01-28 09:01:04
问题 I run the "wmic cpu get loadpercentage /every:1" command on a virtual machine with 2 logical CPU cores and I get the LoadPercentage of the 1st core only, as you can see on the image attached: Multicore Issue How can I get the "real" CPU utilization (i.e. the average use of the 2 cores)? Otherwise, how can I also read the 2nd CPU usage separately? Thank you 回答1: It is probably funny that I give an answer to MY question, but since I searched and tested a lot, I want to share one more option: I

Does memory fencing blocks threads in multi-core CPUs?

蓝咒 提交于 2020-12-29 13:54:34
问题 I was reading the Intel instruction set guide 64-ia-32 guide to get an idea on memory fences. My question is that for an example with SFENCE, in order to make sure that all store operations are globally visible, does the multi-core CPU parks all the threads even running on other cores till the cache coherence achieved ? 回答1: Barriers don't make other threads/cores wait. They make some operations in the current thread wait , depending on what kind of barrier it is. Out-of-order execution of