SlideShare a Scribd company logo
1 of 20
Silberschatz, Galvin and Gagne ©20025.1
Chapter 5: Threads
Overview
Multithreading Models
Threading Issues
Pthreads
Solaris 2 Threads
Windows 2000 Threads
Linux Threads
Java Threads
Silberschatz, Galvin and Gagne ©20025.2
Single and Multithreaded
Processes
Silberschatz, Galvin and Gagne ©20025.3
Benefits
Responsiveness
Resource Sharing
Economy
Utilization of MP Architectures
Silberschatz, Galvin and Gagne ©20025.4
User Threads
Thread management done by user-level threads library
Examples
- POSIX Pthreads
- Mach C-threads
- Solaris threads
Silberschatz, Galvin and Gagne ©20025.5
Kernel Threads
Supported by the Kernel
Examples
- Windows 95/98/NT/2000
- Solaris
- Tru64 UNIX
- BeOS
- Linux
Silberschatz, Galvin and Gagne ©20025.6
Multithreading Models
Many-to-One
One-to-One
Many-to-Many
Silberschatz, Galvin and Gagne ©20025.7
Many-to-One
Many user-level threads mapped to single kernel thread.
Used on systems that do not support kernel threads.
Silberschatz, Galvin and Gagne ©20025.8
Many-to-One Model
Silberschatz, Galvin and Gagne ©20025.9
One-to-One
Each user-level thread maps to kernel thread.
Examples
- Windows 95/98/NT/2000
- OS/2
Silberschatz, Galvin and Gagne ©20025.10
One-to-one Model
Silberschatz, Galvin and Gagne ©20025.11
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.
Solaris 2
Windows NT/2000 with the ThreadFiber package
Silberschatz, Galvin and Gagne ©20025.12
Many-to-Many Model
Silberschatz, Galvin and Gagne ©20025.13
Threading Issues
Semantics of fork() and exec() system calls.
Thread cancellation.
Signal handling
Thread pools
Thread specific data
Silberschatz, Galvin and Gagne ©20025.14
Pthreads
a POSIX standard (IEEE 1003.1c) API for thread creation
and synchronization.
API specifies behavior of the thread library,
implementation is up to development of the library.
Common in UNIX operating systems.
Silberschatz, Galvin and Gagne ©20025.15
Solaris 2 Threads
Silberschatz, Galvin and Gagne ©20025.16
Solaris Process
Silberschatz, Galvin and Gagne ©20025.17
Windows 2000 Threads
Implements the one-to-one mapping.
Each thread contains
- a thread id
- register set
- separate user and kernel stacks
- private data storage area
Silberschatz, Galvin and Gagne ©20025.18
Linux Threads
Linux refers to them as tasks rather than threads.
Thread creation is done through clone() system call.
Clone() allows a child task to share the address space of
the parent task (process)
Silberschatz, Galvin and Gagne ©20025.19
Java Threads
Java threads may be created by:
Extending Thread class
Implementing the Runnable interface
Java threads are managed by the JVM.
Silberschatz, Galvin and Gagne ©20025.20
Java Thread States

More Related Content

What's hot

CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...
CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...
CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...The Linux Foundation
 
Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...
Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...
Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...Stefano Salsano
 
BRKDCT-2445 Agile OpenStack Networking with Cisco Solutions-Cisco Live! US 20...
BRKDCT-2445 Agile OpenStack Networking with Cisco Solutions-Cisco Live! US 20...BRKDCT-2445 Agile OpenStack Networking with Cisco Solutions-Cisco Live! US 20...
BRKDCT-2445 Agile OpenStack Networking with Cisco Solutions-Cisco Live! US 20...Rohit Agarwalla
 
Unified Underlay and Overlay SDNs for OpenStack Clouds
Unified Underlay and Overlay SDNs for OpenStack CloudsUnified Underlay and Overlay SDNs for OpenStack Clouds
Unified Underlay and Overlay SDNs for OpenStack CloudsPLUMgrid
 
CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University)
CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University)CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University)
CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University)The Linux Foundation
 
Opensource approach to design and deployment of Microservices based VNF
Opensource approach to design and deployment of Microservices based VNFOpensource approach to design and deployment of Microservices based VNF
Opensource approach to design and deployment of Microservices based VNFMichelle Holley
 
