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.
Lecture-4.1-Operating-System.pptx
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.
Lecture-4.1-Operating-System.pptx
EXAMPLE
Lecture-4.1-Operating-System.pptx
END OF SLIDE

More Related Content

PPTX
Operating System process management system.pptx
PDF
UNIT-2-Process-Management.pdf
PPTX
Process and thread Management Operating system
PPTX
Operating System Process Scheduling.pptx
PPT
PPTX
Program control board in Operating System
PDF
Unit 2 part 1(Process)
PPTX
OS-Unit-2-Part-1.pptx
Operating System process management system.pptx
UNIT-2-Process-Management.pdf
Process and thread Management Operating system
Operating System Process Scheduling.pptx
Program control board in Operating System
Unit 2 part 1(Process)
OS-Unit-2-Part-1.pptx

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

PPTX
Operating Systems Process Management.pptx
PPTX
OS_Unit II - Process Management_CATI.pptx
PPTX
OS (1).pptx
PPTX
Processes in Operating System
PPTX
Lecture 2 process
PPTX
CNT_Lecture 8.pptx operating system computer
PPTX
Operating system || Chapter 3: Process
PPTX
Process management os concept
PPT
4 process
PPT
The process states
PPTX
UNIT 2 OS.pptx Introduction of Operating System
PDF
OS - Process Concepts
PDF
Process Management in operating system. Pdf
PPTX
OPERATING SYSTEMS OVERVIEW111111111.pptx
PPTX
2Chapter Two- Process Management(2) (1).pptx
PPTX
Operating system - Process and its concepts
PPTX
UNIT I-Processes.pptx
PPTX
Basic concept of process
PPTX
operating system module 2 presentation notes
PDF
Processes description and process control.
Operating Systems Process Management.pptx
OS_Unit II - Process Management_CATI.pptx
OS (1).pptx
Processes in Operating System
Lecture 2 process
CNT_Lecture 8.pptx operating system computer
Operating system || Chapter 3: Process
Process management os concept
4 process
The process states
UNIT 2 OS.pptx Introduction of Operating System
OS - Process Concepts
Process Management in operating system. Pdf
OPERATING SYSTEMS OVERVIEW111111111.pptx
2Chapter Two- Process Management(2) (1).pptx
Operating system - Process and its concepts
UNIT I-Processes.pptx
Basic concept of process
operating system module 2 presentation notes
Processes description and process control.
Ad

More from AngelaClarito1 (7)

PPTX
History of Operating System (1).pptx
PPTX
Permutation and combination.pptx
PDF
Function and Relation.pdf
PPTX
Introduction to Java.pptx
PDF
Lecture_1___Introduction_to_OOP.pdf.pdf
PPTX
JAVA.1st lesson.pptx
PPTX
01 IT Vocabulary.pptx
History of Operating System (1).pptx
Permutation and combination.pptx
Function and Relation.pdf
Introduction to Java.pptx
Lecture_1___Introduction_to_OOP.pdf.pdf
JAVA.1st lesson.pptx
01 IT Vocabulary.pptx
Ad

Recently uploaded (20)

PPT
Geologic Time for studying geology for geologist
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
Build Your First AI Agent with UiPath.pptx
PDF
UiPath Agentic Automation session 1: RPA to Agents
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PPTX
Microsoft Excel 365/2024 Beginner's training
PPTX
2018-HIPAA-Renewal-Training for executives
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
STKI Israel Market Study 2025 version august
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
Geologic Time for studying geology for geologist
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Taming the Chaos: How to Turn Unstructured Data into Decisions
Getting started with AI Agents and Multi-Agent Systems
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Build Your First AI Agent with UiPath.pptx
UiPath Agentic Automation session 1: RPA to Agents
Module 1.ppt Iot fundamentals and Architecture
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Final SEM Unit 1 for mit wpu at pune .pptx
Benefits of Physical activity for teenagers.pptx
Convolutional neural network based encoder-decoder for efficient real-time ob...
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Microsoft Excel 365/2024 Beginner's training
2018-HIPAA-Renewal-Training for executives
A review of recent deep learning applications in wood surface defect identifi...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
STKI Israel Market Study 2025 version august
Improvisation in detection of pomegranate leaf disease using transfer learni...

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.
  • 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.

Editor's Notes

  • #4: 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.
  • #5: Waiting – if it is waiting for some event to occur.
  • #7: 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.
  • #10: 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.
  • #11: 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.
  • #12: 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
  • #15: 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.
  • #16: Within a process, there can be one or more threads. In early computer, one process only have one thread.
  • #18: Process explorer