SlideShare a Scribd company logo
Threads

   Organized By: Vinay Arora
                 Assistant Professor
                 CSED, TU




                                   Vinay Arora
                                      CSED
Disclaimer

           This is NOT A COPYRIGHT          MATERIAL


   Content has been taken mainly from the following books:

        Operating Systems Concepts By Silberschatz & Galvin,
Operating Systems: Internals and Design Principles By William Stallings
                        www.os-book.com
         www.cs.jhu.edu/~yairamir/cs418/os2/sld001.htm
     www.personal.kent.edu/~rmuhamma/OpSystems/os.html
 http://msdn.microsoft.com/en-us/library/ms685096(VS.85).aspx
http://www.computer.howsttuffworks.com/operating-system6.htm
         http://williamstallings.com/OS/Animations.html
                               Etc…

                              Vinay Arora
                                 CSED
Thread
  Application - Set of Multiple Processes

  Process – An Executable File (.exe)

  Each PROCESS has its own Address Space, CPU Quota, Access to
  Hardware Resources and Kernel Resources

  THREAD – Function Present within Executable File

  Each THREAD has its own PC, Stack , Registers




                                Vinay Arora
                                   CSED
Process Thread View




                Vinay Arora
                   CSED
Process View




               Vinay Arora
                  CSED
Thread View




              Vinay Arora
                 CSED
Processes & Threads




                Vinay Arora
                   CSED
User Space & Kernel Space




                Vinay Arora
                   CSED
Multicore Programming
   Multi-Core Systems putting pressure on programmers, challenges
   include



      Dividing activities

      Balance

      Data splitting

      Data dependency

      Testing and debugging

                                Vinay Arora
                                   CSED
Concurrent Execution on a Single-core
              System




                  Vinay Arora
                     CSED
Concurrent Execution on a Multi-core
              System




                 Vinay Arora
                    CSED
Pure User Level




                  Vinay Arora
                     CSED
Pure Kernel Level




                Vinay Arora
                   CSED
Combined




           Vinay Arora
              CSED
Combined Threads




               Vinay Arora
                  CSED
Single & Multi Threaded Process




                Vinay Arora
                   CSED
Benefits
   Responsiveness



   Resource Sharing



   Economy



   Utilization of MP Architectures



                                 Vinay Arora
                                    CSED
User Thread & Kernel Thread
   User Thread - Thread Management done by User-Level Threads Library

   Kernel Thread - Supported by the KERNEL

   Examples

      Windows XP/2000

      Solaris

      Linux

      Tru64 UNIX

      Mac OS X


                                 Vinay Arora
                                    CSED
Thread Library
   Three Primary Thread Libraries:


      Java Threads

       Pthreads

      Win32 Threads




                                Vinay Arora
                                   CSED
Multi Threading Models

   Many-to-One



   One-to-One



   Many-to-Many




                  Vinay Arora
                     CSED
Many-to-One Model
  Many User-Level Threads mapped to Single Kernel Thread

  Examples:

     Solaris Green Threads




                             Vinay Arora
                                CSED
One-to-One Model
   Each User-Level Thread maps to KERNEL THREAD

   Examples
      Linux
      Solaris 9 and later
      Windows NT/XP/2000




                            Vinay Arora
                               CSED
Many-to-Many Model
  Allows many User Level Threads to be mapped to many Kernel Threads
  Allows the Operating System to create a sufficient number of Kernel
  Threads

  Windows NT/2000




                              Vinay Arora
                                 CSED
Thnx…



  Vinay Arora
     CSED

More Related Content

What's hot

Operating System-Threads-Galvin
Operating System-Threads-GalvinOperating System-Threads-Galvin
Operating System-Threads-Galvin
Sonali Chauhan
 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating Systems
Nitish Gulati
 
Posix threads(asha)
Posix threads(asha)Posix threads(asha)
Posix threads(asha)
Nagarajan
 
Multithreading models
Multithreading modelsMultithreading models
Multithreading models
anoopkrishna2
 

What's hot (20)

Operating System-Threads-Galvin
Operating System-Threads-GalvinOperating System-Threads-Galvin
Operating System-Threads-Galvin
 
Operating Systems 1 (7/12) - Threads
Operating Systems 1 (7/12) - ThreadsOperating Systems 1 (7/12) - Threads
Operating Systems 1 (7/12) - Threads
 
