SlideShare a Scribd company logo
1 of 11
Nadar Saraswathi College Of Arts and
Science,Theni.
Thread Process Synchronization
Submitted by
A. Naga varthini
I.Msc(cs)
What is Thread?
A thread is a flow of execution through the process code, with its own
program counter that keeps track of which instruction to execute next, system
registers which hold its current working variables, and a stack which contain the
execution history.
A thread is also called a lightweight process. Thread provide a way to
improve application performance through parallelism. Thread represent a
software approach to improving performance of operating system by reducing
the overhead thread is equivalent to a classical process.
Each thread represents a separate flow of control. Thread have been successfully
used in implementing network servers and wed server. The following figure shows the
working of a single-threaded and a multithreaded process.
Register Counter Stack
Data Files
Code
Single
Thread
Register
Counter
Stack
Register
Counter
Stack
Register
Counter
Stack
Data Files
First Thread Second Thread Third Thread
Code
Advantages of Thread:
 Thread minimize the context switching time.
 Use of threads provides concurrency within a process.
 Efficient communication.
 It is more economical to create and context switch threads.
 Threads allow utilization of multiprocessor architectures to a greater
scale and efficienty.
Types of Thread:
Thread are implemented in following two ways:
User Level Thread- User managed threads.
Kernel Level Thread- Operating system managed threads acting
on kernel, an operating system core.
User Level Threads:
In this case, the thread management kernel is no aware of the existence
of threads. The thread library contains code for creating and destroying
threads, for passing, message and data between threads, for scheduling thrad
execution and for saving and restoring thread contexts.
Advantages:
 Thread switching does not require kernel mode privileges.
 User level thread can run on any operating system.
 Scheduling can be application specific in the user level thread.
 User level threads area fast to create and manage.
Disadvantage:
 In a typical operating system, most system calls are blocking.
 Multithreaded application cannot take advantage of multiprocessing.
Kernel Level Threads:
Kernel thread are supported directly by the operating system. Any
application can be programmed to be multithreaded. All of the thread within
an application are supported within a single process.
The kernel maintains context information for the process as a whole
and for individual threads within the process. Scheduling by the kernel is done
on a thread basis. The kernel performs thread creation, scheduling and
management in kernel space. Kernel threads are generally slower to create and
manage than the user threads.
Advantages:
 Kernel can simultaneously schedule multiple threads form the same
process on multiple processes.
 If one thread in a process is blocked, the kernel can schedule
another thread of the same process.
Thank you

More Related Content

Similar to dos slide share.pptx

Operating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptxOperating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptxPrudhvi668506
 
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 ..Nimrakhan89
 
Networking threads
Networking threadsNetworking threads
Networking threadsNilesh Pawar
 
Thread (Operating System)
Thread  (Operating System)Thread  (Operating System)
Thread (Operating System)kiran Patel
 
process and thread.pptx
process and thread.pptxprocess and thread.pptx
process and thread.pptxHamzaxTv
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)Prakhar Maurya
 
Operating system 20 threads
Operating system 20 threadsOperating system 20 threads
Operating system 20 threadsVaibhav Khanna
 
Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing chapter 3Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing chapter 3AbdullahMunir32
 

Similar to dos slide share.pptx (20)

Operating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptxOperating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptx
 
Lecture 3 threads
Lecture 3   threadsLecture 3   threads
Lecture 3 threads
 
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 ..
 
Topic 4- processes.pptx
Topic 4- processes.pptxTopic 4- processes.pptx
Topic 4- processes.pptx
 
Wiki 2
Wiki 2Wiki 2
Wiki 2
 
Threads .ppt
Threads .pptThreads .ppt
Threads .ppt
 
Sucet os module_2_notes
Sucet os module_2_notesSucet os module_2_notes
Sucet os module_2_notes
 
Networking threads
Networking threadsNetworking threads
Networking threads
 
Threads
ThreadsThreads
Threads
 
Chapter 3 chapter reading task
Chapter 3 chapter reading taskChapter 3 chapter reading task
Chapter 3 chapter reading task
 
Epc 3.ppt
Epc 3.pptEpc 3.ppt
Epc 3.ppt
 
Thread (Operating System)
Thread  (Operating System)Thread  (Operating System)
Thread (Operating System)
 
process and thread.pptx
process and thread.pptxprocess and thread.pptx
process and thread.pptx
 
4.Process.ppt
4.Process.ppt4.Process.ppt
4.Process.ppt
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
 
Assignment-01.pptx
Assignment-01.pptxAssignment-01.pptx
Assignment-01.pptx
 
