GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Threads

Alex Bernini Computer Science Englisch

Threads

Inhalt der Mindmap

Threads

  1. What is a 'Thread'?

    • A way for a program to split itself in two or more running tasks
      • Fundamental for CPU utilisation and multithreaded computers
        • Multithreading
          • OS can run multiple threads within a single process
    • a.k.a thread of execution
    • Thread Structure
      • Thread ID
      • Program counter
      • Register set
      • Stack
    • Thread Libraries
      • For Thread Creation and Termination
        • pthread_creat()
        • Pthread_exit()
        • Pthread_detach()
          • Remove data structure
  2. Benefits of Threads

    • Thread creation doesn't require OS to initialise resources shared between parent processes and its threads
    • Responsiveness
      • Process can run even if part of it is blocked
        • User can still use it
    • Resource Sharing
      • Several activities within one address space
    • Economy
      • Threads share resources of process
        • More economical to context-switch threads
    • Utlisation of multiprocessor architectures
      • Multiple threads on multiple CPUs
        • Increased concurrency!
  3. Thread State

    • State shared by all threads in address space
      • Contents of memory (data, heap)
      • I/O state
    • Private to each thread
      • Kept in Thread Control Block (TCB)
  4. Java Threads

    • Extend Thread
    • Implement Runnable
  5. Threading Models

    • User-Level Threads
      • Threading operations performed in user space
        • Kernel sees one execution context
        • many-to-one thread mapping
        • Manage own resources
    • Kernel-Level Threads
      • Maps each thread to its own execution context
        • one-to-one thread mapping
      • If one user-level thread is blocked = whole process blocked
    • User-Kernel Combo Model
      • Thread creation done in user space
      • Bulk of scheduling of threads within application

Bilder und Dateien der Mindmap

  • Threads
  • Threads
  • Threads
  • Threads
  • Threads
  • Threads
  • Threads
  • Threads
  • Threads

Informationen

Beschreibung
Computer Science Mindmap am Threads, erstellt von Alex Bernini am 06/05/2019.
Erstellt von
Alex Bernini
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck