SlideShare a Scribd company logo
1 of 12
Programs vs Process vs Threads
What is Program?
Program is the set of instructions that are arranged in the
defined sequence to perform a particular task. the program
generally resides in secondary memory (hard disk) and is
comparatively larger. the process is a passive entity.
What is Process?
The program under the execution is known as a process, each
process is managed inside the main memory (RAM) and control
and executed by using the microprocessor. each process has
some properties such as process state, process id, program
counter, stack pointers registers, accounting data, memory
limits, etc. all this process information contains by the process
control block.
What is Thread?
Thread is an execution unit that is part of a process. A process can
have multiple threads, all executing at the same time. It is a unit of
execution in concurrent programming. A thread is lightweight and
can be managed independently by a scheduler. It helps you to
improve the application performance using parallelism.
Multiple threads share information like data, code, files, etc. We can
implement threads in three different ways:
1.Kernel-level threads
2.User-level threads
3.Hybrid threads
Program
An executable file residing on disk
Process
One or more executing instances of a program. Processes have separate
address spaces.
Thread (or lightweight process)
one or more threads of control within a process. Threads share the same
address space.
Parameter Process Thread
Definition
Process means a program is in
execution.
Thread means a segment of a
process.
Lightweight The process is not Lightweight. Threads are Lightweight.
Termination time
The process takes more time to
terminate.
The thread takes less time to
terminate.
Creation time It takes more time for creation. It takes less time for creation.
Communication
Communication between
processes needs more time
compared to thread.
Communication between threads
requires less time compared to
processes.
Context switching time
It takes more time for context
switching.
It takes less time for context
switching.
Resource Process consume more resources. Thread consume fewer resources.
Treatment by OS
Different process are tread
separately by OS.
All the level peer threads are
treated as a single task by OS.
Memory The process is mostly isolated. Threads share memory.
Sharing It does not share data
Threads share data with each
other.
Program vs Process
some key differences between Program vs Process :
1. A program and process both are related terms from each other, the
lifespan of the program is longer than the process, it is considered as a
system activity in the batch operating system it is called sequential
executing instruction/jobs while in the real-time operating system it is
called program.
2. User can run multiple programs parallel in the operating system the
terms refer to programming operating system in which the operating
system manages its program-related activity such as memory
management, cache management, etc.
Program vs Process
3. A program is considered as a passive entity, in the operating system,
for example, a batch file or executable file contains an ordered set of
instruction/commands for performing any specific task, It is called passive
because it does not perform any action by itself, it needs to execute the
instruction one by one to get the specific task done.
4. For executing the program operating system allocates the memory to
it. the address space of the program composed the address for
instruction, data, and pointers. for eg. if P is the program the operating
system will allocate the memory to P (before execution) and will explore
the P’s address space then the operating system will schedule the
execution of the p program and allocates the resource.
Program Process
A program is a set of sequential ordered
operations to accomplish a programming goal.
Executing part of the program is known as a
process.
Program is generally static. Process is generally dynamic.
The program needs memory (primary/secondary)
for storage.
The Resource requirement is high for the
process.
There is no duplication needed in the case of the
program.
A new sub/child process requires
replication/duplication of their parent process.
A program is stored on disk (secondary memory)
or in it contains by some file for eg. batch script
and does not require any other resources.
Process captures resources like CPU,
memory(primary), address, disk, I/O, etc and
sometimes it produces deadlock situations.
A program needs memory space on the disk to
store all instructions.
A process occupies many resources like memory,
disk, mouse, keyboard, and other external
devices.
The nature of the program is passive, does not do
anything until it gets executed by allocating the
resource.
The process is an instance of the program
executed.
Program has no computation time and cost.
Process has considerable single fact access and
computation time.
Program can be optimized to reduce the execution
time and process.
Process is a singleton entity and the execution
depends on the processor.
Deadlock creation and prevention depend on the
program.
Deadlock condition process stucks and waits for the
resource consumed by the process which is waiting
for the resource holding by the previous process.
Program can control the memory resources and data
needs to be used by memory.
Process and its information can be controlled by
process control block (PCB).
Program cannot be decomposed or divided further
and there is no such threshing in the program.
The process can be further decomposed into the
thread which is a part or instance of the single
process.
Program can contain the instruction to use cache for
its data.
Process can use cache to store and retrieve the data
as it uses operating system paging scheme and cache
replacement policy such as FCFS, LIFO, LRU, RR.
THANK YOU
Like the Video and Subscribe the Channel