OS_Ch5
OS_Ch5OS_Ch5
OS_Ch5
 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating Systems
 
Thread management
Thread management Thread management
Thread management
 
Os
OsOs
Os
 
4 threads
4 threads4 threads
4 threads
 
Section04 threads
Section04 threadsSection04 threads
Section04 threads
 
Thread (Operating System)
Thread  (Operating System)Thread  (Operating System)
Thread (Operating System)
 
Posix threads(asha)
Posix threads(asha)Posix threads(asha)
Posix threads(asha)
 
Networking threads
Networking threadsNetworking threads
Networking threads
 
multi-threading
multi-threadingmulti-threading
multi-threading
 
Threads
ThreadsThreads
Threads
 
Multithreading models
Multithreading modelsMultithreading models
Multithreading models
 
THREADS of Operating System by Noman Zahid
THREADS of Operating System by Noman Zahid THREADS of Operating System by Noman Zahid
THREADS of Operating System by Noman Zahid
 
threads and its types ....in operating system ..
threads and its types ....in operating system ..threads and its types ....in operating system ..
threads and its types ....in operating system ..
 
Threading
ThreadingThreading
Threading
 
Operating system: threads(mulithreading,benefits of threads, types of thread)
Operating system: threads(mulithreading,benefits of threads, types of thread)Operating system: threads(mulithreading,benefits of threads, types of thread)
Operating system: threads(mulithreading,benefits of threads, types of thread)
 
Lecture 9 -_pthreads-linux_threads
Lecture 9 -_pthreads-linux_threadsLecture 9 -_pthreads-linux_threads
Lecture 9 -_pthreads-linux_threads
 
Thread
ThreadThread
Thread
 

Viewers also liked

Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
gavhays
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
Mohd Tousif
 

Viewers also liked (20)

Ch5: Threads (Operating System)
Ch5: Threads (Operating System)Ch5: Threads (Operating System)
Ch5: Threads (Operating System)
 
OS Process and Thread Concepts
OS Process and Thread ConceptsOS Process and Thread Concepts
OS Process and Thread Concepts
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
Os Threads
Os ThreadsOs Threads
Os Threads
 
Main Memory
Main MemoryMain Memory
Main Memory
 
2's complement
2's complement2's complement
2's complement
 
Representation of Negative Numbers
Representation of Negative NumbersRepresentation of Negative Numbers
Representation of Negative Numbers
 
Complement
ComplementComplement
Complement
 
Complements
ComplementsComplements
Complements
 
2s complement arithmetic
2s complement arithmetic2s complement arithmetic
2s complement arithmetic
 
1's and 2's complement
1's and 2's complement 1's and 2's complement
1's and 2's complement
 
Thread presentation
Thread presentationThread presentation
Thread presentation
 
Binary Arithmetic
Binary ArithmeticBinary Arithmetic
Binary Arithmetic
 
IPC
IPCIPC
IPC
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
1s and 2s complement
1s and 2s complement1s and 2s complement
1s and 2s complement
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
 
Memory management
Memory managementMemory management
Memory management
 
Kernel (OS)
Kernel (OS)Kernel (OS)
Kernel (OS)
 

Similar to OS - Thread

OS - System Structure
OS - System StructureOS - System Structure
OS - System Structure
vinay arora
 
Galvin-operating System(Ch5)
Galvin-operating System(Ch5)Galvin-operating System(Ch5)
Galvin-operating System(Ch5)
dsuyal1
 
AWS Summit 2011: Application Security Best Practices
AWS Summit 2011: Application Security Best PracticesAWS Summit 2011: Application Security Best Practices
AWS Summit 2011: Application Security Best Practices
Amazon Web Services
 

Similar to OS - Thread (20)

OSCh5
OSCh5OSCh5
OSCh5
 
ch5.ppt
ch5.pptch5.ppt
ch5.ppt
 
Operating Systems - "Chapter 4: Multithreaded Programming"
Operating Systems - "Chapter 4:  Multithreaded Programming"Operating Systems - "Chapter 4:  Multithreaded Programming"
Operating Systems - "Chapter 4: Multithreaded Programming"
 
Multi threaded programming
Multi threaded programmingMulti threaded programming
Multi threaded programming
 
4.Threads
4.Threads4.Threads
4.Threads
 
