SlideShare a Scribd company logo
THREAD
ISSUES
S.AZHAGARAMMAL(Info
Tech)
NADAR SARASWATHI
COLLEGE OF ARTS AND
SCIENCE,THENI.
THREADS COME FROM:
A few choices:
 The operating system
 A user-mode library
 Some combination of the two…
KERNEL THREADS:
 Threads implemented inside the OS
 Thread operations (creation, deletion, yield)
are system calls
 Scheduling handled by the OS scheduler
 Described as “one-to-one”
 One user thread mapped to one
kernel thread
 Every invocation of Thread.start()
creates a kernel thread
process
OS threads
USER THREADS:
 Implemented as a library inside a process
 All operations (creation, destruction, yield)
are normal procedure calls
 Described as “many-to-one”
 Many user-perceived threads map to a single
OS process/thread
process
OS thread
code
(text segment)
static data
(data segment)
heap
(dynamic allocated mem)
thread 1 stack
PC (T2)
SP (T2)
thread 2 stack
thread 3 stack
SP (T1)
SP (T3)
PC (T1)
PC (T3)
THREADED ADDRESS SPACE:
 Every thread always has
its own user stack and
program counter
 For both user, kernel
threads
 For user threads, there
is only a single kernel
stack, program counter,
PCB, etc.
User address space (for both user
and kernel threads)
USER THREADS VS. KERNEL THREADS
User threads are faster
 Operations do not pass through the OS
But, user threads suffer from:
 Lack of physical parallelism
Only run on a single processor!
 Poor performance with I/O
A single blocking operation stalls the entire
application
For these reasons, most (all?) major OS’s
provide some form of kernel threads
PROBLEMS WITH MANY-TO-MANY
THREADS:
Lack of coordination between user and
kernel schedulers
 “Left hand not talking to the right”
Specific problems
 Poor performance
e.g., the OS preempts a thread holding a crucial lock
 Deadlock
Given K kernel threads, at most K user threads can
block
Other runnable threads are starved out!
THREAD-SAFE BLOCKING LOCKS:
Atomically test-and-set locked status
If lock is already held:
 Set thread state to blocked
 Disable interrupts
 Add PCB (task_struct) to a wait queue
 Invoke the scheduler
 Next task re-enables interrupts
Hema os
Hema os
Hema os
Hema os

More Related Content

What's hot

system calls, single user, multiuser os ...
system calls, single user, multiuser os                                      ...system calls, single user, multiuser os                                      ...
system calls, single user, multiuser os ...
myrajendra
 
Operating system v1 d1
Operating system v1 d1Operating system v1 d1
Operating system v1 d1
Himanshu Pant
 
System calls
System callsSystem calls
System calls
AfshanKhan51
 
Kernal
KernalKernal
Kernal
Ramasubbu .P
 
Chapter 1: Introduction to Unix / Linux Kernel
Chapter 1: Introduction to Unix / Linux KernelChapter 1: Introduction to Unix / Linux Kernel
Chapter 1: Introduction to Unix / Linux Kernel
Dr.Ashvini Chaudhari Bhongade
 
Studying a decade of Linux system calls
Studying a decade of Linux system callsStudying a decade of Linux system calls
Studying a decade of Linux system calls
corpaulbezemer
 
Unix kernal
Unix kernalUnix kernal
Inter Process Communication PPT
Inter Process Communication PPTInter Process Communication PPT
Inter Process Communication PPT
Sowmya Jyothi
 
services and system calls of operating system
services and system calls of operating system services and system calls of operating system
services and system calls of operating system
Saurabh Soni
 
Operating system
Operating systemOperating system
Operating system
HarshithaAllu
 
multi-threading
multi-threadingmulti-threading
multi-threading
Ezzat Gul
 
Ch2
Ch2Ch2
Unix.system.calls
Unix.system.callsUnix.system.calls
Unix.system.calls
GRajendra
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating System
subhsikha
 
LINUX Device Drivers
LINUX Device DriversLINUX Device Drivers
LINUX Device Drivers
Partha Bhattacharya
 
Architecture of Linux
 Architecture of Linux Architecture of Linux
Architecture of Linux
SHUBHA CHATURVEDI
 
Course 101: Lecture 2: Introduction to Operating Systems
Course 101: Lecture 2: Introduction to Operating Systems Course 101: Lecture 2: Introduction to Operating Systems
Course 101: Lecture 2: Introduction to Operating Systems
Ahmed El-Arabawy
 
operating system calls input and output by (rohit malav)
operating system calls input and output by (rohit malav)operating system calls input and output by (rohit malav)
operating system calls input and output by (rohit malav)
Rohit malav
 
System call
System callSystem call
System call
Sumant Diwakar
 
Linux advanced concepts - Part 1
Linux advanced concepts - Part 1Linux advanced concepts - Part 1
Linux advanced concepts - Part 1
NAILBITER
 

What's hot (20)

system calls, single user, multiuser os ...
system calls, single user, multiuser os                                      ...system calls, single user, multiuser os                                      ...
system calls, single user, multiuser os ...
 
