SlideShare a Scribd company logo
1 of 19
PROCESSES
INTRODUCTION TO PROCESSES
• A program is a collection of
instructions that tell the computer what
to do to accomplish a specific task.
• A process is a running instance of a
program. It is an active entity since it is
a program that is being executed.
PROCESS STATE
• As a process executes, it changes state.
• The state of a process is defined in part
by the current activity of that process.
• Each process may be in one of the
following state:
• New – The process is being created.
• Running – Instructions are being
executed.
• Waiting – The process is waiting for
some event to occur.
• Ready – The process is waiting to be
assigned to a processor.
• Terminated – The process has finished
execution.
PROCESS CONTROL
• An important function of the operating
system is to manage all the processes
that exist within a computer system.
PROCESS CONTROL BLOCK
• A data structure called process control
block (PCB) contains the information
about a process.
• Every process has a PCB linked with it.
EXAMPLE OF A PCB
CONTEXT SWITCH
• Context switch is a process wherein the
operating system switches the CPU
from one process to another.
• Interrupts cause the operating system
to change a CPU from its current task
and to run a kernel routine.
• When an interrupt occurs, the system
needs to save the current context of
the process currently running on the
CPU so that it can restore that context
when its processing is done, essentially
suspending the process and then
resuming it.
• Switching the CPU to another process
requires performing a state save of the
current process and a state restore of a
different process.
REMEMBER:
• Context-switch time is pure overhead,
because the system does no useful
work while switching.
PROCESS MANAGEMENT
(PROCESSES AND THREADS)
• Process
• When a program start execution, we
call it process.
• When it is not executing, it is called a
program.
• One single program can have multiple
processes associated with it.
• Threads
• A thread is the unit of execution within
a process. A process can have
anywhere from just one thread to many
threads.
EXAMPLE
END OF SLIDE

More Related Content

Similar to Lecture-4.1-Operating-System.pptx

PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptxDivyaKS18
 
CSI-503 - 2. Processor Management
CSI-503 - 2. Processor ManagementCSI-503 - 2. Processor Management
CSI-503 - 2. Processor Managementghayour abbas
 
Operating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxOperating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxAmanuelmergia
 
Operating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxOperating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxAmanuelmergia
 
How Operating system works.
How Operating system works. How Operating system works.
How Operating system works. Fahad Farooq
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of ProcessShipra Swati
 
Lecture 2- Processes.pdf
Lecture 2- Processes.pdfLecture 2- Processes.pdf
Lecture 2- Processes.pdfAmanuelmergia
 
OPERATING__SYSTEM_PROCESS.pptx
OPERATING__SYSTEM_PROCESS.pptxOPERATING__SYSTEM_PROCESS.pptx
OPERATING__SYSTEM_PROCESS.pptxMarkWambette
 
What is an Operating Systems?
What is an Operating Systems?What is an Operating Systems?
What is an Operating Systems?JayaKamal
 
Processes and operating systems
Processes and operating systemsProcesses and operating systems
Processes and operating systemsRAMPRAKASHT1
 
Operating System
Operating SystemOperating System
Operating SystemGowriLatha1
 
Engg-0505-IT-Operating-Systems-2nd-year.pdf
Engg-0505-IT-Operating-Systems-2nd-year.pdfEngg-0505-IT-Operating-Systems-2nd-year.pdf
Engg-0505-IT-Operating-Systems-2nd-year.pdfnikhil287188
 
Operating Systems PPT 1 (1).pdf
Operating Systems PPT 1 (1).pdfOperating Systems PPT 1 (1).pdf
Operating Systems PPT 1 (1).pdfFahanaAbdulVahab
 
Operating system 28 fundamental of scheduling
Operating system 28 fundamental of schedulingOperating system 28 fundamental of scheduling
Operating system 28 fundamental of schedulingVaibhav Khanna
 

Similar to Lecture-4.1-Operating-System.pptx (20)

Lesson 7 Process Control Block
Lesson 7 Process Control BlockLesson 7 Process Control Block
Lesson 7 Process Control Block
 
Process of operating system
Process of operating systemProcess of operating system
Process of operating system
 