thread os.pptx
thread os.pptxthread os.pptx
thread os.pptx
 
Operating system 20 threads
Operating system 20 threadsOperating system 20 threads
Operating system 20 threads
 
Chapter04 new
Chapter04 newChapter04 new
Chapter04 new
 
Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing chapter 3Parallel and Distributed Computing chapter 3
Parallel and Distributed Computing chapter 3
 

More from NagaVarthini

Dealing with imbalanced data sets.pdf
Dealing with imbalanced data sets.pdfDealing with imbalanced data sets.pdf
Dealing with imbalanced data sets.pdfNagaVarthini
 
Edge detection.pdf
Edge detection.pdfEdge detection.pdf
Edge detection.pdfNagaVarthini
 
Django Designing.pdf
Django Designing.pdfDjango Designing.pdf
Django Designing.pdfNagaVarthini
 
Cloud Software Enviornment
Cloud Software EnviornmentCloud Software Enviornment
Cloud Software EnviornmentNagaVarthini
 
Guidelines for indexing and tools
Guidelines for indexing and toolsGuidelines for indexing and tools
Guidelines for indexing and toolsNagaVarthini
 
Email established keys privacy
Email established keys privacyEmail established keys privacy
Email established keys privacyNagaVarthini
 
python slid share.pptx
python slid share.pptxpython slid share.pptx
python slid share.pptxNagaVarthini
 

More from NagaVarthini (7)

Dealing with imbalanced data sets.pdf
Dealing with imbalanced data sets.pdfDealing with imbalanced data sets.pdf
Dealing with imbalanced data sets.pdf
 
Edge detection.pdf
Edge detection.pdfEdge detection.pdf
Edge detection.pdf
 
Django Designing.pdf
Django Designing.pdfDjango Designing.pdf
Django Designing.pdf
 
Cloud Software Enviornment
Cloud Software EnviornmentCloud Software Enviornment
Cloud Software Enviornment
 
Guidelines for indexing and tools
Guidelines for indexing and toolsGuidelines for indexing and tools
Guidelines for indexing and tools
 
Email established keys privacy
Email established keys privacyEmail established keys privacy
Email established keys privacy
 
python slid share.pptx
python slid share.pptxpython slid share.pptx
python slid share.pptx
 

Recently uploaded

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 

Recently uploaded (20)

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 

dos slide share.pptx

  • 1. Nadar Saraswathi College Of Arts and Science,Theni. Thread Process Synchronization Submitted by A. Naga varthini I.Msc(cs)
  • 2. What is Thread? A thread is a flow of execution through the process code, with its own program counter that keeps track of which instruction to execute next, system registers which hold its current working variables, and a stack which contain the execution history. A thread is also called a lightweight process. Thread provide a way to improve application performance through parallelism. Thread represent a software approach to improving performance of operating system by reducing the overhead thread is equivalent to a classical process.
  • 3. Each thread represents a separate flow of control. Thread have been successfully used in implementing network servers and wed server. The following figure shows the working of a single-threaded and a multithreaded process. Register Counter Stack Data Files Code Single Thread
  • 5. Advantages of Thread:  Thread minimize the context switching time.  Use of threads provides concurrency within a process.  Efficient communication.  It is more economical to create and context switch threads.  Threads allow utilization of multiprocessor architectures to a greater scale and efficienty.
  • 6. Types of Thread: Thread are implemented in following two ways: User Level Thread- User managed threads. Kernel Level Thread- Operating system managed threads acting on kernel, an operating system core.
  • 7. User Level Threads: In this case, the thread management kernel is no aware of the existence of threads. The thread library contains code for creating and destroying threads, for passing, message and data between threads, for scheduling thrad execution and for saving and restoring thread contexts.
  • 8. Advantages:  Thread switching does not require kernel mode privileges.  User level thread can run on any operating system.  Scheduling can be application specific in the user level thread.  User level threads area fast to create and manage. Disadvantage:  In a typical operating system, most system calls are blocking.  Multithreaded application cannot take advantage of multiprocessing.
  • 9. Kernel Level Threads: Kernel thread are supported directly by the operating system. Any application can be programmed to be multithreaded. All of the thread within an application are supported within a single process. The kernel maintains context information for the process as a whole and for individual threads within the process. Scheduling by the kernel is done on a thread basis. The kernel performs thread creation, scheduling and management in kernel space. Kernel threads are generally slower to create and manage than the user threads.
  • 10. Advantages:  Kernel can simultaneously schedule multiple threads form the same process on multiple processes.  If one thread in a process is blocked, the kernel can schedule another thread of the same process.