Sucet os module_2_notes
Sucet os module_2_notesSucet os module_2_notes
Sucet os module_2_notes
 
Thread
ThreadThread
Thread
 
OS - System Structure
OS - System StructureOS - System Structure
OS - System Structure
 
Galvin-operating System(Ch5)
Galvin-operating System(Ch5)Galvin-operating System(Ch5)
Galvin-operating System(Ch5)
 
Scaling Data Servers via Cooperative Caching
Scaling Data Servers via Cooperative CachingScaling Data Servers via Cooperative Caching
Scaling Data Servers via Cooperative Caching
 
dos slide share.pptx
dos slide share.pptxdos slide share.pptx
dos slide share.pptx
 
Concept of thread, multi thread, tcb
Concept of thread, multi thread, tcbConcept of thread, multi thread, tcb
Concept of thread, multi thread, tcb
 
Linux Driver and Embedded Developer with Android Course Content & Highlights
Linux Driver and Embedded Developer with Android Course Content & HighlightsLinux Driver and Embedded Developer with Android Course Content & Highlights
Linux Driver and Embedded Developer with Android Course Content & Highlights
 
AWS Summit 2011: Application Security Best Practices
AWS Summit 2011: Application Security Best PracticesAWS Summit 2011: Application Security Best Practices
AWS Summit 2011: Application Security Best Practices
 
CH04.pdf
CH04.pdfCH04.pdf
CH04.pdf
 
Treads
TreadsTreads
Treads
 
Threading through InterBase, Firebird, and beyond
Threading through InterBase, Firebird, and beyondThreading through InterBase, Firebird, and beyond
Threading through InterBase, Firebird, and beyond
 
Visual comparison of Unix-like systems & Virtualisation
Visual comparison of Unix-like systems & VirtualisationVisual comparison of Unix-like systems & Virtualisation
Visual comparison of Unix-like systems & Virtualisation
 
Linux Driver and Embedded Developer Course Highlights
Linux Driver and  Embedded Developer Course HighlightsLinux Driver and  Embedded Developer Course Highlights
Linux Driver and Embedded Developer Course Highlights
 
Threading.pptx
Threading.pptxThreading.pptx
Threading.pptx
 

More from vinay arora (20)

Search engine and web crawler
Search engine and web crawlerSearch engine and web crawler
Search engine and web crawler
 
Use case diagram (airport)
Use case diagram (airport)Use case diagram (airport)
Use case diagram (airport)
 
Use case diagram
Use case diagramUse case diagram
Use case diagram
 
Lab exercise questions (AD & CD)
Lab exercise questions (AD & CD)Lab exercise questions (AD & CD)
Lab exercise questions (AD & CD)
 
SEM - UML (1st case study)
SEM - UML (1st case study)SEM - UML (1st case study)
SEM - UML (1st case study)
 
6 java - loop
6  java - loop6  java - loop
6 java - loop
 
4 java - decision
4  java - decision4  java - decision
4 java - decision
 
3 java - variable type
3  java - variable type3  java - variable type
3 java - variable type
 
2 java - operators
2  java - operators2  java - operators
2 java - operators
 
1 java - data type
1  java - data type1  java - data type
1 java - data type
 
Uta005 lecture3
Uta005 lecture3Uta005 lecture3
Uta005 lecture3
 
Uta005 lecture1
Uta005 lecture1Uta005 lecture1
Uta005 lecture1
 
Uta005 lecture2
Uta005 lecture2Uta005 lecture2
Uta005 lecture2
 
Security & Protection
Security & ProtectionSecurity & Protection
Security & Protection
 
Process Synchronization
Process SynchronizationProcess Synchronization
Process Synchronization
 
CG - Output Primitives
CG - Output PrimitivesCG - Output Primitives
CG - Output Primitives
 
CG - Display Devices
CG - Display DevicesCG - Display Devices
CG - Display Devices
 
CG - Input Output Devices
CG - Input Output DevicesCG - Input Output Devices
CG - Input Output Devices
 
CG - Introduction to Computer Graphics
CG - Introduction to Computer GraphicsCG - Introduction to Computer Graphics
CG - Introduction to Computer Graphics
 
C Prog. - Strings (Updated)
C Prog. - Strings (Updated)C Prog. - Strings (Updated)
C Prog. - Strings (Updated)
 

