Professional Documents
Culture Documents
El Impacto en El Software de Las Arquitecturas Multicore
El Impacto en El Software de Las Arquitecturas Multicore
Motivación
Se requiere mejor
rendimiento Multitasking 22 nm
Menor consumo de Vídeo de alta
Wireless energía definición,
Plug’n Play Movilidad dispositivos
Internet Juegos móviles
Video Input
Multimedia PVR
Windows Joystick
Primera PC
Mouse
1981
Monitor Color
2
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Ley de Moore’s
3
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
4
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
µProc
60%/año.
1000 CPU
(2X/1.5años)
“Ley de Moore”
Rendimiento
1985
1986
1989
1990
1993
1994
1982
1980
1983
1984
1987
1988
1991
1992
1995
1996
1997
1998
1999
2000
Time
5
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Potencia y Frecuencia
309
Potencia (w)
259
Baja de Frecuencia
209
= MayorFrecuencia
Menor baja de potencia
nos da
159
109
espacio para un segundo
59
núcleo
9
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 3.2 3.4
Frecuencia (GHz)
Rendimiento / Consumo
Rendimiento
Potencia Requerida
1.00x
Máxima Frecuencia
7
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
“Over-clocking”
1.73x Rendimiento
Potencia Requerida
1.13x
1.00x
8
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
“Under-clocking”
1.73x Rendimiento
Potencia Requerida
1.13x
1.00x
0.87x
0.51x
9
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
1.13x
1.00x 1.02x
10
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Many-Core
La ruta hacia
“Many cores” Multi-Core
Dual-Core
Hyper-threading
Standard core
11
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
12
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Estableciendo el Problema
13
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
14
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
15
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Procesos e Hilos Intel® Software College
Procesos e Hilos
Stack Los sistemas operativos modernos
cargan programas como procesos
thread • Tiene recursos
main() • Ejecución
Stack Stack
Un proceso inicia ejecutando su punto
de entrada como un hilo
thread … thread
Los hilos pueden crear otros hilos
dentro del proceso
Code segment • Cada hilo obtiene su propio stack
Data segment Todos los hilos dentro de un proceso
comparten código y segmentos de
datos
16
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
PROCESO
Una instancia de un programa en Crear un nuevo proceso
ejecución con los estados ser costoso en CPU, se ll
necesarios para permanecer en tiempo y memoria
ejecución – la mayoría de las
aplicaciones son procesos
HILO
hilos pueden Una instancia de subtareas
arse sin replicar todo subdivididas para ejecutarse en
roceso paralelo – muchas aplicaciones se
dividen en múltiples hilos
17
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Consumo de la podadora
1 litro por hora
19
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Meta
20
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Problema:
Mayor consumo de
combustible y más
emisiones al ambiente
Problema:
Económica, pero es muy
lenta
¿Qué beneficio
obtenemos
teniendo 4
podadoras?
Dividen el trabajo
1 hora
Dividir el trabajo en tareas
Cada jardinero hace una tarea
1:30 hrs
4:30 hrs
¿Cuál es el problema?
Balanceo de Carga
Una solución
2 :58 hrs
Dividir el trabajo en tareas más pequeñas
Cada jardinero hace más de una tarea
3:01 hrs
2:59 hrs
3:02 hrs
¿Aún queremos
balancear más la carga?
Mayor Granularidad
3 :00 hrs
Dividir el trabajo en tareas aun más pequeñas
3:00 hrs
Granularidad
Pobremente definido como tasa de
computación a sincronización
Asegurarse que hay suficiente trabajo 3:00 hrs
que merezca cómputo en paralelo
Tipos de Paralelismo
por Funcionalidad
Asignar hilos a funciones separadas hechas por la aplicación
• El método más fácil desde que sobreponer tareas es obvio
(ejemplo esperar actualización de una Interfaz de Usuario)
• Por lo general, mejorar la capacidad de respuesta y funcionalidad
• A menudo se hace a través de un modelo de programación por
descomposición funcional
por Rendimiento
Paralelizar para mejorar tiempo de retorno o tasa de trabajos
• Más difícil ya que los desarrolladores necesitan tener un
conocimiento profundo de flujo de datos y estructuras de datos
• Por lo general, mejorar el desempeño en general
• Usualmente se hace mediante un modelo de programación de
descomposición de datos
29
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Threading for Functionality or Performance? Intel® Software College
30
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Task Decomposition Intel® Software College
Descomposición en tareas
Ejemplo: Pintar
3 por números 11
• Pintando
5 un5 color
5 es una sola tarea
3
5 6
5
5 5 5 5 4
5 5 5
3 4
3
• Número de tareas = número de colores
8
4
3 5
3
• Dos artistas: uno hace los impares y otro los pares
3 3 5 7
10
3
3 9
3
4
9 3
7
3
3
8 1
8 8
1 1
2
2
1
31
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Data Decomposition Intel® Software College
32
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Imagina…
4 Carriles = 4 Núcleos
34
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
O… Un
Unos
Un
bonche
solo
pocoshilo…
de
hilos
grandes,
hilos cortos
de cómputo
intensivo, hilos
independientes
dependientes y quizá
unos cuantos hilos
cortos independientes
o hilos más cortos
35
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Vamos
La
Suponer
Ahora,
cargaa que
dividir
llega
en 4 trocas
tenemos
podemos
mucho másun más
poner
pequeñas…
convoy
una
rápido!
trocalargo
en de
carga:
cada carril…
troncos
de madera…
Cuatro hilos
Una aplicación
independientes
no paralelizada
Explotar
Resultado:los
múltiples
Mejora la tasa
núcleos…
de trabajos!
36
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Esos
Vehículos
vehículos
(Hilos)
deldel
demismo
diferentes
mismocolor
color
colores
(hilos
son dependientes)
dependientes
son independientes
entre
y
vehículos
entre ellos…
ellos… y por
grandes
lo
y por
tanto
(hilos
lo no
tanto
se
grandes
pueden
pueden nomoverse
mover
optimizados)
enen
paralelo
paralelo
generan
enenotros
carriles
otros carriles
carriles,vacíos
deben(ser
(utilización
seguirse
ejecutados
entre
ineficiente
paralelamente
ellos. del procesador)…
en múltiples
núcleos)
37 Ejecuta
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Debe
El SO 2
Carril 1 la
esperar … solo puede planificar hilos exis
piensa
troca.
38
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
39 Ejecuta
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
40
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Aceleración
(1 - s)ts
sts +
p
41
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Tiempo en Paralelo:
(1 - s )t
T = st + s
p s
p
ts
sts (1-s)ts
Sección Serial Sección Paralela
p núcleos
(1-s)ts/p
tp
42
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Ley de Amdahl
( 1 - s ) ts
Tp = st +
s
p
ts
Aceleración S( p) =
tp
t p
S ( p) = s =
st + (1 - s)t 1 + ( p -1) s
s s
p
Si s es la fracción de tiempo secuencial, entonces, la
aceleración es 1/s
1
limp S ( p ) =
s
43
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
Ley de Amdahl
44
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Speedup and Efficiency Intel® Software College
Aceleración (Simple)
45
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Speedup and Efficiency Intel® Software College
Calculando Aceleración
46
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Speedup and Efficiency Intel® Software College
Eficiencia
47
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.
Intel® Software College
48
Copyright © 2006, Intel Corporation. All rights reserved.
Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States or other countries. *Other brands and names are the property of their respective owners.