Lecture 2 process
Lecture 2   processLecture 2   process
Lecture 2 process
 
PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptx
 
CSI-503 - 2. Processor Management
CSI-503 - 2. Processor ManagementCSI-503 - 2. Processor Management
CSI-503 - 2. Processor Management
 
Operating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxOperating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptx
 
Operating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxOperating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptx
 
How Operating system works.
How Operating system works. How Operating system works.
How Operating system works.
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of Process
 
Lecture 2- Processes.pdf
Lecture 2- Processes.pdfLecture 2- Processes.pdf
Lecture 2- Processes.pdf
 
Processing management
Processing managementProcessing management
Processing management
 
OPERATING__SYSTEM_PROCESS.pptx
OPERATING__SYSTEM_PROCESS.pptxOPERATING__SYSTEM_PROCESS.pptx
OPERATING__SYSTEM_PROCESS.pptx
 
1_to_10.pdf
1_to_10.pdf1_to_10.pdf
1_to_10.pdf
 
What is an Operating Systems?
What is an Operating Systems?What is an Operating Systems?
What is an Operating Systems?
 
Processes and operating systems
Processes and operating systemsProcesses and operating systems
Processes and operating systems
 
Operating System
Operating SystemOperating System
Operating System
 
Process Management
Process ManagementProcess Management
Process Management
 
Engg-0505-IT-Operating-Systems-2nd-year.pdf
Engg-0505-IT-Operating-Systems-2nd-year.pdfEngg-0505-IT-Operating-Systems-2nd-year.pdf
Engg-0505-IT-Operating-Systems-2nd-year.pdf
 
Operating Systems PPT 1 (1).pdf
Operating Systems PPT 1 (1).pdfOperating Systems PPT 1 (1).pdf
Operating Systems PPT 1 (1).pdf
 
Operating system 28 fundamental of scheduling
Operating system 28 fundamental of schedulingOperating system 28 fundamental of scheduling
Operating system 28 fundamental of scheduling
 

More from AngelaClarito1

History of Operating System (1).pptx
History of Operating System (1).pptxHistory of Operating System (1).pptx
History of Operating System (1).pptxAngelaClarito1
 
Permutation and combination.pptx
Permutation and combination.pptxPermutation and combination.pptx
Permutation and combination.pptxAngelaClarito1
 
Function and Relation.pdf
Function and Relation.pdfFunction and Relation.pdf
Function and Relation.pdfAngelaClarito1
 
Introduction to Java.pptx
Introduction to Java.pptxIntroduction to Java.pptx
Introduction to Java.pptxAngelaClarito1
 
Lecture_1___Introduction_to_OOP.pdf.pdf
Lecture_1___Introduction_to_OOP.pdf.pdfLecture_1___Introduction_to_OOP.pdf.pdf
Lecture_1___Introduction_to_OOP.pdf.pdfAngelaClarito1
 

More from AngelaClarito1 (7)

History of Operating System (1).pptx
History of Operating System (1).pptxHistory of Operating System (1).pptx
History of Operating System (1).pptx
 
Permutation and combination.pptx
Permutation and combination.pptxPermutation and combination.pptx
Permutation and combination.pptx
 
Function and Relation.pdf
Function and Relation.pdfFunction and Relation.pdf
Function and Relation.pdf
 
Introduction to Java.pptx
Introduction to Java.pptxIntroduction to Java.pptx
Introduction to Java.pptx
 
Lecture_1___Introduction_to_OOP.pdf.pdf
Lecture_1___Introduction_to_OOP.pdf.pdfLecture_1___Introduction_to_OOP.pdf.pdf
Lecture_1___Introduction_to_OOP.pdf.pdf
 
JAVA.1st lesson.pptx
JAVA.1st lesson.pptxJAVA.1st lesson.pptx
JAVA.1st lesson.pptx
 
01 IT Vocabulary.pptx
01 IT Vocabulary.pptx01 IT Vocabulary.pptx
01 IT Vocabulary.pptx
 