More Related Content

What's hot

File organization 1
File organization 1File organization 1
File organization 1Rupali Rana
 
Cloud File System with GFS and HDFS
Cloud File System with GFS and HDFS  Cloud File System with GFS and HDFS
Cloud File System with GFS and HDFS Dr Neelesh Jain
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMSkoolkampus
 
File organization and indexing
File organization and indexingFile organization and indexing
File organization and indexingraveena sharma
 
Locks In Disributed Systems
Locks In Disributed SystemsLocks In Disributed Systems
Locks In Disributed Systemsmridul mishra
 
Database user and administrator.pptx
Database user and administrator.pptxDatabase user and administrator.pptx
Database user and administrator.pptxAnusha sivakumar
 
Distributed database management system
Distributed database management  systemDistributed database management  system
Distributed database management systemPooja Dixit
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System ImplementationWayne Jones Jnr
 
Decomposition technique In Software Engineering
Decomposition technique In Software Engineering Decomposition technique In Software Engineering
Decomposition technique In Software Engineering Bilal Hassan
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMSkoolkampus
 
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
OPERATING SYSTEMSDESIGN AND IMPLEMENTATIONOPERATING SYSTEMSDESIGN AND IMPLEMENTATION
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION sathish sak
 
17. Recovery System in DBMS
17. Recovery System in DBMS17. Recovery System in DBMS
17. Recovery System in DBMSkoolkampus
 
recursive transition_networks
recursive transition_networksrecursive transition_networks
recursive transition_networksRajendran
 

What's hot (20)

File organization 1
File organization 1File organization 1
File organization 1
 
Dbms architecture
Dbms architectureDbms architecture
Dbms architecture
 
Cloud File System with GFS and HDFS
Cloud File System with GFS and HDFS  Cloud File System with GFS and HDFS
Cloud File System with GFS and HDFS
 
DBMS Keys
DBMS KeysDBMS Keys
DBMS Keys
 
File system structure
File system structureFile system structure
File system structure
 
Deadlock
DeadlockDeadlock
Deadlock
 
13. Query Processing in DBMS
13. Query Processing in DBMS13. Query Processing in DBMS
13. Query Processing in DBMS
 
File organization and indexing
File organization and indexingFile organization and indexing
File organization and indexing
 
Locks In Disributed Systems
Locks In Disributed SystemsLocks In Disributed Systems
Locks In Disributed Systems
 
Software Engineering by Pankaj Jalote
Software Engineering by Pankaj JaloteSoftware Engineering by Pankaj Jalote
Software Engineering by Pankaj Jalote
 
Database user and administrator.pptx
Database user and administrator.pptxDatabase user and administrator.pptx
Database user and administrator.pptx
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Distributed database management system
Distributed database management  systemDistributed database management  system
Distributed database management system
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
 
Decomposition technique In Software Engineering
Decomposition technique In Software Engineering Decomposition technique In Software Engineering
Decomposition technique In Software Engineering
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMS
 
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
OPERATING SYSTEMSDESIGN AND IMPLEMENTATIONOPERATING SYSTEMSDESIGN AND IMPLEMENTATION
OPERATING SYSTEMS DESIGN AND IMPLEMENTATION
 
17. Recovery System in DBMS
17. Recovery System in DBMS17. Recovery System in DBMS
17. Recovery System in DBMS
 
