La descarga está en progreso. Por favor, espere

La descarga está en progreso. Por favor, espere

Programación en los procecesadores Intel® Multi Core.

Presentaciones similares


Presentación del tema: "Programación en los procecesadores Intel® Multi Core."— Transcripción de la presentación:

1 Programación en los procecesadores Intel® Multi Core

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. 2 ¿Qué son las instrucciones máquina? Conjunto de instrucciones La colección de instrucciones que entiende un CPU Lenguaje máquina Usualmente representado por códigos en ensamblador Se almacena en binario

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. 3 Elementos de una instrucción Código de operación (Op code) Hacer esto Referencia al operando fuente A esto Referencia al operando resultante Poner la respuesta aquí MOV5, EAX

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. 4 Ejecución de instrucciones Secuencial Pipelinening Superescalar Paralelo

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. 5 Ejecucuión de una secuencia de instrucciones ADD EBX, EAX (EAX := EAX+EBX;) MOV EAX, ECX (ECX := EAX;) EAX=1 EBX=2 ECX=3 CPU 1 ECX=3 Flujo de instrucciones EAX=3

6 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. 6 Ejecución de instrucciones (secuencial) Instrucción 1 Instrucción 2 Instrucción 3 Instrucción 4 Instrucción 5 Instrucción 6 Instrucción 7 Instrucción 8 Captación Decodificación Calcula operandos Capta operandos Ejecuta instrucción Escribe operandos

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. 7 Ejecución de instrucciones (pipelinening) Instrucción 1 Instrucción 2 Instrucción 3 Instrucción 4 Instrucción 5 Instrucción 6 Instrucción 7 Instrucción 8 Captación Decodificación Calcula operandos Capta operandos Ejecuta instrucción Escribe operandos

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. 8 Plataformas para computación en paralelo Diferentes arquitecturas SMP Hyper threading Multi core

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. 9 Multi Core Vs Hyper Threading Estado del CPU Lógica de Interrupciones Unidades de Ejecución Cache Estado del CPU Lógica de Interrupciones Estado del CPU Lógica de Interrupciones Unidades de Ejecución Cache Unidades de Ejecución Cache Single Core Multiprocesador (SMP)

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. 10 Multi Core Vs Hyper Threading Estado del CPU Lógica de Interrupciones Estado del CPU Lógica de Interrupciones Estado del CPU Lógica de Interrupciones Unidades de Ejecución Cache Estado del CPU Lógica de Interrupciones Unidades de Ejecución Cache Unidades de Ejecución Cache Tecnología Hyper Threading Multi 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. 11 Multi Core Vs Hyper Threading Estado del CPU Lógica de Interrupciones Unidades de Ejecución Cache Estado del CPU Lógica de Interrupciones Unidades de Ejecución Estado del CPU Lógica de Interrupciones Unidades de Ejecución Cache Estado del CPU Lógica de Interrupciones Estado del CPU Lógica de Interrupciones Unidades de Ejecución Cache Estado del CPU Lógica de Interrupciones Multi Core con caché compartida Multi Core con tecnología Hyper Threading

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. 12 ¿Para que sirve tener dos o más núcleo en un CPU? ¿Puedo ejecutar en paralelo instrucciones de una secuencia? Dependencias

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. 13 Dependencias Puede extraer y decodificar la segunda instrucción en paralelo con la primera No puede ejecutar la segunda instrucción hasta que la primera haya finalizado ADD EBX, EAX (EAX := EAX+EBX;) MOV EAX, ECX (ECX := EAX;) EAX=1 EBX=2 ECX=3 EAX=1 EBX=2 ECX=3 CPU 1 CPU 2 EAX=3 ECX=1 Flujo de instrucciones

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. 14 ¿Para que sirve tener dos o más núcleo en un CPU? Aumentar tasa de trabajos ¿Qué tipo de trabajos? Trabajos que hacen uso intensivo del CPU Trabajos que requieren E/S Trabajos mixtos

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. 15 Trabajos que hacen uso intensivo del CPU Un trabajo en un nucleo 1 trabajo en 10 segundos Tasa = 1 / 10 = 0.1 Tiempo de retorno =10 segs 10 segundos En el CPU

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. 16 Trabajos que hacen uso intensivo del CPU Dos trabajos en un nucleo 2 trabajos en 20 segundos Tasa = 2 / 20 = 0.1 Tiempo de retorno P0 =20 segs Tiempo de retorno P1 =20 segs 10 segundos En el CPU

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. 17 Trabajos que hacen uso intensivo del CPU Con un CPU El tiempo de retorno aumenta La tasa de trabajos se mantiene

