What the processor does while waiting for main memory

Assuming that cache requests l1 and l2 lead to a miss, does the processor stop until there is access to the main memory?

I heard about the idea of ​​switching to another thread, if so, what is used to awaken a stalled flow?

+4
source share
2 answers

In a modern processor, many, many things happen simultaneously. Of course, everything related to gaining access to memory cannot go on, but there can be much more. Assume the following C code:

double sum = 0.0; 
for (int i = 0; i < 4; ++i) sum += a [i];

if (sum > 10.0) call_some_function ();

, . [0], + = a [0] . . i, , < 4, [1]. , + = a [1] - , , a [1] , , "if ( sum > 10.0)".

, . , , , call_some_function() . , : call_some_function() , .

[0] , . , , [1], [2], [3], > 10.0 . . , call_some_function() . , call_some_function() .

, . , , , . , , , , , ​​ .

+3

(ROB), . ROB , ROB. ROB ~ 100-200 .

, OoO /, .

, , , , , -, "/ " ( " ", modolo - ). , , , , , "". , , , "".

( , ).

:

addi x1 <- x2 + x3
ld   x2 0(x1)
sub  x3 <- x2 - x4

, "sub" ( "x2" ). ​​ . x2 100 . , , "x2" . , , . ROB , . ​​ .

, "x2" , , "x2 !". , , , ld , , , ROB , ROB.


, , , . .

- . , ( ) ( ). . .

. SMT- (.. , -). , , . , "sub" , , . , , ( , , ..). , , .

+1

All Articles