Recently uploaded

Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
Avinash Rai
 

Recently uploaded (20)

Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
Forest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDFForest and Wildlife Resources Class 10 Free Study Material PDF
Forest and Wildlife Resources Class 10 Free Study Material PDF
 
2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx2024_Student Session 2_ Set Plan Preparation.pptx
2024_Student Session 2_ Set Plan Preparation.pptx
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
Benefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational ResourcesBenefits and Challenges of Using Open Educational Resources
Benefits and Challenges of Using Open Educational Resources
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptxslides CapTechTalks Webinar May 2024 Alexander Perry.pptx
slides CapTechTalks Webinar May 2024 Alexander Perry.pptx
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
Operations Management - Book1.p  - Dr. Abdulfatah A. SalemOperations Management - Book1.p  - Dr. Abdulfatah A. Salem
Operations Management - Book1.p - Dr. Abdulfatah A. Salem
 
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
Mattingly "AI & Prompt Design: Limitations and Solutions with LLMs"
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation[GDSC YCCE] Build with AI Online Presentation
[GDSC YCCE] Build with AI Online Presentation
 

OS - Thread

  • 1. Threads Organized By: Vinay Arora Assistant Professor CSED, TU Vinay Arora CSED
  • 2. Disclaimer This is NOT A COPYRIGHT MATERIAL Content has been taken mainly from the following books: Operating Systems Concepts By Silberschatz & Galvin, Operating Systems: Internals and Design Principles By William Stallings www.os-book.com www.cs.jhu.edu/~yairamir/cs418/os2/sld001.htm www.personal.kent.edu/~rmuhamma/OpSystems/os.html http://msdn.microsoft.com/en-us/library/ms685096(VS.85).aspx http://www.computer.howsttuffworks.com/operating-system6.htm http://williamstallings.com/OS/Animations.html Etc… Vinay Arora CSED
  • 3. Thread Application - Set of Multiple Processes Process – An Executable File (.exe) Each PROCESS has its own Address Space, CPU Quota, Access to Hardware Resources and Kernel Resources THREAD – Function Present within Executable File Each THREAD has its own PC, Stack , Registers Vinay Arora CSED
  • 4. Process Thread View Vinay Arora CSED
  • 5. Process View Vinay Arora CSED
  • 6. Thread View Vinay Arora CSED
  • 7. Processes & Threads Vinay Arora CSED
  • 8. User Space & Kernel Space Vinay Arora CSED
  • 9. Multicore Programming Multi-Core Systems putting pressure on programmers, challenges include Dividing activities Balance Data splitting Data dependency Testing and debugging Vinay Arora CSED
  • 10. Concurrent Execution on a Single-core System Vinay Arora CSED
  • 11. Concurrent Execution on a Multi-core System Vinay Arora CSED
  • 12. Pure User Level Vinay Arora CSED
  • 13. Pure Kernel Level Vinay Arora CSED
  • 14. Combined Vinay Arora CSED
  • 15. Combined Threads Vinay Arora CSED
  • 16. Single & Multi Threaded Process Vinay Arora CSED
  • 17. Benefits Responsiveness Resource Sharing Economy Utilization of MP Architectures Vinay Arora CSED
  • 18. User Thread & Kernel Thread User Thread - Thread Management done by User-Level Threads Library Kernel Thread - Supported by the KERNEL Examples Windows XP/2000 Solaris Linux Tru64 UNIX Mac OS X Vinay Arora CSED
  • 19. Thread Library Three Primary Thread Libraries: Java Threads Pthreads Win32 Threads Vinay Arora CSED
  • 20. Multi Threading Models Many-to-One One-to-One Many-to-Many Vinay Arora CSED
  • 21. Many-to-One Model Many User-Level Threads mapped to Single Kernel Thread Examples: Solaris Green Threads Vinay Arora CSED
  • 22. One-to-One Model Each User-Level Thread maps to KERNEL THREAD Examples Linux Solaris 9 and later Windows NT/XP/2000 Vinay Arora CSED
  • 23. Many-to-Many Model Allows many User Level Threads to be mapped to many Kernel Threads Allows the Operating System to create a sufficient number of Kernel Threads Windows NT/2000 Vinay Arora CSED
  • 24. Thnx… Vinay Arora CSED