File system vs DBMS
File system vs DBMSFile system vs DBMS
File system vs DBMS
 
recursive transition_networks
recursive transition_networksrecursive transition_networks
recursive transition_networks
 

Similar to Difference Program vs Process vs Thread

OPERATING SYSTEM BY DR .MUGABO MG MKAMA
OPERATING SYSTEM BY DR .MUGABO MG MKAMAOPERATING SYSTEM BY DR .MUGABO MG MKAMA
OPERATING SYSTEM BY DR .MUGABO MG MKAMAMugabo Mkama
 
introduction To Operating System
introduction To Operating Systemintroduction To Operating System
introduction To Operating SystemLuka M G
 
Chapter two process.pptx
Chapter two process.pptxChapter two process.pptx
Chapter two process.pptxMezigebuMelese1
 
operating system for computer engineering ch3.ppt
operating system for computer engineering ch3.pptoperating system for computer engineering ch3.ppt
operating system for computer engineering ch3.pptgezaegebre1
 
Process & Thread Management
Process & Thread  ManagementProcess & Thread  Management
Process & Thread ManagementVpmv
 
Operating system
Operating systemOperating system
Operating systemMark Muhama
 
Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating SystemSoumit Ghosh
 
Operating system (OS) itself is a process, what approaches are there.pdf
Operating system (OS) itself is a process, what approaches are there.pdfOperating system (OS) itself is a process, what approaches are there.pdf
Operating system (OS) itself is a process, what approaches are there.pdfJUSTSTYLISH3B2MOHALI
 
Unit 2 part 2(Process)
Unit 2 part 2(Process)Unit 2 part 2(Process)
Unit 2 part 2(Process)WajeehaBaig
 
Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)Gaurav Kakade
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its conceptsKaran Thakkar
 

Similar to Difference Program vs Process vs Thread (20)

Os
OsOs
Os
 
OPERATING SYSTEM BY DR .MUGABO MG MKAMA
OPERATING SYSTEM BY DR .MUGABO MG MKAMAOPERATING SYSTEM BY DR .MUGABO MG MKAMA
OPERATING SYSTEM BY DR .MUGABO MG MKAMA
 
introduction To Operating System
introduction To Operating Systemintroduction To Operating System
introduction To Operating System
 
Chapter two process.pptx
Chapter two process.pptxChapter two process.pptx
Chapter two process.pptx
 
Software concepts
Software concepts Software concepts
Software concepts
 
Ch1
Ch1Ch1
Ch1
 
operating system for computer engineering ch3.ppt
operating system for computer engineering ch3.pptoperating system for computer engineering ch3.ppt
operating system for computer engineering ch3.ppt
 
Process & Thread Management
Process & Thread  ManagementProcess & Thread  Management
Process & Thread Management
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Operating system
Operating systemOperating system
Operating system
 
Os unit 2
Os unit 2Os unit 2
Os unit 2
 
Operating system
Operating systemOperating system
Operating system
 
Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating System
 
Operating system (OS) itself is a process, what approaches are there.pdf
Operating system (OS) itself is a process, what approaches are there.pdfOperating system (OS) itself is a process, what approaches are there.pdf
Operating system (OS) itself is a process, what approaches are there.pdf
 
Unit 2 part 2(Process)
Unit 2 part 2(Process)Unit 2 part 2(Process)
Unit 2 part 2(Process)
 
virtual memory
virtual memoryvirtual memory
virtual memory
 
Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)
 
Os
OsOs
Os
 
Os
OsOs
Os
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its concepts
 

More from jeetendra mandal

Eventual consistency vs Strong consistency what is the difference
Eventual consistency vs Strong consistency what is the differenceEventual consistency vs Strong consistency what is the difference
Eventual consistency vs Strong consistency what is the differencejeetendra mandal
 
Batch Processing vs Stream Processing Difference
Batch Processing vs Stream Processing DifferenceBatch Processing vs Stream Processing Difference
Batch Processing vs Stream Processing Differencejeetendra mandal
 
