1 / 20

Hilos y demás curiosidades

Hilos y demás curiosidades. ¿Qué es un hilo?. Es la unidad básica de la CPU que consiste en un contador de programa, un juego de registros y un espacio de pila. ¿Cómo trabaja un hilo?. Es similar a como trabajado un proceso…. Razones para tener hilos.

Télécharger la présentation

Hilos y demás curiosidades

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hilos y demás curiosidades

  2. ¿Qué es un hilo? Es la unidad básica de la CPU que consiste en un contador de programa, un juego de registros y un espacio de pila.

  3. ¿Cómo trabaja un hilo? Es similar a como trabajado un proceso…

  4. Razones para tener hilos Para poder realizar varias tareas al mismo tiempo.

  5. ¿Se puede tener más de un hilo trabajando? Por supuesto.

  6. Acerca del “pipeline” (concurrencia a nivel de instrucción)

  7. Beneficios y problemas del pipeline Ejecución paralela de instrucciones. Si ocurren saltos en el programa, el pipeline no ofrece una mejora.

  8. Hilos físicos

  9. Uno de los antecedentes CDC6600 (súper-computadora). Superscalar Pipeline Architecture.

  10. ¿Cómo se logra tener hilos de manera física?

  11. Tecnología Hyper-Threading Tecnología desarrollada por Intel. Aparece por primera vez en un procesador Pentium IV.

  12. Problemas de rendimiento debido al HT Debido a sistemas que no soportan el HT. Programación de las aplicaciones. Es mejor tener núcleos físicos que virtuales.

  13. CPU multi-núcleo

  14. ¿Cómo afectan a la memoria caché los núcleos y los hilos físicos? Caché privada, entre núcleos. Caché compartida, entre hilos.

  15. Cuando la memoria caché no logra predecir los saltos… Ejecución de varios procesos que no tengan nada en común. Un programa que no tenga orden en sus instrucciones…

  16. Ejemplo de que el pipeline afecta #import <Foundation/Foundation.h> intmain(intargc, constchar *argv[]) { int a = 0; if (a) { NSLog(@"\"a\" es igual a '1'\n"); exit(0); } NSLog(@"Esto sí seejecuta...\n"); a = 1; return 0; }

  17. Ejemplo de que el pipeline es efectivo imp EQU $0050 mens EQU $02FB ORG $8400 LDX #mens LDY #imp mensaje LDAA $00,X CMPA #'$ BEQ fin STAA $00,Y INX INY BRA mensaje fin ORG mens FCC "Hola mundo.$" END

  18. Una curiosa palabra… Variable registro en C, C++ y Objective-C #import <Foundation/Foundation.h> intmain(intargc, constchar *argv[]) { registerint i; for (i = 0; i < 100; ++i) NSLog(@"%d\n", i); return 0; }

  19. Referencias • http://www.infor.uva.es/~fjgonzalez/apuntes/Tema4.pdf • http://soledadfelloza.com/la-caja/wp-content/uploads/2009/06/aguja_hilo_11.jpg • http://chsos20121908541.files.wordpress.com/2012/05/solaris_thr.gif?w=716&h=468 • http://cabadacinthya.blogspot.mx/2012/10/concepto-hyper-threading.html • http://computadoras.about.com/od/preguntas-frecuentes/a/Que-Es-Hyperthreading.htm • http://nuwen.net/img/image/p4ht_orig.png • http://www.mastermagazine.info/termino/wp-content/uploads/Copiar.jpg • http://www.omicrono.com/wp-content/uploads/2013/07/AMD-Opteron-6-cores.jpg • http://www.google.com.mx/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CBsQFjAA&url=http%3A%2F%2Fwww.dsi.fceia.unr.edu.ar%2Fdownloads%2Finformatica%2Finfo_iii%2FResumen.doc&ei=UN47VLOnOY_DggSIuYGwDw&usg=AFQjCNGGZ_k396WYT-j6nr4EkrImZcwTgA&sig2=TMiX9r6i8EqKJIc8PpAeXQ&bvm=bv.77161500,d.b2U • http://mlm-s1-p.mlstatic.com/procesador-intel-pentium-4-ht-sl7e4-30-ghz-800-bus-skt-478-3582-MLM4338239716_052013-F.jpg • http://ygdes.com/CDC/CDC6600_abstract.png

  20. Ligas de interés • http://ixbtlabs.com/articles3/cpu/archspeed-2009-4-p2.html • http://imgur.com/a/aTH74 • http://www.dia.eui.upm.es/asignatu/arq_com/Paco/6-Pipeline.pdf

More Related