1 / 34

Multi-threading

Multi-threading. Κορομηνάς Κωνσταντίνος – Μ 437 Χατζηανδρέου Ελένη - Μ400 Χήνου Διονυσία – Μ364. Εισαγωγή. Multithreading Simultaneous Multithreading (SM) Simultaneous Subordinate Microthreading (SSMT) Speculative Data-Driven Multithreading. Multithreaded. Synchronization Unit (SU)

thais
Télécharger la présentation

Multi-threading

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. Multi-threading Κορομηνάς Κωνσταντίνος – Μ437 Χατζηανδρέου Ελένη - Μ400 Χήνου Διονυσία – Μ364

  2. Εισαγωγή • Multithreading • Simultaneous Multithreading (SM) • Simultaneous Subordinate Microthreading (SSMT) • Speculative Data-Driven Multithreading

  3. Multithreaded • Synchronization Unit (SU) • Execution Unit (EU)

  4. Synchronization Unit (SU) • Είναι αρμόδιο για την έκδοση των σημάτων ενεργοποίησης(fire signals) στην EU • Fire signal : <fp,ip> • Ready thread poll

  5. Synchronization Signals • <‘spawn’, fp, ip> • <‘sync’, fp, ss_off>

  6. Μηνύματα SU • Data Retrieval • <‘get’,addr_val, fp, ip> • <‘data’,addr_val, value, fp, ip> • Synchronization • <‘backto’, fp, fut_off, ss_off, value> • Thread migration • <‘thread’,f_size, frame_contents, ip>

  7. Execution Unit (EU)

  8. Simultaneous Multithreading • Μια τεχνική που επιτρέπει σε διάφορα ανεξάρτητα threads να παρέχουνεντολές σε πολλαπλές λειτουργικές μονάδες σε κάθε κύκλο • Στόχος είναι να αυξηθεί ουσιαστικά η χρησιμοποίηση επεξεργαστών

  9. Simultaneous MultithreadingMachine Models • Fine-Grain Multithreading • SM:Full Simultaneous Issue • SM:Single Issue,SM:Dual Issue, SM:Four Issue • SM:Limited Connection

  10. Machine Models • Διαφορές Hardware

  11. Cache Design [total I cache size inKB][private or shared].[D cache size][private or shared]

  12. SM vs. Single-Chip MP

  13. Πλεονεκτήματα SM έναντι MP • Απόδοση με λίγα threads • Granularity και ευελιξία σχεδιασμού

  14. Πλεονεκτήματα SM • Καλύτερη ρυθμαπόδοση (throughput) • Καλύτερη από fine­grainmultithreaded • Καλύτερη στην απόδοση από πολυεπεξεργαστή multiple­issue

  15. Μέρος Β΄Ή Με στόχο την αύξηση της ταχύτητας εκτέλεσης ενός προγράμματος, με άξονα την Threaded-tech.

  16. Εντοπίζοντας το πρόβλημα… Αύξηση της αποδοτικότητας μιας multiprocessing αρχιτεκτονικής μέσω Threads – Multithreaded αρχιτεκτονική (γιατί;). Συνέπειες ως προς το χρόνο ολοκλήρωσης εκτέλεσης ενός προγράμματος μεμονωμένα;

  17. Εντοπίζοντας το πρόβλημα(2)... ΖΗΤΕΙΤΑΙ : επιτάχυνση της εκτέλεσης των Threads μεμονωμένα. Υπάρχει «χώρος» γι αυτό;

  18. Simultaneous Subordinate Microthreading (SSMT) Δηλαδή η παραγωγή επιπρόσθετων microthreads για τη βελτίωση του χρόνου εκτέλεσης ενός – του κυρίως – Thread του προγράμματος. Τα micro- γεννώνται και εκτελούνται εκ παραλλήλου με το κυρίως Thread. Branch prediction accuracy – cache hit rate – prefetch effectiveness

  19. Micro-thread spawning Spawn instruction ως μέρος της ISA (Instruction Set Architecture) Event spawning : ένα προκαθορισμένο γεγονός κατά την εκτέλεση του κυρίως thread προκαλεί τη γέννηση του microthread.

  20. Πλεονεκτήματα της SSMT SSMT vs Hardware based μηχανισμοί • Hardware πολυπλοκότητα; - αδιαφορία • Ευελιξία Microthreads vs απλά Threads • Fetch – issue – ISA Νέος επεξεργαστής;

  21. Τα απαραίτητα υλικά • ISA υποστήριξη (εντολές για τη micro-RAM, spawn εντολή, microcontext) • Compiler και OS υποστήριξη • Hardware υποστήριξη (Micro-RAM,decode/rename, microcontext support, register sets)

  22. Βελτιστοποιημένη εκτέλεση BP : compiler synthesis of dynamic branch prediction taken over by microthreads Prefetching : prefetch explicitly (via spawn instruction + routine ) or implicitly (spawn on events + routine ) Cache management : e.g. adaptive replacement policy

  23. Παράδειγμα : BP Hybrid scheme : processor hardware predictor + microthread based predictor (SSMT) SPAWN => παραπάνω δουλειά. Τι πρέπει να προσέχει κανείς;

  24. Πειράματα BP hardware predictor – 16KB gshare Microthread routine – PAg implementation Ποιές branches αναλαμβάνονται από microthreads; Compiler Selection Heuristic

  25. Speculative Data-Driven Multithreading Microthread > Data-driven thread Primary thread > Control-driven thread SPAWN > FORK Critical instructions (branches, loads) Prediction cache > integration

  26. Extracting Threads from a Program Trace (algo) Work backwards: Misbehaving instance of a critical instruction is a DDT candidate (1) add more a) such instances or b) their memory dependences(3) I3->I2 Trigger: last added instr.

  27. Life cycle of a Data-Driven Thread

  28. Register Integration Μηχανισμός που επιτρέπει την απο κοινού επαναχρησιμοποίηση ήδη υπολογισμένων αποτελεσμάτων μεταξύ διαφορετικών execution contexts ενός προγράμματος Thread <- DDT DDT <- other DDT DDT <- Thread

  29. Performance Evaluation 8-wide SMT DDTC, cloaking table Targeting Cache misses : latencies in L1

  30. Performance Evaluation (contnd.) Targeting Branch Mispredictions

More Related