Difference between Database vs Data Warehouse vs Data Lake
Difference between Database vs Data Warehouse vs Data LakeDifference between Database vs Data Warehouse vs Data Lake
Difference between Database vs Data Warehouse vs Data Lakejeetendra mandal
 
Difference between Client Polling vs Server Push vs Websocket vs Long Polling
Difference between Client Polling vs Server Push vs Websocket vs Long PollingDifference between Client Polling vs Server Push vs Websocket vs Long Polling
Difference between Client Polling vs Server Push vs Websocket vs Long Pollingjeetendra mandal
 
Difference between TLS 1.2 vs TLS 1.3 and tutorial of TLS2 and TLS2 version c...
Difference between TLS 1.2 vs TLS 1.3 and tutorial of TLS2 and TLS2 version c...Difference between TLS 1.2 vs TLS 1.3 and tutorial of TLS2 and TLS2 version c...
Difference between TLS 1.2 vs TLS 1.3 and tutorial of TLS2 and TLS2 version c...jeetendra mandal
 
Carrier Advice for a JAVA Developer How to Become a Java Programmer
Carrier Advice for a JAVA Developer How to Become a Java ProgrammerCarrier Advice for a JAVA Developer How to Become a Java Programmer
Carrier Advice for a JAVA Developer How to Become a Java Programmerjeetendra mandal
 
How to become a Software Tester Carrier Path for Software Quality Tester
How to become a Software Tester Carrier Path for Software Quality TesterHow to become a Software Tester Carrier Path for Software Quality Tester
How to become a Software Tester Carrier Path for Software Quality Testerjeetendra mandal
 
How to become a Software Engineer Carrier Path for Software Developer
How to become a Software Engineer Carrier Path for Software DeveloperHow to become a Software Engineer Carrier Path for Software Developer
How to become a Software Engineer Carrier Path for Software Developerjeetendra mandal
 
Microservice Architecture Software Architecture Microservice Design Pattern
Microservice Architecture Software Architecture Microservice Design PatternMicroservice Architecture Software Architecture Microservice Design Pattern
Microservice Architecture Software Architecture Microservice Design Patternjeetendra mandal
 
Event Driven Software Architecture Pattern
Event Driven Software Architecture PatternEvent Driven Software Architecture Pattern
Event Driven Software Architecture Patternjeetendra mandal
 
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...jeetendra mandal
 
Observability vs APM vs Monitoring Comparison
Observability vs APM vs  Monitoring ComparisonObservability vs APM vs  Monitoring Comparison
Observability vs APM vs Monitoring Comparisonjeetendra mandal
 
Disaster Recovery vs Data Backup what is the difference
Disaster Recovery vs Data Backup what is the differenceDisaster Recovery vs Data Backup what is the difference
Disaster Recovery vs Data Backup what is the differencejeetendra mandal
 
What is Spinnaker? Spinnaker tutorial
What is Spinnaker? Spinnaker tutorialWhat is Spinnaker? Spinnaker tutorial
What is Spinnaker? Spinnaker tutorialjeetendra mandal
 
Difference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs BitbucketDifference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs Bitbucketjeetendra mandal
 
Difference between Git and Github
Difference between Git and GithubDifference between Git and Github
Difference between Git and Githubjeetendra mandal
 

More from jeetendra mandal (20)

what is OSI model
what is OSI modelwhat is OSI model
what is OSI model
 
What is AWS Cloud Watch
What is AWS Cloud WatchWhat is AWS Cloud Watch
What is AWS Cloud Watch
 
What is AWS Fargate
What is AWS FargateWhat is AWS Fargate
What is AWS Fargate
 
Eventual consistency vs Strong consistency what is the difference
Eventual consistency vs Strong consistency what is the differenceEventual consistency vs Strong consistency what is the difference
Eventual consistency vs Strong consistency what is the difference
 
