SlideShare a Scribd company logo
PROCESS AND THREADS
1
By
Aaqib
Hussain
2
Terms and Concepts
• A process is a heavyweight flow that can execute concurrently with
other processes.
• A thread is a lightweight flow that can execute concurrently with
other threads within the same process.
• An active object is an object that owns a process or thread andcan
initiate controlactivity.
• Processes and threads are rendered as stereotyped activeclasses.
• An active class is a class whose instances are activeobjects.
Flow of Control
• In a sequential system, there is a single flow of control. i.e, onething,
and one thing only, can take place at a time.
In a concurrent system, there is multiple simultaneous flow ofcontrol
i.e, more than one thing can take place at a time.
PROCESSES AND
THREADS
Classes and Events
• Active classes are just classes which represents an independent flow
of control
• Active classes share the same properties as all otherclasses.
• When an active object is created, the associated flow of control is
started; when the active object is destroyed, the associated flow of
control is terminated
• two standard stereotypes that apply to active classes are,
<<process>> – Specifies a heavyweight flow that can execute
concurrently with other processes. (heavyweight means, a thing
3
known to the OS itself and runs in an independent address
<<thread>> – Specifies a lightweight flow that can
space)
execute
concurrently with other threads within the same process (lightweight
means, known to the OS itself.)
• All the threads that live in the context of a process are peers of one
another.
PROCESSES AND
THREADS
Communication
• In a system with both active and passive objects, there are four
possible combinations ofinteraction.
• First, a message may be passed from one passive object to another.
• Second, a message may be passed from one active object to another.
• In inter-process communication there are two possible styles of
communication. First, one active object might synchronously call an
operation of another. Second, one active object might asynchronously
send a signal or call an operation of anotherobject.
• a synchronous message is rendered as a full arrow and an
asynchronous message is rendered as a halfarrow.
• Third, a message may be passed from an active object to a passive
object.
• Fourth, a message may be passed from a passive object to an active
one.
2
24
44
0
PROCESSES AND
THREADS
Synchronization
• Synchronization means arranging the flow of controls of objects so that
mutual exclusion will be guaranteed.
• Three approaches are there to handlesynchronization:
• Sequential – Callers must coordinate outside the object so that only one
flow is in the object at a time
• Guarded – multiple flow of control is sequentialized with the help of
object’s guarded operations. in effect it becomes sequential.
• Concurrent – multiple flow of control is guaranteed by treating each
operation as atomic
• synchronization are rendered in the operations of active classes with the
help of constraints
Fig: Synchronization
245
PROCESSES AND
THREADS
Common Modeling Techniques
1. Modeling Multiple Flows of Control
• Identify the opportunities for concurrent action and reify each flow as an active
class. Generalize common sets of active objects into an active class.
• Capture these static decisions in class diagrams, explicitly highlighting each active
class.
• Capture these static decisions in class diagrams, explicitly highlighting each active
class.
• Consider how each group of classes collaborates with one another dynamically.
Capture those decisions in interaction diagrams. Explicitly show active objects as the
root of such flows.
• Identify each related sequence by identifying it with the name of the active object.
Pay close attention to communication among active objects. Apply synchronous and
asynchronous messaging, asappropriate.
• Pay close attention to synchronization among these active objects and the passive
objects with which they collaborate. Apply sequential, guarded, or concurrent
operation semantics, as appropriate.
6
PROCESSES AND
THREADS
Modeling Flows of Control 7
PROCESSES AND
THREADS
2. Modeling Interprocess Communication
• Model the multiple flows of control.
• Consider which of these active objects represent processes andwhich
represent threads.
• Model messaging using asynchronous communication. modelremote
procedure calls using synchronouscommunication.
• Informally specify the underlying mechanism for communicationby
using notes, or more formally by usingcollaborations.
8
PROCESSES AND
THREADS
ModelingInterprocess
Communication
PROCESSES AND
THREADS
9
DIFFERENCE BETWEEN PROCESS AND THREAD:
1. Process means any program is
in execution
2. Process takes more time to
terminate
3. It takes more time for creation
4. It also takes more time for
context switching
5. Process is less efficient in term
of communication
6. Process consume more
resources.
7. Process is isolated.
Threads share memory
8. Process is called heavy weight
process
9. Process switching uses
interface in operating system
10. If one process is blocked then
it will not effect the execution
1. Thread means segment of a process
2. Thread takes less time to terminate
3. It takes less time for creation
4. It takes less time for context
switching
5. Thread is more efficient in term of
communication
6. Thread consume less resources.
7. A Thread is lightweight as each
thread in a process shares code,
data and resources.
8. Thread switching does not require
to call a operating system and
cause an interrupt to the kernel.
9. Second thread in the same task
could not run, while one server
thread is blocked.
THANK YOU

More Related Content

Similar to Process and threads

