SlideShare a Scribd company logo
Enviar pesquisa
Carregar
Entrar
Cadastre-se
Ch4 threads
Denunciar
Ankit Dubey
Seguir
Student em Student of Government Polytechnic Mumbai
20 de Mar de 2021
•
0 gostou
•
54 visualizações
1
de
31
Ch4 threads
20 de Mar de 2021
•
0 gostou
•
54 visualizações
Baixar agora
Baixar para ler offline
Denunciar
Engenharia
operating systems
Ankit Dubey
Seguir
Student em Student of Government Polytechnic Mumbai
Recomendados
Ch1
nubinny
511 visualizações
•
44 slides
CPU scheduling ppt file
Dwight Sabio
494 visualizações
•
67 slides
Ch2
Kailash Maheshwari
152 visualizações
•
31 slides
4 threads
BaliThorat1
325 visualizações
•
22 slides
5 process synchronization
BaliThorat1
441 visualizações
•
20 slides
cs8493 - operating systems unit 2
SIMONTHOMAS S
58 visualizações
•
288 slides
Mais conteúdo relacionado
Mais procurados
Operating Systems Chapter 6 silberschatz
GiulianoRanauro
1.2K visualizações
•
61 slides
Chapter 1: Introduction to Operating System
Shafaan Khaliq
29.7K visualizações
•
59 slides
Operating System-Ch8 memory management
Syaiful Ahdan
6.4K visualizações
•
42 slides
cs8493 - operating systems unit 1
SIMONTHOMAS S
170 visualizações
•
117 slides
Ch2
nubinny
2.8K visualizações
•
50 slides
Ch1-Operating System Concept
Muhammad Bilal Tariq
6.7K visualizações
•
48 slides
Mais procurados
(20)
Operating Systems Chapter 6 silberschatz
GiulianoRanauro
•
1.2K visualizações
Chapter 1: Introduction to Operating System
Shafaan Khaliq
•
29.7K visualizações
Operating System-Ch8 memory management
Syaiful Ahdan
•
6.4K visualizações
cs8493 - operating systems unit 1
SIMONTHOMAS S
•
170 visualizações
Ch2
nubinny
•
2.8K visualizações
Ch1-Operating System Concept
Muhammad Bilal Tariq
•
6.7K visualizações
2 os structure
BaliThorat1
•
317 visualizações
3 processes
BaliThorat1
•
323 visualizações
Chapter 9 Operating Systems silberschatz
GiulianoRanauro
•
1.2K visualizações
Lecture#5
Adil Alpkoçak
•
176 visualizações
Operating systems chapter 5 silberschatz
GiulianoRanauro
•
1.4K visualizações
Operating System - Unit I - Introduction
cscarcas
•
3.7K visualizações
MPMC chapter
subhamsriramka
•
70 visualizações
cs8493 - operating systems unit 5
SIMONTHOMAS S
•
129 visualizações
Ch8 of OS
Nv Thejaswini
•
524 visualizações
Memory : operating system ( Btech cse )
HimanshuSharma1389
•
186 visualizações
Process scheduling : operating system ( Btech cse )
HimanshuSharma1389
•
360 visualizações
Process synchonization : operating system ( Btech cse )
HimanshuSharma1389
•
108 visualizações
Deadlocks
SyedTalhaBukhari2
•
510 visualizações
Slides For Operating System Concepts By Silberschatz Galvin And Gagne
sarankumar4445
•
23.6K visualizações
Similar a Ch4 threads
Unit II - 2 - Operating System - Threads
cscarcas
6.1K visualizações
•
46 slides
My DIaries
Mehak Raza
29 visualizações
•
46 slides
ch4.ppt
ssuser9f517f1
1 visão
•
46 slides
4.Threads
Senthil Kanth
1.5K visualizações
•
28 slides
ch4.pptx
ZoYaKazmi3
2 visualizações
•
63 slides
ch4.pptx
MdMushfiqurRashidMar
4 visualizações
•
63 slides
Similar a Ch4 threads
(20)
Unit II - 2 - Operating System - Threads
cscarcas
•
6.1K visualizações
My DIaries
Mehak Raza
•
29 visualizações
ch4.ppt
ssuser9f517f1
•
1 visão
4.Threads
Senthil Kanth
•
1.5K visualizações
ch4.pptx
ZoYaKazmi3
•
2 visualizações
ch4.pptx
MdMushfiqurRashidMar
•
4 visualizações
Threads & Concurrency
NomanMHasan
•
133 visualizações
Operating Systems - "Chapter 4: Multithreaded Programming"
Ra'Fat Al-Msie'deen
•
3K visualizações
ch5.ppt
SanjidIhsan
•
3 visualizações
Ch5: Threads (Operating System)
Ahmar Hashmi
•
5.3K visualizações
Ch5 threads galvin
Shubham Singh
•
147 visualizações
os
JustinMathew73
•
2 visualizações
CH04.pdf
ImranKhan880955
•
5 visualizações
Galvin-operating System(Ch5)
dsuyal1
•
468 visualizações
Operation system structure
brysan30
•
1.2K visualizações
Ch2
ChhayaShelake
•
23 visualizações
Operating System basics Introduction
Poornima E.G.
•
2 visualizações
ch22.ppt
Wanderer20
•
3 visualizações
Galvin-operating System(Free bsd)
dsuyal1
•
419 visualizações
Ch1 introduction-to-os
Ankit Dubey
•
8 visualizações
Mais de Ankit Dubey
Unit 1 android and it's tools quiz {mad cwipedia}
Ankit Dubey
172 visualizações
•
7 slides
Scheduling
Ankit Dubey
41 visualizações
•
6 slides
Chapter 4
Ankit Dubey
62 visualizações
•
12 slides
Chapter 3
Ankit Dubey
62 visualizações
•
12 slides
Chapter 2
Ankit Dubey
60 visualizações
•
22 slides
Chapter 1
Ankit Dubey
72 visualizações
•
20 slides
Mais de Ankit Dubey
(20)
Unit 1 android and it's tools quiz {mad cwipedia}
Ankit Dubey
•
172 visualizações
Scheduling
Ankit Dubey
•
41 visualizações
Chapter 4
Ankit Dubey
•
62 visualizações
Chapter 3
Ankit Dubey
•
62 visualizações
Chapter 2
Ankit Dubey
•
60 visualizações
Chapter 1
Ankit Dubey
•
72 visualizações
Chapter 5
Ankit Dubey
•
43 visualizações
Ch5 cpu-scheduling
Ankit Dubey
•
48 visualizações
Ch3 processes
Ankit Dubey
•
31 visualizações
Ch2 system structure
Ankit Dubey
•
11 visualizações
Android i
Ankit Dubey
•
23 visualizações
Mongodb mock test_ii
Ankit Dubey
•
465 visualizações
Android mock test_iii
Ankit Dubey
•
23 visualizações
Android mock test_ii
Ankit Dubey
•
17 visualizações
Ajp notes-chapter-06
Ankit Dubey
•
48 visualizações
Ajp notes-chapter-05
Ankit Dubey
•
37 visualizações
Ajp notes-chapter-04
Ankit Dubey
•
54 visualizações
Ajp notes-chapter-03
Ankit Dubey
•
26 visualizações
Ajp notes-chapter-02
Ankit Dubey
•
18 visualizações
Ajp notes-chapter-01
Ankit Dubey
•
45 visualizações
Último
Airbus A319 Aircraft Airport & Maintenance Planning Manual.pdf
TahirSadikovi
9 visualizações
•
350 slides
Collection and transport of Solid Waste-SWM.pptx
vinodnejkar1
11 visualizações
•
13 slides
Cessna Model 406 Pilot Operating Handbook.pdf
TahirSadikovi
8 visualizações
•
692 slides
Foamtec Profile
SusanHninn
51 visualizações
•
11 slides
Airbus A330 Flight Crew Operating Manual PDF.pdf
TahirSadikovi
17 visualizações
•
3598 slides
Aichi Navy Type 99 Carrier Dive-Bomber Guide.pdf
TahirSadikovi
6 visualizações
•
31 slides
Último
(20)
Airbus A319 Aircraft Airport & Maintenance Planning Manual.pdf
TahirSadikovi
•
9 visualizações
Collection and transport of Solid Waste-SWM.pptx
vinodnejkar1
•
11 visualizações
Cessna Model 406 Pilot Operating Handbook.pdf
TahirSadikovi
•
8 visualizações
Foamtec Profile
SusanHninn
•
51 visualizações
Airbus A330 Flight Crew Operating Manual PDF.pdf
TahirSadikovi
•
17 visualizações
Aichi Navy Type 99 Carrier Dive-Bomber Guide.pdf
TahirSadikovi
•
6 visualizações
GDSC PU Cloud Study Jam Intro. Session 23-24.pdf
POORNIMA UNIVERSITY
•
56 visualizações
Vintage Computing Festival Midwest 18 2023-09-09 What's In A Terminal.pdf
Richard Thomson
•
10 visualizações
DELINEATION OF LANDSLIDE AREA USING SAR INTERFEROMETRY AND D-INSAR :A CASE ST...
SUJAN GHIMIRE
•
6 visualizações
HYDRAULICS - Gillesania.pdf
PrinceQuimno
•
43 visualizações
Airbus A320 Aircraft Airport & Maintenance Planning Manual.pdf
TahirSadikovi
•
62 visualizações
CODING AND MARK-WPS Office.pptx
sri jayaram institute of engineering and technology
•
6 visualizações
Dynamics (Hibbeler) (1).pdf
VEGACHRISTINEF
•
21 visualizações
Airbus A300 Flight Crew Operating Manual.pdf
TahirSadikovi
•
8 visualizações
Grumman TBF-1/TBM-1 Avenger I Pilot's Handbook.pdf
TahirSadikovi
•
6 visualizações
DCES_Classroom_Building_100_CDs.pdf
RoshelleStahl1
•
26 visualizações
Airbus A321 Aircraft Airport & Maintenance Planning Manual PDF.pdf
TahirSadikovi
•
10 visualizações
2023 - Google Cloud Study Jam for GDSC - Session 2 - Getting Started with Goo...
HarshDambhare1
•
57 visualizações
INDIAN KNOWLEDGE SYSTEM PPT chp-1.pptx
RuchiSharma494176
•
9 visualizações
Applications
SusanHninn
•
34 visualizações
Ch4 threads
1.
Silberschatz, Galvin and
Gagne ©2009 Operating System Concepts – 8th Edition, Chapter 4: Threads
2.
4.2 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Thread Thread Is a light weight process (LWP), is a basic unit of CPU utilization It comprises thread ID ,program counter,register set It shares code section and data section belonging to same program
3.
4.3 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Single and Multithreaded Processes
4.
4.4 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Benefits Responsiveness Resource Sharing Economy Utilization of MP architecture /Scalability
5.
4.5 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Concurrent Execution on a Single-core System
6.
4.6 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Parallel Execution on a Multicore System
7.
4.7 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition User Threads Thread management done by user-level threads library Three primary thread libraries: POSIX Pthreads Win32 threads Java threads
8.
4.8 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Kernel Threads Supported by the Kernel Examples Windows XP/2000 Solaris Linux Tru64 UNIX Mac OS X
9.
4.9 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Multithreading Models Many-to-One One-to-One Many-to-Many
10.
4.10 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Many-to-One Many user-level threads mapped to single kernel thread Examples: Solaris Green Threads GNU Portable Threads
11.
4.11 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Many-to-One Model
12.
4.12 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition One-to-One Each user-level thread maps to kernel thread Examples Windows NT/XP/2000 Linux Solaris 9 and later
13.
4.13 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition One-to-one Model
14.
4.14 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition 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,HP-UX,and Tru 64 UNIX
15.
4.15 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Many-to-Many Model
16.
4.16 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Thread Libraries Thread library provides programmer with API for creating and managing threads Two primary ways of implementing Library entirely in user space Kernel-level library supported by the OS
17.
4.17 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Pthreads May be provided either as user-level or kernel-level 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 (Solaris, Linux, Mac OS X)
18.
4.18 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Java Threads Java threads are managed by the JVM Typically implemented using the threads model provided by underlying OS Java threads may be created by: Extending Thread class Implementing the Runnable interface
19.
4.19 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Threading Issues Semantics of fork() and exec() system calls Thread cancellation of target thread Asynchronous or deferred Signal handling Thread pools Thread-specific data Scheduler activations
20.
4.20 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Semantics of fork() and exec() Does fork() duplicate only the calling thread or all threads?
21.
4.21 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Thread Cancellation Terminating a thread before it has finished Two general approaches: Asynchronous cancellation terminates the target thread immediately Deferred cancellation allows the target thread to periodically check if it should be cancelled
22.
4.22 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Signal Handling Signals are used in UNIX systems to notify a process that a particular event has occurred A signal handler is used to process signals 1. Signal is generated by particular event 2. Signal is delivered to a process 3. Signal is handled Options: Deliver the signal to the thread to which the signal applies Deliver the signal to every thread in the process Deliver the signal to certain threads in the process Assign a specific threa to receive all signals for the process
23.
4.23 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Thread Pools Create a number of threads in a pool where they await work Advantages: Usually slightly faster to service a request with an existing thread than create a new thread Allows the number of threads in the application(s) to be bound to the size of the pool
24.
4.24 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Thread Specific Data Allows each thread to have its own copy of data Useful when you do not have control over the thread creation process (i.e., when using a thread pool)
25.
4.25 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Scheduler Activations Both M:M and Two-level models require communication to maintain the appropriate number of kernel threads allocated to the application Scheduler activations provide upcalls - a communication mechanism from the kernel to the thread library This communication allows an application to maintain the correct number kernel threads
26.
4.26 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Operating System Examples Windows XP Threads Linux Thread
27.
4.27 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Windows XP Threads
28.
4.28 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Linux Threads
29.
4.29 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition Windows XP Threads Implements the one-to-one mapping, kernel-level Each thread contains A thread id Register set Separate user and kernel stacks Private data storage area The register set, stacks, and private storage area are known as the context of the threads The primary data structures of a thread include: ETHREAD (executive thread block) KTHREAD (kernel thread block) TEB (thread environment block)
30.
4.30 Silberschatz, Galvin
and Gagne ©2009 Operating System Concepts – 8th Edition 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)
31.
Silberschatz, Galvin and
Gagne ©2009 Operating System Concepts – 8th Edition, End of Chapter 4