Batch Processing vs Stream Processing Difference
Batch Processing vs Stream Processing DifferenceBatch Processing vs Stream Processing Difference
Batch Processing vs Stream Processing Difference
 
Difference between Database vs Data Warehouse vs Data Lake
Difference between Database vs Data Warehouse vs Data LakeDifference between Database vs Data Warehouse vs Data Lake
Difference between Database vs Data Warehouse vs Data Lake
 
Difference between Client Polling vs Server Push vs Websocket vs Long Polling
Difference between Client Polling vs Server Push vs Websocket vs Long PollingDifference between Client Polling vs Server Push vs Websocket vs Long Polling
Difference between Client Polling vs Server Push vs Websocket vs Long Polling
 
Difference between TLS 1.2 vs TLS 1.3 and tutorial of TLS2 and TLS2 version c...
Difference between TLS 1.2 vs TLS 1.3 and tutorial of TLS2 and TLS2 version c...Difference between TLS 1.2 vs TLS 1.3 and tutorial of TLS2 and TLS2 version c...
Difference between TLS 1.2 vs TLS 1.3 and tutorial of TLS2 and TLS2 version c...
 
Carrier Advice for a JAVA Developer How to Become a Java Programmer
Carrier Advice for a JAVA Developer How to Become a Java ProgrammerCarrier Advice for a JAVA Developer How to Become a Java Programmer
Carrier Advice for a JAVA Developer How to Become a Java Programmer
 
How to become a Software Tester Carrier Path for Software Quality Tester
How to become a Software Tester Carrier Path for Software Quality TesterHow to become a Software Tester Carrier Path for Software Quality Tester
How to become a Software Tester Carrier Path for Software Quality Tester
 
How to become a Software Engineer Carrier Path for Software Developer
How to become a Software Engineer Carrier Path for Software DeveloperHow to become a Software Engineer Carrier Path for Software Developer
How to become a Software Engineer Carrier Path for Software Developer
 
Events vs Notifications
Events vs NotificationsEvents vs Notifications
Events vs Notifications
 
Microservice Architecture Software Architecture Microservice Design Pattern
Microservice Architecture Software Architecture Microservice Design PatternMicroservice Architecture Software Architecture Microservice Design Pattern
Microservice Architecture Software Architecture Microservice Design Pattern
 
Event Driven Software Architecture Pattern
Event Driven Software Architecture PatternEvent Driven Software Architecture Pattern
Event Driven Software Architecture Pattern
 
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
Top 5 Software Architecture Pattern Event Driven SOA Microservice Serverless ...
 
Observability vs APM vs Monitoring Comparison
Observability vs APM vs  Monitoring ComparisonObservability vs APM vs  Monitoring Comparison
Observability vs APM vs Monitoring Comparison
 
Disaster Recovery vs Data Backup what is the difference
Disaster Recovery vs Data Backup what is the differenceDisaster Recovery vs Data Backup what is the difference
Disaster Recovery vs Data Backup what is the difference
 
What is Spinnaker? Spinnaker tutorial
What is Spinnaker? Spinnaker tutorialWhat is Spinnaker? Spinnaker tutorial
What is Spinnaker? Spinnaker tutorial
 
Difference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs BitbucketDifference between Github vs Gitlab vs Bitbucket
Difference between Github vs Gitlab vs Bitbucket
 
Difference between Git and Github
Difference between Git and GithubDifference between Git and Github
Difference between Git and Github
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 

Recently uploaded (20)

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 