Revolutionizing IT and Telecom Industry with OpenStack, SDN and NFV
Revolutionizing IT and Telecom Industry with OpenStack, SDN and NFVRevolutionizing IT and Telecom Industry with OpenStack, SDN and NFV
Revolutionizing IT and Telecom Industry with OpenStack, SDN and NFVPLUMgrid
 
MidoNet Future -ミドネットの未来-
MidoNet Future -ミドネットの未来-MidoNet Future -ミドネットの未来-
MidoNet Future -ミドネットの未来-Midokura
 
LF_OVS_17_OVN at Nutanix
LF_OVS_17_OVN at NutanixLF_OVS_17_OVN at Nutanix
LF_OVS_17_OVN at NutanixLF_OpenvSwitch
 
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...The Linux Foundation
 
Microservices Architectures with Docker Swarm, etcd, Kuryr and Neutron
Microservices Architectures with Docker Swarm, etcd, Kuryr and NeutronMicroservices Architectures with Docker Swarm, etcd, Kuryr and Neutron
Microservices Architectures with Docker Swarm, etcd, Kuryr and NeutronFawad Khaliq
 
XPDS14: MirageOS 2.0: branch consistency for Xen Stub Domains - Anil Madhavap...
XPDS14: MirageOS 2.0: branch consistency for Xen Stub Domains - Anil Madhavap...XPDS14: MirageOS 2.0: branch consistency for Xen Stub Domains - Anil Madhavap...
XPDS14: MirageOS 2.0: branch consistency for Xen Stub Domains - Anil Madhavap...The Linux Foundation
 
Tacker - a generic VNF Manager using OpenStack
Tacker - a generic VNF Manager using OpenStackTacker - a generic VNF Manager using OpenStack
Tacker - a generic VNF Manager using OpenStackSridhar Ramaswamy
 
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)The Linux Foundation
 
NFV & SDN ( Efficiency & Automation )
NFV & SDN ( Efficiency & Automation )NFV & SDN ( Efficiency & Automation )
NFV & SDN ( Efficiency & Automation )Hongsik Choi
 
Unikernel User Summit 2015: Getting started in unikernels using the rump kernel
Unikernel User Summit 2015: Getting started in unikernels using the rump kernelUnikernel User Summit 2015: Getting started in unikernels using the rump kernel
Unikernel User Summit 2015: Getting started in unikernels using the rump kernelThe Linux Foundation
 
Flexible NFV WAN interconnections with Neutron BGP VPN
 Flexible NFV WAN interconnections with Neutron BGP VPN Flexible NFV WAN interconnections with Neutron BGP VPN
Flexible NFV WAN interconnections with Neutron BGP VPNThomas Morin
 

What's hot (20)

CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...
CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...
CIF16: Unikernels, Meet Docker! Containing Unikernels (Richard Mortier, Anil ...
 
BRKSDN-2115
BRKSDN-2115 BRKSDN-2115
BRKSDN-2115
 
Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...
Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...
Superfluid Orchestration of heterogeneous Reusable Functional Blocks for 5G n...
 
BRKDCT-2445 Agile OpenStack Networking with Cisco Solutions-Cisco Live! US 20...
BRKDCT-2445 Agile OpenStack Networking with Cisco Solutions-Cisco Live! US 20...BRKDCT-2445 Agile OpenStack Networking with Cisco Solutions-Cisco Live! US 20...
BRKDCT-2445 Agile OpenStack Networking with Cisco Solutions-Cisco Live! US 20...
 
Unified Underlay and Overlay SDNs for OpenStack Clouds
Unified Underlay and Overlay SDNs for OpenStack CloudsUnified Underlay and Overlay SDNs for OpenStack Clouds
Unified Underlay and Overlay SDNs for OpenStack Clouds
 
CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University)
CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University)CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University)
CIF16: Knock, Knock: Unikernels Calling! (Richard Mortier, Cambridge University)
 
Opensource approach to design and deployment of Microservices based VNF
Opensource approach to design and deployment of Microservices based VNFOpensource approach to design and deployment of Microservices based VNF
Opensource approach to design and deployment of Microservices based VNF
 
