GoConqr has a new look! Let us know what you think.

Mind map

Threads

Alex Bernini Computer Science English

Threads

Map content

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

Images and files in the map

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

Information

Description
Computer Science Mind Map on Threads, created by Alex Bernini on 06/05/2019.
Created by
Alex Bernini
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?