Operating system v1 d1
Operating system v1 d1Operating system v1 d1
Operating system v1 d1
 
System calls
System callsSystem calls
System calls
 
Kernal
KernalKernal
Kernal
 
Chapter 1: Introduction to Unix / Linux Kernel
Chapter 1: Introduction to Unix / Linux KernelChapter 1: Introduction to Unix / Linux Kernel
Chapter 1: Introduction to Unix / Linux Kernel
 
Studying a decade of Linux system calls
Studying a decade of Linux system callsStudying a decade of Linux system calls
Studying a decade of Linux system calls
 
Unix kernal
Unix kernalUnix kernal
Unix kernal
 
Inter Process Communication PPT
Inter Process Communication PPTInter Process Communication PPT
Inter Process Communication PPT
 
services and system calls of operating system
services and system calls of operating system services and system calls of operating system
services and system calls of operating system
 
Operating system
Operating systemOperating system
Operating system
 
multi-threading
multi-threadingmulti-threading
multi-threading
 
Ch2
Ch2Ch2
Ch2
 
Unix.system.calls
Unix.system.callsUnix.system.calls
Unix.system.calls
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating System
 
LINUX Device Drivers
LINUX Device DriversLINUX Device Drivers
LINUX Device Drivers
 
Architecture of Linux
 Architecture of Linux Architecture of Linux
Architecture of Linux
 
Course 101: Lecture 2: Introduction to Operating Systems
Course 101: Lecture 2: Introduction to Operating Systems Course 101: Lecture 2: Introduction to Operating Systems
Course 101: Lecture 2: Introduction to Operating Systems
 
operating system calls input and output by (rohit malav)
operating system calls input and output by (rohit malav)operating system calls input and output by (rohit malav)
operating system calls input and output by (rohit malav)
 
System call
System callSystem call
System call
 
Linux advanced concepts - Part 1
Linux advanced concepts - Part 1Linux advanced concepts - Part 1
Linux advanced concepts - Part 1
 

Similar to Hema os

Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2
mona_hakmy
 
Operating System 4
Operating System 4Operating System 4
Operating System 4
tech2click
 
Ch4 Threads
Ch4 ThreadsCh4 Threads
Ch4 Threads
mayacendana
 
Slot02 concurrency1
Slot02 concurrency1Slot02 concurrency1
Slot02 concurrency1
Viên Mai
 
Chapter 4 - Threads
Chapter 4 - ThreadsChapter 4 - Threads
Chapter 4 - Threads
Wayne Jones Jnr
 
Studies
StudiesStudies
App A
App AApp A
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
wangyuanyi
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probert
yang
 
Oct2009
Oct2009Oct2009
Oct2009
guest81ab2b4
 
01.osdoc
01.osdoc01.osdoc
01.osdoc
Pramod Redekar
 
Case Study 2: WINDOWS VISTA
Case Study 2: WINDOWS VISTACase Study 2: WINDOWS VISTA
Case Study 2: WINDOWS VISTA
Munazza-Mah-Jabeen
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentals
Bimal Jain
 
Os
OsOs
Process management
Process managementProcess management
Process management
Mohd Arif
 
Operating System 2
Operating System 2Operating System 2
Operating System 2
tech2click
 
Ch5 OS
Ch5 OSCh5 OS
Ch5 OS
C.U
 
Operating Systems Presentation
Operating Systems Presentation Operating Systems Presentation
Operating Systems Presentation
Mayank Thanki
 
CS9222 Advanced Operating System
CS9222 Advanced Operating SystemCS9222 Advanced Operating System
CS9222 Advanced Operating System
Kathirvel Ayyaswamy
 
Lecture01 introduction
Lecture01 introductionLecture01 introduction
Lecture01 introduction
Downloadssu Fullmaza
 

Similar to Hema os (20)

Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2
 
Operating System 4
Operating System 4Operating System 4
Operating System 4
 
Ch4 Threads
Ch4 ThreadsCh4 Threads
Ch4 Threads
 
Slot02 concurrency1
Slot02 concurrency1Slot02 concurrency1
Slot02 concurrency1
 
Chapter 4 - Threads
Chapter 4 - ThreadsChapter 4 - Threads
Chapter 4 - Threads
 
Studies
StudiesStudies
Studies
 
App A
App AApp A
App A
 
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
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probert
 
Oct2009
Oct2009Oct2009
Oct2009
 
01.osdoc
01.osdoc01.osdoc
01.osdoc
 
Case Study 2: WINDOWS VISTA
Case Study 2: WINDOWS VISTACase Study 2: WINDOWS VISTA
Case Study 2: WINDOWS VISTA
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentals
 
Os
OsOs
Os
 
Process management
Process managementProcess management
Process management
 
Operating System 2
Operating System 2Operating System 2
Operating System 2
 
Ch5 OS
Ch5 OSCh5 OS
Ch5 OS
 
Operating Systems Presentation
Operating Systems Presentation Operating Systems Presentation
Operating Systems Presentation
 
CS9222 Advanced Operating System
CS9222 Advanced Operating SystemCS9222 Advanced Operating System
CS9222 Advanced Operating System
 