Revolutionizing IT and Telecom Industry with OpenStack, SDN and NFV
Revolutionizing IT and Telecom Industry with OpenStack, SDN and NFVRevolutionizing IT and Telecom Industry with OpenStack, SDN and NFV
Revolutionizing IT and Telecom Industry with OpenStack, SDN and NFV
 
MidoNet Future -ミドネットの未来-
MidoNet Future -ミドネットの未来-MidoNet Future -ミドネットの未来-
MidoNet Future -ミドネットの未来-
 
LF_OVS_17_OVN at Nutanix
LF_OVS_17_OVN at NutanixLF_OVS_17_OVN at Nutanix
LF_OVS_17_OVN at Nutanix
 
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
CIF16: Unikernels: The Past, the Present, the Future ( Russell Pavlicek, Xen ...
 
Microservices Architectures with Docker Swarm, etcd, Kuryr and Neutron
Microservices Architectures with Docker Swarm, etcd, Kuryr and NeutronMicroservices Architectures with Docker Swarm, etcd, Kuryr and Neutron
Microservices Architectures with Docker Swarm, etcd, Kuryr and Neutron
 
XPDS14: MirageOS 2.0: branch consistency for Xen Stub Domains - Anil Madhavap...
XPDS14: MirageOS 2.0: branch consistency for Xen Stub Domains - Anil Madhavap...XPDS14: MirageOS 2.0: branch consistency for Xen Stub Domains - Anil Madhavap...
XPDS14: MirageOS 2.0: branch consistency for Xen Stub Domains - Anil Madhavap...
 
Tacker - a generic VNF Manager using OpenStack
Tacker - a generic VNF Manager using OpenStackTacker - a generic VNF Manager using OpenStack
Tacker - a generic VNF Manager using OpenStack
 
Symantec SDN Deployment
Symantec SDN DeploymentSymantec SDN Deployment
Symantec SDN Deployment
 
IITCC15: Xen Project 4.6 Update
IITCC15: Xen Project 4.6 UpdateIITCC15: Xen Project 4.6 Update
IITCC15: Xen Project 4.6 Update
 
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
CIF16: Building the Superfluid Cloud with Unikernels (Simon Kuenzer, NEC Europe)
 
NFV & SDN ( Efficiency & Automation )
NFV & SDN ( Efficiency & Automation )NFV & SDN ( Efficiency & Automation )
NFV & SDN ( Efficiency & Automation )
 
Unikernel User Summit 2015: Getting started in unikernels using the rump kernel
Unikernel User Summit 2015: Getting started in unikernels using the rump kernelUnikernel User Summit 2015: Getting started in unikernels using the rump kernel
Unikernel User Summit 2015: Getting started in unikernels using the rump kernel
 
Flexible NFV WAN interconnections with Neutron BGP VPN
 Flexible NFV WAN interconnections with Neutron BGP VPN Flexible NFV WAN interconnections with Neutron BGP VPN
Flexible NFV WAN interconnections with Neutron BGP VPN
 

Similar to Ch5 threads galvin

Galvin-operating System(Ch5)
Galvin-operating System(Ch5)Galvin-operating System(Ch5)
Galvin-operating System(Ch5)dsuyal1
 
Operating System : Ch4 b threads
Operating System : Ch4 b threadsOperating System : Ch4 b threads
Operating System : Ch4 b threadsSyaiful Ahdan
 
Ch5 OS
Ch5 OSCh5 OS
Ch5 OSC.U
 
Threads are using in operating systems.pptx
Threads are using in operating systems.pptxThreads are using in operating systems.pptx
Threads are using in operating systems.pptxMAmir53
 
Operating System - Ch5
Operating System - Ch5Operating System - Ch5
Operating System - Ch5Resty Aldana
 
Unit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - ThreadsUnit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - Threadscscarcas
 
Threads & Concurrency
Threads & Concurrency Threads & Concurrency
Threads & Concurrency NomanMHasan
 
Threads semaphoremutexlocksdeadlockp.ppt
Threads semaphoremutexlocksdeadlockp.pptThreads semaphoremutexlocksdeadlockp.ppt
Threads semaphoremutexlocksdeadlockp.pptStephyBless
 
ch4.ppt operation system. Dats structure and alogor
ch4.ppt operation system. Dats structure and alogorch4.ppt operation system. Dats structure and alogor
ch4.ppt operation system. Dats structure and alogorAjithPArun1
 

Similar to Ch5 threads galvin (20)

ch5.ppt
ch5.pptch5.ppt
ch5.ppt
 
Galvin-operating System(Ch5)
Galvin-operating System(Ch5)Galvin-operating System(Ch5)
Galvin-operating System(Ch5)
 
Operating System : Ch4 b threads
Operating System : Ch4 b threadsOperating System : Ch4 b threads
Operating System : Ch4 b threads
 
Ch4 threads
Ch4 threadsCh4 threads
Ch4 threads
 
OS_Ch5
OS_Ch5OS_Ch5
OS_Ch5
 
OSCh5
OSCh5OSCh5
OSCh5
 
Ch5 OS
Ch5 OSCh5 OS
Ch5 OS
 
Ch4 threads
Ch4  threadsCh4  threads
Ch4 threads
 
Threads are using in operating systems.pptx
Threads are using in operating systems.pptxThreads are using in operating systems.pptx
Threads are using in operating systems.pptx
 
Operating System - Ch5
Operating System - Ch5Operating System - Ch5
Operating System - Ch5
 
Unit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - ThreadsUnit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - Threads
 
My DIaries
My DIariesMy DIaries
My DIaries
 
ch4.pptx
ch4.pptxch4.pptx
ch4.pptx
 
ch4.pptx
ch4.pptxch4.pptx
ch4.pptx
 
Threads & Concurrency
Threads & Concurrency Threads & Concurrency
Threads & Concurrency
 
4 threads
4 threads4 threads
4 threads
 
ch4.ppt
ch4.pptch4.ppt
ch4.ppt
 
ch4.ppt
ch4.pptch4.ppt
ch4.ppt
 
Threads semaphoremutexlocksdeadlockp.ppt
Threads semaphoremutexlocksdeadlockp.pptThreads semaphoremutexlocksdeadlockp.ppt
Threads semaphoremutexlocksdeadlockp.ppt
 
ch4.ppt operation system. Dats structure and alogor
ch4.ppt operation system. Dats structure and alogorch4.ppt operation system. Dats structure and alogor
ch4.ppt operation system. Dats structure and alogor
 

More from Shubham Singh

Certificate of Completion
Certificate of CompletionCertificate of Completion
Certificate of CompletionShubham Singh
 
Certificate of Completion
Certificate of CompletionCertificate of Completion
Certificate of CompletionShubham Singh
 
Gmail google for education - certificate of achievement
Gmail   google for education - certificate of achievementGmail   google for education - certificate of achievement
Gmail google for education - certificate of achievementShubham Singh
 
Transmission media 2
Transmission media 2Transmission media 2
Transmission media 2Shubham Singh
 
Transmission media ppt
Transmission media pptTransmission media ppt
Transmission media pptShubham Singh
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 completeShubham Singh
 
Ch7 Process Synchronization galvin
Ch7 Process Synchronization galvinCh7 Process Synchronization galvin
Ch7 Process Synchronization galvinShubham Singh
 
Ch6 CPU Scheduling galvin
Ch6 CPU Scheduling galvinCh6 CPU Scheduling galvin
Ch6 CPU Scheduling galvinShubham Singh
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Shubham Singh
 
Chapter 1 microprocessor introduction
Chapter 1 microprocessor introductionChapter 1 microprocessor introduction
Chapter 1 microprocessor introductionShubham Singh
 

More from Shubham Singh (13)

Certificate of Completion
Certificate of CompletionCertificate of Completion
Certificate of Completion
 
Certificate of Completion
Certificate of CompletionCertificate of Completion
Certificate of Completion
 
Gmail google for education - certificate of achievement
Gmail   google for education - certificate of achievementGmail   google for education - certificate of achievement
Gmail google for education - certificate of achievement
 
Transmission media 2
Transmission media 2Transmission media 2
Transmission media 2
 
Transmission media ppt
Transmission media pptTransmission media ppt
Transmission media ppt
 
Wifi ppt
Wifi pptWifi ppt
Wifi ppt
 
Microprocessor 8085 complete
Microprocessor 8085 completeMicroprocessor 8085 complete
Microprocessor 8085 complete
 
Ch9 Virtual Memory
Ch9 Virtual MemoryCh9 Virtual Memory
Ch9 Virtual Memory
 
Ch7 Process Synchronization galvin
Ch7 Process Synchronization galvinCh7 Process Synchronization galvin
Ch7 Process Synchronization galvin
 
Ch6 CPU Scheduling galvin
Ch6 CPU Scheduling galvinCh6 CPU Scheduling galvin
Ch6 CPU Scheduling galvin
 
Interrupt 8085
Interrupt 8085Interrupt 8085
Interrupt 8085
 
Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085Chapter 3 instruction set-of-8085
Chapter 3 instruction set-of-8085
 
Chapter 1 microprocessor introduction
Chapter 1 microprocessor introductionChapter 1 microprocessor introduction
Chapter 1 microprocessor introduction
 

Recently uploaded

IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 

Recently uploaded (20)

IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 

Ch5 threads galvin

  • 1. Silberschatz, Galvin and Gagne ©20025.1 Chapter 5: Threads Overview Multithreading Models Threading Issues Pthreads Solaris 2 Threads Windows 2000 Threads Linux Threads Java Threads
  • 2. Silberschatz, Galvin and Gagne ©20025.2 Single and Multithreaded Processes
  • 3. Silberschatz, Galvin and Gagne ©20025.3 Benefits Responsiveness Resource Sharing Economy Utilization of MP Architectures
  • 4. Silberschatz, Galvin and Gagne ©20025.4 User Threads Thread management done by user-level threads library Examples - POSIX Pthreads - Mach C-threads - Solaris threads
  • 5. Silberschatz, Galvin and Gagne ©20025.5 Kernel Threads Supported by the Kernel Examples - Windows 95/98/NT/2000 - Solaris - Tru64 UNIX - BeOS - Linux
  • 6. Silberschatz, Galvin and Gagne ©20025.6 Multithreading Models Many-to-One One-to-One Many-to-Many
  • 7. Silberschatz, Galvin and Gagne ©20025.7 Many-to-One Many user-level threads mapped to single kernel thread. Used on systems that do not support kernel threads.
  • 8. Silberschatz, Galvin and Gagne ©20025.8 Many-to-One Model
  • 9. Silberschatz, Galvin and Gagne ©20025.9 One-to-One Each user-level thread maps to kernel thread. Examples - Windows 95/98/NT/2000 - OS/2
  • 10. Silberschatz, Galvin and Gagne ©20025.10 One-to-one Model
  • 11. Silberschatz, Galvin and Gagne ©20025.11 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. Solaris 2 Windows NT/2000 with the ThreadFiber package
  • 12. Silberschatz, Galvin and Gagne ©20025.12 Many-to-Many Model
  • 13. Silberschatz, Galvin and Gagne ©20025.13 Threading Issues Semantics of fork() and exec() system calls. Thread cancellation. Signal handling Thread pools Thread specific data
  • 14. Silberschatz, Galvin and Gagne ©20025.14 Pthreads a POSIX standard (IEEE 1003.1c) API for thread creation and synchronization. API specifies behavior of the thread library, implementation is up to development of the library. Common in UNIX operating systems.
  • 15. Silberschatz, Galvin and Gagne ©20025.15 Solaris 2 Threads
  • 16. Silberschatz, Galvin and Gagne ©20025.16 Solaris Process
  • 17. Silberschatz, Galvin and Gagne ©20025.17 Windows 2000 Threads Implements the one-to-one mapping. Each thread contains - a thread id - register set - separate user and kernel stacks - private data storage area
  • 18. Silberschatz, Galvin and Gagne ©20025.18 Linux Threads Linux refers to them as tasks rather than threads. Thread creation is done through clone() system call. Clone() allows a child task to share the address space of the parent task (process)
  • 19. Silberschatz, Galvin and Gagne ©20025.19 Java Threads Java threads may be created by: Extending Thread class Implementing the Runnable interface Java threads are managed by the JVM.
  • 20. Silberschatz, Galvin and Gagne ©20025.20 Java Thread States