Multithreading: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica
Riga 36:
 
==Fine-grained multithreading==
''See article: [[barrel processor]]''
 
== Idea di base ==
Una tipologia di mutithreading molti spinto prevede che il processore scambi il thread in esecuzione a ogni ciclo di clock.
Line 50 ⟶ 48:
Concettualmente questa tecnica è simile al multitasking preemptive presente in molti sistemi operativi. Questa analogia parte dal presupposto che ogni slot di tempo dei programmi sia posto uguale a un ciclo di clock del processore.
 
====Terminologia====
Questa tecnica di multithreading inizialmente venne chiamata ''barrel processing'' ma attualmente la terminologia moderna definisce questa tecnica come ''pre-empiteve'' o ''interlaved'' o ''time-sliced'' o ''fine-grained'' multithreading.
 
====Hardware costs=Costo hardware ===
In aggiunta alle componenti indicate precedentemente questa tecnica a di multithreading richiede delle componenti aggiuntive che assegnino a ogni istruzione in esecuzione un'ID che ne permetta di identificare il thread proprietario. Questa tecnica richiede che lo scambio tra i thread avvenga senza senza cicli di clock di stallo e quindi richiedono hardware più sofisticato inoltre la presenza di molti thread in esecuzione in parallelo richiede generalmente cache e TLB più capienti al fine di poter servire i vari thread in modo efficiente.
 
In addition to the hardware costs discussed in the ''Block'' type of multithreading, ''interleaved'' multithreading has an additional cost of each pipeline stage tracking the thread ID of the instruction it is processing. Also, since there are more threads being executed concurrently in the pipeline, shared resources such as caches and TLBs need to be larger to avoid thrashing between the different threads.
 
====Examples====
 
===Esempi ===
* Denelcor [[Heterogeneous Element Processor]]
* [[Sun Microsystems]] [[UltraSPARC T1]]
* [[Lexra]] NetVortex
* [[MIPSArchitettura architectureMIPS|MIPS]] 34K core which34K che implementsimplementa thela Multi-Threaded ASE
* [[Raza Microelectronics Inc]] XLR
 
===Simultaneous multiMulti-threading=Threading==
===Idea base ===
I moderni processori hanno più unità di calcolo che vengono utilizzate eseguendo le istruzioni dei singoli thread in parallelo. Gli attuali processori sono in grado di eseguire solamente poche istruzioni in parallelo di un signolo thread per via del ridotto parallelismo a livello di istruzioni che
normalmente i thread possiedono. Quindi spesso alcune unità di elaborazione rimangono inutilizzate durante le elaborazioni. Per evitare questo il Simultaneous Multi-threading (SMT) esegue più thread in contemporanea e utilizza le istruzioni dei singoli thread per mantenere le unità di elaborazione sempre operative.
 
Per esempio:
''See main article [[Simultaneous multithreading]]''
# Ciclo i: istruzione j e j+1 dal thread A, istruzione k dal thread B, tutte eseguite in simultanea
 
# Ciclo i+1: istruzione j+2 dal thread A, istruzione k+1 dal thread B, istruzione m dal thread C, eseguite in simultanea
====Concept====
# Ciclo i+2: istruzione j+3 dal thread A, istruzione m+1 e m+2 dal thread C, eseguite in simultanea.
The most advanced type of multi-threading applies to [[superscalar]] processors. A normal superscalar processor issues multiple instructions from a single thread every CPU cycle. In Simultaneous Multi-threading (SMT), the superscalar processor can issue instructions from multiple threads every CPU cycle. Recognizing that any single thread has a limited amount of [[instruction level parallelism]], this type of multithreading is trying to exploit parallelism available across multiple threads to decrease the waste associated with unused issue slots.
 
For example:
 
# Cycle i : instructions j and j+1 from thread A; instruction k from thread B all simultaneously issued
# Cycle i+1: instruction j+2 from thread A; instruction k+1 from thread B; instruction m from thread C all simultaneously issued
# Cycle i+2: instruction j+3 from thread A; instructions m+1 and m+2 from thread C all simultaneously issued
 
====Terminology= Terminologia ===
ToPer distinguishdistinguerlo thedegli otheraltri flavorstipi ofdi multithreading fromil SMT, the termtermine [[Temporaltemporal multithreading]] isindica usedun totipo denotedi whenmultithreading instructionsche frompermette onlyil onecompletamento thread candi beistruzioni di un solo thread issuedper atciclo adi timeclock.
 
====Hardware costs=Costo hardware ===
In aggiunta all'hardware richiesto dal precedente multithreading questa tecnica richiede che ogni stadio della pipeline tracci il thread d'appartenenza dell'istruzione e dato che il processore ha più unità d'esecuzione vi sono molte istruzioni da tracciare. Inoltre la cache e la TLB deve essere molto ampia per poter gestire un numero di thread molto elevato che eseguiendi più istruzioni in parallelo fanno un uso molto intenso delle
In addition to the hardware costs discussed for ''interleaved'' multithreading, SMT has the additional cost of each pipeline stage tracking the Thread ID of '''each''' instruction being processed. Again, shared resources such as caches and TLBs have to be sized for the large number of active threads.
risorse suddette.
 
====Examples=Esempi===
* [[DEC Alpha]] EV8 (notnon completedterminato)
* [[Intel]] [[Hyperthreading]]
* [[IBM]] [[POWER5]]
* Power Processing Elements withindel theprocessore [[Cell microprocessor(microprocessore)|Cell]]
* [[Sun Microsystems]] [[UltraSPARC T2]]