Recently uploaded

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Recently uploaded (20)

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Lecture-4.1-Operating-System.pptx

  • 2. INTRODUCTION TO PROCESSES • A program is a collection of instructions that tell the computer what to do to accomplish a specific task. • A process is a running instance of a program. It is an active entity since it is a program that is being executed.
  • 3. PROCESS STATE • As a process executes, it changes state. • The state of a process is defined in part by the current activity of that process.
  • 4. • Each process may be in one of the following state: • New – The process is being created. • Running – Instructions are being executed. • Waiting – The process is waiting for some event to occur.
  • 5. • Ready – The process is waiting to be assigned to a processor. • Terminated – The process has finished execution.
  • 6.
  • 7. PROCESS CONTROL • An important function of the operating system is to manage all the processes that exist within a computer system.
  • 8. PROCESS CONTROL BLOCK • A data structure called process control block (PCB) contains the information about a process. • Every process has a PCB linked with it.
  • 10. CONTEXT SWITCH • Context switch is a process wherein the operating system switches the CPU from one process to another. • Interrupts cause the operating system to change a CPU from its current task and to run a kernel routine.
  • 11. • When an interrupt occurs, the system needs to save the current context of the process currently running on the CPU so that it can restore that context when its processing is done, essentially suspending the process and then resuming it.
  • 12. • Switching the CPU to another process requires performing a state save of the current process and a state restore of a different process.
  • 13. REMEMBER: • Context-switch time is pure overhead, because the system does no useful work while switching.
  • 14. PROCESS MANAGEMENT (PROCESSES AND THREADS) • Process • When a program start execution, we call it process. • When it is not executing, it is called a program. • One single program can have multiple processes associated with it.
  • 15. • Threads • A thread is the unit of execution within a process. A process can have anywhere from just one thread to many threads.
  • 16.
  • 18.

Editor's Notes

  1. When a process is executed, it can change from one state to another, and that state is defined by its current activity. It means that what is the process currently doing.
  2. Waiting – if it is waiting for some event to occur.
  3. When the process is created, it is admitted via the NEW state, then go to the ready state. So, what is in the ready state? It is waiting to be assigned in a processor. When it begins execution via a scheduler dispatch, it is now in the running state. After running in the running state, there are 3 cases that may happen: It is running and it finished its execution, it now in the terminated state. No interruption happen and no error executed. There can be an interrupt. Some process with high priority came, and this process was interrupted and goes back to the READY state When it is running, it needs to wait for an i/o or event wait. Unless that i/o is completed, it goes to the ready state again to be executed.
  4. Process number – refers to process ID, it is the unique number of a process. Every process needs to be represented by a unique ID that will identify that process. Process state – tells us the particular state to which a process is doing at a particular moment. Program counter – indicates the address of the next instruction that has to be executed for that particular process. ***When a program is in execution, it is now called process. CPU registers – refers to the register that is being used by a process. CPU Scheduling Information – this refers to the processes with high priority. Process with high priority may come first, then others will need to wait for it to be completed. Memory management information – represents the memory that is being used by the process. Accounting information – keeps an account of a certain things like the resources being used. Resources can be CPU, time, memory. I/O Status information – represents the input and output devices being used by the processs. These represents the particular aspect of a process.
  5. If an interrupt or a high priority process came, then the executing process must be stopped that is allowed to cause an interrupt. After this is completed, the process that stopped can proceed executing.
  6. Context switch is relevant because if ever there are interrupts, we will know when to stop and when to resume. EX: When you are reading a book, then suddenly you’re mother called asking you to do something. Since you’re reading and your mother’s task to you is more important than the one you’re reading, then you will place a bookmark to where you left off. So after doing that task, you can again proceed with reading that book. Keeping that bookmark is same as with saving the current context
  7. Whenever you want to make a program and you are using high level languages like C++, java, you need to have a compiler so the computer can read it. After that, you have your program converted to binary codes, and it is ready for execution. But it is not enough to execute this. What it have to do first is to be loaded into memory, and for the program to execute it needs resources of the computer system. So what is needed for this to happen? The operating system. Before, there is only one process per execution. But for today’s computer, multitasking can be done/multiple program can be executed.
  8. Within a process, there can be one or more threads. In early computer, one process only have one thread.
  9. Process explorer