18 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. 18 Trabajos que hacen uso intensivo del CPU Dos trabajos en un nucleo 2 trabajos en 20 segundos Tasa = 2 / 20 = 0.1 Tiempo de retorno P0 =15 segs Tiempo de retorno P1=19 segs El tiempo de retorno de los procesos puede variar PrioridadesPrioridades Politicas de platinificaciónPoliticas de platinificación La tasa de trabajos se mantiene igual 10 segundos En el CPU

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. 19 Trabajos que hacen uso intensivo del CPU Un trabajo en dos nucleos 1 trabajo en 10 segundos Tasa = 1 / 10 = 0.1 Tiempo de retorno =10 segs No hay mejora en el tiempo de retorno ni la tasa de trabajos Nucleo 0 Nucleo 1 10 segundos

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. 20 Trabajos que hacen uso intensivo del CPU Dos trabajos en dos núcleos 2 trabajos en 10 segundos Tasa = 2 / 10 = 0.2 Tiempo de retorno =10 segs La tasa de trabajos aumenta al doble El tiempo de retorno se mantiene igual que cuando ejecutamos un trabajo 10 segundos Nucleo 0 Nucleo 1

21 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. 21 Multi core Encontramos mejora en la tasa de trabajos y tiempo de retorno cuando ejecutamos dos procesos concurrentes. Hasta ahora un solo proceso no es capaz de obtener beneficio de las arquitecturas MultiCore

22 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. 22 Trabajos que hacen uso intensivo del CPU Un trabajo optimizado en dos nucleos 1 trabajo en 5 segundos Tasa = 1 / 5 = 0.2 Tiempo de retorno =5 segs 10 segundos Nucleo 0 Nucleo 1 5 segundos Hilo 0 Hilo 1

23 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. 23 Definiendo los Hilos Un hilo es una secuencia de instrucciones relacionadas que se ejecuta de forma independiente a otras secuencias Todos los programas tienen al menos un hilo principal Inicializa el programa y comienza la ejecución de las instrucciones iniciales Puede crear otros hilos que ejecuten varias tareas o puede hacer todo el trabajo el solo

24 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. 24 Dividiendo una aplicación en hilos Un proceso puede dividirse en múltiples hilos Mejor uso de los recursos de hardware Es necesario entender Diseño y estructura de la aplicación La interfase de programación con hilos El compilador y el ambiente de ejecución de la aplicación Las plataformas destino donde la aplicación se va a ejecutar

25 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. 25 Estado del CPU Lógica de Interrupciones Cache Unidades de ejecución Hilos en plataformas single core Single Core Instrucción

26 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. 26 Estado del CPU Lógica de Interrupciones Estado del CPU Lógica de Interrupciones Cache Unidades de ejecución Hilos en plataformas Hyper Threading Instrucción Tecnología Hyper Threading Ambas instrucciones requieren diferentes unidades funcionales Ambas instrucciones requieren una misma unidad funcional

27 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. 27 Estado del CPU Lógica de Interrupciones Estado del CPU Lógica de Interrupciones Cache Unidades de ejecución Multi-hilos en plataformas multi core Instrucción Multi Core

28 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. 28 Hilos en plataformas single core Concurrencia Dos o más hilos se ejecutan en el mismo procesador El tiempo del procesador se divide dando turnos a los dos hilos de manera que pueden avanzar

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. 29 Hilos en plataformas multi core Paralelismo Dos o más hilos se ejecutan simultáneamente en dos o más procesadores Cada hilo tiene el tiempo de un procesador

30 Gracias!


Descargar ppt "Programación en los procecesadores Intel® Multi Core."

Presentaciones similares


Anuncios Google