Difference Program vs Process vs Thread

  • 1. Programs vs Process vs Threads
  • 2. What is Program? Program is the set of instructions that are arranged in the defined sequence to perform a particular task. the program generally resides in secondary memory (hard disk) and is comparatively larger. the process is a passive entity.
  • 3. What is Process? The program under the execution is known as a process, each process is managed inside the main memory (RAM) and control and executed by using the microprocessor. each process has some properties such as process state, process id, program counter, stack pointers registers, accounting data, memory limits, etc. all this process information contains by the process control block.
  • 4. What is Thread? Thread is an execution unit that is part of a process. A process can have multiple threads, all executing at the same time. It is a unit of execution in concurrent programming. A thread is lightweight and can be managed independently by a scheduler. It helps you to improve the application performance using parallelism. Multiple threads share information like data, code, files, etc. We can implement threads in three different ways: 1.Kernel-level threads 2.User-level threads 3.Hybrid threads
  • 5.
  • 6. Program An executable file residing on disk Process One or more executing instances of a program. Processes have separate address spaces. Thread (or lightweight process) one or more threads of control within a process. Threads share the same address space.
  • 7. Parameter Process Thread Definition Process means a program is in execution. Thread means a segment of a process. Lightweight The process is not Lightweight. Threads are Lightweight. Termination time The process takes more time to terminate. The thread takes less time to terminate. Creation time It takes more time for creation. It takes less time for creation. Communication Communication between processes needs more time compared to thread. Communication between threads requires less time compared to processes. Context switching time It takes more time for context switching. It takes less time for context switching. Resource Process consume more resources. Thread consume fewer resources. Treatment by OS Different process are tread separately by OS. All the level peer threads are treated as a single task by OS. Memory The process is mostly isolated. Threads share memory. Sharing It does not share data Threads share data with each other.
  • 8. Program vs Process some key differences between Program vs Process : 1. A program and process both are related terms from each other, the lifespan of the program is longer than the process, it is considered as a system activity in the batch operating system it is called sequential executing instruction/jobs while in the real-time operating system it is called program. 2. User can run multiple programs parallel in the operating system the terms refer to programming operating system in which the operating system manages its program-related activity such as memory management, cache management, etc.
  • 9. Program vs Process 3. A program is considered as a passive entity, in the operating system, for example, a batch file or executable file contains an ordered set of instruction/commands for performing any specific task, It is called passive because it does not perform any action by itself, it needs to execute the instruction one by one to get the specific task done. 4. For executing the program operating system allocates the memory to it. the address space of the program composed the address for instruction, data, and pointers. for eg. if P is the program the operating system will allocate the memory to P (before execution) and will explore the P’s address space then the operating system will schedule the execution of the p program and allocates the resource.
  • 10. Program Process A program is a set of sequential ordered operations to accomplish a programming goal. Executing part of the program is known as a process. Program is generally static. Process is generally dynamic. The program needs memory (primary/secondary) for storage. The Resource requirement is high for the process. There is no duplication needed in the case of the program. A new sub/child process requires replication/duplication of their parent process. A program is stored on disk (secondary memory) or in it contains by some file for eg. batch script and does not require any other resources. Process captures resources like CPU, memory(primary), address, disk, I/O, etc and sometimes it produces deadlock situations. A program needs memory space on the disk to store all instructions. A process occupies many resources like memory, disk, mouse, keyboard, and other external devices. The nature of the program is passive, does not do anything until it gets executed by allocating the resource. The process is an instance of the program executed.
  • 11. Program has no computation time and cost. Process has considerable single fact access and computation time. Program can be optimized to reduce the execution time and process. Process is a singleton entity and the execution depends on the processor. Deadlock creation and prevention depend on the program. Deadlock condition process stucks and waits for the resource consumed by the process which is waiting for the resource holding by the previous process. Program can control the memory resources and data needs to be used by memory. Process and its information can be controlled by process control block (PCB). Program cannot be decomposed or divided further and there is no such threshing in the program. The process can be further decomposed into the thread which is a part or instance of the single process. Program can contain the instruction to use cache for its data. Process can use cache to store and retrieve the data as it uses operating system paging scheme and cache replacement policy such as FCFS, LIFO, LRU, RR.
  • 12. THANK YOU Like the Video and Subscribe the Channel