Process coordination
Process coordinationProcess coordination
Process coordination
Sweta Kumari Barnwal
 
Object oriented programming 6 oop with c++
Object oriented programming 6  oop with c++Object oriented programming 6  oop with c++
Object oriented programming 6 oop with c++
Vaibhav Khanna
 
Variables Arguments and control flow_UiPath.ppt
Variables Arguments and control flow_UiPath.pptVariables Arguments and control flow_UiPath.ppt
Variables Arguments and control flow_UiPath.ppt
Rohit Radhakrishnan
 
Real-Time Design Patterns
Real-Time Design PatternsReal-Time Design Patterns
Real-Time Design Patterns
GlobalLogic Ukraine
 
Synchronization
SynchronizationSynchronization
Synchronization
Sara shall
 
IPC
IPCIPC
IPC
IPCIPC
Distributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithmsDistributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithms
MNM Jain Engineering College
 
Lecture 5.pptx
Lecture 5.pptxLecture 5.pptx
Lecture 5.pptx
AshutoshTrivedi30
 
Process synchronization
Process synchronizationProcess synchronization
Process synchronization
lodhran-hayat
 
Consensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & AnalysisConsensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & Analysis
Zak Cole
 
1 Multithreading basics.pptx
1 Multithreading basics.pptx1 Multithreading basics.pptx
1 Multithreading basics.pptx
YojanaFegade
 
NaBIC 2013 presentation
NaBIC 2013 presentationNaBIC 2013 presentation
NaBIC 2013 presentation
Štefan Sabo
 
Sync, async and multithreading
Sync, async and multithreadingSync, async and multithreading
Sync, async and multithreading
Tuan Chau
 
Object Oriented Programming Tutorial.pptx
Object Oriented Programming Tutorial.pptxObject Oriented Programming Tutorial.pptx
Object Oriented Programming Tutorial.pptx
ethiouniverse
 
Unit three Advanced State Modelling
Unit three Advanced State ModellingUnit three Advanced State Modelling
Unit three Advanced State Modelling
Dr Chetan Shelke
 
ds7_con.ppt
ds7_con.pptds7_con.ppt
ds7_con.ppt
sachinmore76
 
Concurrency Programming in Java - 06 - Thread Synchronization, Liveness, Guar...
Concurrency Programming in Java - 06 - Thread Synchronization, Liveness, Guar...Concurrency Programming in Java - 06 - Thread Synchronization, Liveness, Guar...
Concurrency Programming in Java - 06 - Thread Synchronization, Liveness, Guar...
Sachintha Gunasena
 
Multi threading
Multi threadingMulti threading
Multi threading
gndu
 
Operating system 27 semaphores
Operating system 27 semaphoresOperating system 27 semaphores
Operating system 27 semaphores
Vaibhav Khanna
 

Similar to Process and threads (20)

Process coordination
Process coordinationProcess coordination
Process coordination
 
Object oriented programming 6 oop with c++
Object oriented programming 6  oop with c++Object oriented programming 6  oop with c++
Object oriented programming 6 oop with c++
 
Variables Arguments and control flow_UiPath.ppt
Variables Arguments and control flow_UiPath.pptVariables Arguments and control flow_UiPath.ppt
Variables Arguments and control flow_UiPath.ppt
 
Real-Time Design Patterns
Real-Time Design PatternsReal-Time Design Patterns
Real-Time Design Patterns
 
Synchronization
SynchronizationSynchronization
Synchronization
 
IPC
IPCIPC
IPC
 
IPC
IPCIPC
IPC
 
Distributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithmsDistributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithms
 
Lecture 5.pptx
Lecture 5.pptxLecture 5.pptx
Lecture 5.pptx
 
Process synchronization
Process synchronizationProcess synchronization
Process synchronization
 
Consensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & AnalysisConsensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & Analysis
 
1 Multithreading basics.pptx
1 Multithreading basics.pptx1 Multithreading basics.pptx
1 Multithreading basics.pptx
 
NaBIC 2013 presentation
NaBIC 2013 presentationNaBIC 2013 presentation
NaBIC 2013 presentation
 
Sync, async and multithreading
Sync, async and multithreadingSync, async and multithreading
Sync, async and multithreading
 
Object Oriented Programming Tutorial.pptx
Object Oriented Programming Tutorial.pptxObject Oriented Programming Tutorial.pptx
Object Oriented Programming Tutorial.pptx
 
Unit three Advanced State Modelling
Unit three Advanced State ModellingUnit three Advanced State Modelling
Unit three Advanced State Modelling
 
ds7_con.ppt
ds7_con.pptds7_con.ppt
ds7_con.ppt
 
Concurrency Programming in Java - 06 - Thread Synchronization, Liveness, Guar...
Concurrency Programming in Java - 06 - Thread Synchronization, Liveness, Guar...Concurrency Programming in Java - 06 - Thread Synchronization, Liveness, Guar...
Concurrency Programming in Java - 06 - Thread Synchronization, Liveness, Guar...
 