Lecture01 introduction
Lecture01 introductionLecture01 introduction
Lecture01 introduction
 

More from SangeethaSasi1

L4 multiplexing & multiple access 16
L4 multiplexing & multiple access 16L4 multiplexing & multiple access 16
L4 multiplexing & multiple access 16
SangeethaSasi1
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab
SangeethaSasi1
 
Mc ppt
Mc pptMc ppt
Mc ppt
Mc pptMc ppt
Dip pppt
Dip ppptDip pppt
Dip pppt
SangeethaSasi1
 
Web techh
Web techhWeb techh
Web techh
SangeethaSasi1
 
Web tech
Web techWeb tech
Web tech
SangeethaSasi1
 
Vani wt
Vani wtVani wt
Vani dbms
Vani dbmsVani dbms
Vani dbms
SangeethaSasi1
 
Hema wt (1)
Hema wt (1)Hema wt (1)
Hema wt (1)
SangeethaSasi1
 
Hema rdbms
Hema rdbmsHema rdbms
Hema rdbms
SangeethaSasi1
 
Web tech
Web techWeb tech
Web tech
SangeethaSasi1
 
Web tech
Web techWeb tech
Web tech
SangeethaSasi1
 
Dbms
DbmsDbms
Vani
VaniVani
Hema se
Hema seHema se
Software
SoftwareSoftware
Software
SangeethaSasi1
 
Operating system
Operating systemOperating system
Operating system
SangeethaSasi1
 
Dataminng
DataminngDataminng
Dataminng
SangeethaSasi1
 
System calls
System callsSystem calls
System calls
SangeethaSasi1
 

More from SangeethaSasi1 (20)

L4 multiplexing & multiple access 16
L4 multiplexing & multiple access 16L4 multiplexing & multiple access 16
L4 multiplexing & multiple access 16
 
Image processing using matlab
Image processing using matlab Image processing using matlab
Image processing using matlab
 
Mc ppt
Mc pptMc ppt
Mc ppt
 
Mc ppt
Mc pptMc ppt
Mc ppt
 
Dip pppt
Dip ppptDip pppt
Dip pppt
 
Web techh
Web techhWeb techh
Web techh
 
Web tech
Web techWeb tech
Web tech
 
Vani wt
Vani wtVani wt
Vani wt
 
Vani dbms
Vani dbmsVani dbms
Vani dbms
 
Hema wt (1)
Hema wt (1)Hema wt (1)
Hema wt (1)
 
Hema rdbms
Hema rdbmsHema rdbms
Hema rdbms
 
Web tech
Web techWeb tech
Web tech
 
Web tech
Web techWeb tech
Web tech
 
Dbms
DbmsDbms
Dbms
 
Vani
VaniVani
Vani
 
Hema se
Hema seHema se
Hema se
 
Software
SoftwareSoftware
Software
 
Operating system
Operating systemOperating system
Operating system
 
Dataminng
DataminngDataminng
Dataminng
 
System calls
System callsSystem calls
System calls
 

Recently uploaded

Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Diana Rendina
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 

Recently uploaded (20)

Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 

Hema os

  • 2. THREADS COME FROM: A few choices:  The operating system  A user-mode library  Some combination of the two…
  • 3. KERNEL THREADS:  Threads implemented inside the OS  Thread operations (creation, deletion, yield) are system calls  Scheduling handled by the OS scheduler  Described as “one-to-one”  One user thread mapped to one kernel thread  Every invocation of Thread.start() creates a kernel thread process OS threads
  • 4. USER THREADS:  Implemented as a library inside a process  All operations (creation, destruction, yield) are normal procedure calls  Described as “many-to-one”  Many user-perceived threads map to a single OS process/thread process OS thread
  • 5. code (text segment) static data (data segment) heap (dynamic allocated mem) thread 1 stack PC (T2) SP (T2) thread 2 stack thread 3 stack SP (T1) SP (T3) PC (T1) PC (T3) THREADED ADDRESS SPACE:  Every thread always has its own user stack and program counter  For both user, kernel threads  For user threads, there is only a single kernel stack, program counter, PCB, etc. User address space (for both user and kernel threads)
  • 6. USER THREADS VS. KERNEL THREADS User threads are faster  Operations do not pass through the OS But, user threads suffer from:  Lack of physical parallelism Only run on a single processor!  Poor performance with I/O A single blocking operation stalls the entire application For these reasons, most (all?) major OS’s provide some form of kernel threads
  • 7. PROBLEMS WITH MANY-TO-MANY THREADS: Lack of coordination between user and kernel schedulers  “Left hand not talking to the right” Specific problems  Poor performance e.g., the OS preempts a thread holding a crucial lock  Deadlock Given K kernel threads, at most K user threads can block Other runnable threads are starved out!
  • 8. THREAD-SAFE BLOCKING LOCKS: Atomically test-and-set locked status If lock is already held:  Set thread state to blocked  Disable interrupts  Add PCB (task_struct) to a wait queue  Invoke the scheduler  Next task re-enables interrupts