In the Windows operating system with two physical x86 / amd64 processors (P0 + P1), 2 processes (A + B) work, each of which has two threads (T0 + T1), is it possible (or even ordinary) to see the following:
P0:A:T0 works simultaneously with P1:B:T0
P0:A:T0
P1:B:T0
then after 1 (or is it 2?) the context switch (es?)
P0:B:T1 works simultaneously with P1:A:T1
P0:B:T1
P1:A:T1
In short, I would like to know if - on a multiprocessor machine - the operating system can schedule any thread from any process at any time, regardless of what other threads from other processes are already running.
EDIT: To clarify a stupid example, imagine that process A thread A: T0 has an affinity for processor P0 (and A: T1-P1), while thread B of process B: T0 has an affinity for processor P1 (and B: from T1 to P0). It probably doesn't matter if these processors are cores or sockets.
Is there a first class context switch concept? Perfmon shows context switches in the Thread object, but nothing under the Process object.
, , .CPU ( , ).Windows - , .
EDIT ( )
" ". , ( ) / ( ), "" , ( ).
"" , , L1 ( L2) ( /), , , "" ( "" ).NUMA, (, - /).
: ( ), , ( ).
( ), , .
, .
, ( , ..), , , , ( ).
, - , ( ), , .. , , . , , , SQL- .NET Java- , HyperThreading.
, , , -. :
(2) . - L2, . : - L2, L2 , .
, ( ). , : " ".
Source: https://habr.com/ru/post/1748509/More articles:Apple HTTP Live Streaming implementation - mediafilesegmenter issue - mediaoracle - do not tolerate drops - oracleSerializing the object graph in .NET and updating the code version - .netHow to resolve the key length restriction index 900 in a column with varchar (4096) data type in SQL Server 2005? - indexingHow to update property view in Eclipse RCP? - propertiesКодирование текстового сообщения JMS - character-encodingPHP live chat with ajax poll - ajaxA PCRE (recursive) pattern that matches a string containing the correct substring in brackets. Why is this failure? - regexКомпозитная форма WPF - wpfEXCEL Help VBA - empty cell insertion function - vbaAll Articles