Multi threading
Multi threadingMulti threading
Multi threading
 
Operating system 27 semaphores
Operating system 27 semaphoresOperating system 27 semaphores
Operating system 27 semaphores
 

Recently uploaded

Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 

Recently uploaded (20)

Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 

Process and threads

  • 2. 2 Terms and Concepts • A process is a heavyweight flow that can execute concurrently with other processes. • A thread is a lightweight flow that can execute concurrently with other threads within the same process. • An active object is an object that owns a process or thread andcan initiate controlactivity. • Processes and threads are rendered as stereotyped activeclasses. • An active class is a class whose instances are activeobjects. Flow of Control • In a sequential system, there is a single flow of control. i.e, onething, and one thing only, can take place at a time. In a concurrent system, there is multiple simultaneous flow ofcontrol i.e, more than one thing can take place at a time. PROCESSES AND THREADS
  • 3. Classes and Events • Active classes are just classes which represents an independent flow of control • Active classes share the same properties as all otherclasses. • When an active object is created, the associated flow of control is started; when the active object is destroyed, the associated flow of control is terminated • two standard stereotypes that apply to active classes are, <<process>> – Specifies a heavyweight flow that can execute concurrently with other processes. (heavyweight means, a thing 3 known to the OS itself and runs in an independent address <<thread>> – Specifies a lightweight flow that can space) execute concurrently with other threads within the same process (lightweight means, known to the OS itself.) • All the threads that live in the context of a process are peers of one another. PROCESSES AND THREADS
  • 4. Communication • In a system with both active and passive objects, there are four possible combinations ofinteraction. • First, a message may be passed from one passive object to another. • Second, a message may be passed from one active object to another. • In inter-process communication there are two possible styles of communication. First, one active object might synchronously call an operation of another. Second, one active object might asynchronously send a signal or call an operation of anotherobject. • a synchronous message is rendered as a full arrow and an asynchronous message is rendered as a halfarrow. • Third, a message may be passed from an active object to a passive object. • Fourth, a message may be passed from a passive object to an active one. 2 24 44 0 PROCESSES AND THREADS
  • 5. Synchronization • Synchronization means arranging the flow of controls of objects so that mutual exclusion will be guaranteed. • Three approaches are there to handlesynchronization: • Sequential – Callers must coordinate outside the object so that only one flow is in the object at a time • Guarded – multiple flow of control is sequentialized with the help of object’s guarded operations. in effect it becomes sequential. • Concurrent – multiple flow of control is guaranteed by treating each operation as atomic • synchronization are rendered in the operations of active classes with the help of constraints Fig: Synchronization 245 PROCESSES AND THREADS
  • 6. Common Modeling Techniques 1. Modeling Multiple Flows of Control • Identify the opportunities for concurrent action and reify each flow as an active class. Generalize common sets of active objects into an active class. • Capture these static decisions in class diagrams, explicitly highlighting each active class. • Capture these static decisions in class diagrams, explicitly highlighting each active class. • Consider how each group of classes collaborates with one another dynamically. Capture those decisions in interaction diagrams. Explicitly show active objects as the root of such flows. • Identify each related sequence by identifying it with the name of the active object. Pay close attention to communication among active objects. Apply synchronous and asynchronous messaging, asappropriate. • Pay close attention to synchronization among these active objects and the passive objects with which they collaborate. Apply sequential, guarded, or concurrent operation semantics, as appropriate. 6 PROCESSES AND THREADS
  • 7. Modeling Flows of Control 7 PROCESSES AND THREADS
  • 8. 2. Modeling Interprocess Communication • Model the multiple flows of control. • Consider which of these active objects represent processes andwhich represent threads. • Model messaging using asynchronous communication. modelremote procedure calls using synchronouscommunication. • Informally specify the underlying mechanism for communicationby using notes, or more formally by usingcollaborations. 8 PROCESSES AND THREADS
  • 10. DIFFERENCE BETWEEN PROCESS AND THREAD: 1. Process means any program is in execution 2. Process takes more time to terminate 3. It takes more time for creation 4. It also takes more time for context switching 5. Process is less efficient in term of communication 6. Process consume more resources. 7. Process is isolated. Threads share memory 8. Process is called heavy weight process 9. Process switching uses interface in operating system 10. If one process is blocked then it will not effect the execution 1. Thread means segment of a process 2. Thread takes less time to terminate 3. It takes less time for creation 4. It takes less time for context switching 5. Thread is more efficient in term of communication 6. Thread consume less resources. 7. A Thread is lightweight as each thread in a process shares code, data and resources. 8. Thread switching does not require to call a operating system and cause an interrupt to the kernel. 9. Second thread in the same task could not run, while one server thread is blocked.