operating system
Process
By group 3:
-Fatahul Fahmi (23343005)
-Florensius Panca Gati (23343006)
management
Proscess management
a. Definition and Concept of Process
b. Process Life Cycle
c. Process Model and Process Block Control (PCB)
d. Process Scheduling Algorithm
e. Context Switching
PROCESS MANAGEMENT
DEFINITION AND
CONCEPT OF PROCESS
DEFINITION AND CONCEPT OF PROCESS
process is a program in execution. A process is more
than the program code, which is sometimes known as
the text section. It also includes the current activity, as
represented by the value of the program counter and
the contents of the processor’s registers.
DEFINITION AND CONCEPT OF PROCESS
A process generally also includes the
process stack, which contains temporary
data (such as function parameters, return
addresses, and local variables), and a data
section, which contains global variables. A
process may also include a heap, which is
memory that is dynamically allocated during
process run time. The structure of a process
in memory
PROCESS LIFE CYCLE
PROCESS LIFE CYCLE
The process life cycle is a series of stages or states that a
process goes through from the time it is created until it is
terminated in the operating system. Each process undergoes a
transition from one state to another during execution, and the
operating system manages these changes.
PROCESS LIFE CYCLE
Every process in the operating system goes through several stages known as the process
life cycle. These stages are:
• New: creates a new process and is ready to run.
• Ready: this process is ready to be executed by the CPU, but is still waiting for its turn.
• Running: the process is being executed by the CPU.
• Waiting: the process of waiting for certain resources or conditions in order to continue
execution, such as waiting for user input.
• Terminated: the process finishes executing and the used resources are returned to the
system.
This lifecycle ensures that processes are managed efficiently within the system,
preventing conflicts in CPU usage.
PROCESS LIFE CYCLE
PROCESS MODEL AND
PROCESS BLOCK
CONTROL (PCB)
A Process Control Block (PCB) is a data structure that stores
information about a process, including the process ID, state,
program counter, CPU registers, management memory, and
I/O status. The PCB allows the operating system to manage
processes and perform context switching for multitasking.
PROCESS MODEL AND PROCESS BLOCK
CONTROL (PCB)
Each process in the operating system is represented by a data
structure called the Process Control Block (PCB). The PCB stores all
important information related to the process, including:
• Process Status: status as in the process lifecycle.
• Program Counter: The counter indicates the location of the next
instruction to be executed by the process.
• CPU register: stores important data during the execution
process.
• CPU Scheduling Information: stores execution priority, process
execution turn, and scheduling parameters.
PROCESS MODEL AND PROCESS BLOCK
CONTROL (PCB)
• Memory Management Information: this may include
information such as base and limit register values, page
tables, or segment tables, depending on the memory
system used by the operating system.
• Accounting Information: this information includes CPU
usage counts and real-time, time limits, account numbers,
job or process numbers, and so on.
• I/O Status Information: this information includes the
amount of CPU usage and real-time, timeout, account
number, job or process number, and so on
PROCESS MODEL AND PROCESS BLOCK
CONTROL (PCB)
The PCB makes it easier for the
operating system to manage and
keep track of each process, especially
when the process has to stop
temporarily and resume later (this
process is called context switching).
The PCB is also an information
repository of existing processes
PROCESS MODEL AND PROCESS BLOCK
CONTROL (PCB)
PROCESS SCHEDULING
ALGORITHM
Process Scheduling Algorithm is a method used by the
operating system to determine the order in which processes
will be executed by the CPU, especially when there are many
processes ready to be executed (multitasking). The goal is to
optimize system performance, maximize CPU utilization,
minimize waiting time, and maintain fairness between
processes.
PROCESS SCHEDULING ALGORITHM
Here are some commonly used scheduling algorithms:
• First-Come, First-Served (FCFS): Processes that arrive first
will be executed first, in order of arrival.
• Shortest Job Next (SJN) / Shortest Job First (SJF): The
process with the shortest execution time is executed first.
• Priority Scheduling: Each process has a priority, and the
process with the highest priority is executed first.
PROCESS SCHEDULING ALGORITHM
CONTEXT SWITCHING
Context switching is the process of switching the CPU from one process
to another. Switching the CPU to another process requires saving the
state of the current process and restoring the state of a different
process. This task is known as context switching. When context
switching occurs, the operating system must do the following:
• Stores the status of the running process (e.g. CPU registers, program
counter) into the PCB.
• Load the state of the process to be executed from the PCB into the
CPU.
• Upon completion, load the previously stopped process state from the
PCB to the CPU.
CONTEXT SWITCHING
Context switching is very important in multitasking systems because it
allows multiple processes to run concurrently on the CPU in turn. The
operating system periodically decides to switch execution to another
process so that all processes get a chance to run. When an event occurs
(e.g., a user presses a key or data arrives from the network), the
operating system will stop the running process to handle the event.
However, context switching has an overhead, as it takes time to save
and reload the process state, so it can affect performance if done too
often.
CONTEXT SWITCHING
Process management is one of the primary functions of an operating
system, responsible for efficiently managing the execution of various
processes. Each process in the operating system has a life cycle that
includes creation, execution, waiting, and termination, closely
monitored through structures like the Process Control Block (PCB). The
operating system regulates CPU resource usage by employing
scheduling algorithms that ensure each process gets a chance to run
according to its priority. Additionally, processes are kept from
interfering with one another using context switching, which allows the
CPU to smoothly transition from one process to another.
CONCLUcion

Operating System process management system.pptx

  • 1.
    operating system Process By group3: -Fatahul Fahmi (23343005) -Florensius Panca Gati (23343006) management
  • 2.
    Proscess management a. Definitionand Concept of Process b. Process Life Cycle c. Process Model and Process Block Control (PCB) d. Process Scheduling Algorithm e. Context Switching
  • 3.
  • 4.
  • 5.
    DEFINITION AND CONCEPTOF PROCESS process is a program in execution. A process is more than the program code, which is sometimes known as the text section. It also includes the current activity, as represented by the value of the program counter and the contents of the processor’s registers.
  • 6.
    DEFINITION AND CONCEPTOF PROCESS A process generally also includes the process stack, which contains temporary data (such as function parameters, return addresses, and local variables), and a data section, which contains global variables. A process may also include a heap, which is memory that is dynamically allocated during process run time. The structure of a process in memory
  • 7.
  • 8.
    PROCESS LIFE CYCLE Theprocess life cycle is a series of stages or states that a process goes through from the time it is created until it is terminated in the operating system. Each process undergoes a transition from one state to another during execution, and the operating system manages these changes.
  • 9.
    PROCESS LIFE CYCLE Everyprocess in the operating system goes through several stages known as the process life cycle. These stages are: • New: creates a new process and is ready to run. • Ready: this process is ready to be executed by the CPU, but is still waiting for its turn. • Running: the process is being executed by the CPU. • Waiting: the process of waiting for certain resources or conditions in order to continue execution, such as waiting for user input. • Terminated: the process finishes executing and the used resources are returned to the system. This lifecycle ensures that processes are managed efficiently within the system, preventing conflicts in CPU usage.
  • 10.
  • 11.
    PROCESS MODEL AND PROCESSBLOCK CONTROL (PCB)
  • 12.
    A Process ControlBlock (PCB) is a data structure that stores information about a process, including the process ID, state, program counter, CPU registers, management memory, and I/O status. The PCB allows the operating system to manage processes and perform context switching for multitasking. PROCESS MODEL AND PROCESS BLOCK CONTROL (PCB)
  • 13.
    Each process inthe operating system is represented by a data structure called the Process Control Block (PCB). The PCB stores all important information related to the process, including: • Process Status: status as in the process lifecycle. • Program Counter: The counter indicates the location of the next instruction to be executed by the process. • CPU register: stores important data during the execution process. • CPU Scheduling Information: stores execution priority, process execution turn, and scheduling parameters. PROCESS MODEL AND PROCESS BLOCK CONTROL (PCB)
  • 14.
    • Memory ManagementInformation: this may include information such as base and limit register values, page tables, or segment tables, depending on the memory system used by the operating system. • Accounting Information: this information includes CPU usage counts and real-time, time limits, account numbers, job or process numbers, and so on. • I/O Status Information: this information includes the amount of CPU usage and real-time, timeout, account number, job or process number, and so on PROCESS MODEL AND PROCESS BLOCK CONTROL (PCB)
  • 15.
    The PCB makesit easier for the operating system to manage and keep track of each process, especially when the process has to stop temporarily and resume later (this process is called context switching). The PCB is also an information repository of existing processes PROCESS MODEL AND PROCESS BLOCK CONTROL (PCB)
  • 16.
  • 17.
    Process Scheduling Algorithmis a method used by the operating system to determine the order in which processes will be executed by the CPU, especially when there are many processes ready to be executed (multitasking). The goal is to optimize system performance, maximize CPU utilization, minimize waiting time, and maintain fairness between processes. PROCESS SCHEDULING ALGORITHM
  • 18.
    Here are somecommonly used scheduling algorithms: • First-Come, First-Served (FCFS): Processes that arrive first will be executed first, in order of arrival. • Shortest Job Next (SJN) / Shortest Job First (SJF): The process with the shortest execution time is executed first. • Priority Scheduling: Each process has a priority, and the process with the highest priority is executed first. PROCESS SCHEDULING ALGORITHM
  • 19.
  • 20.
    Context switching isthe process of switching the CPU from one process to another. Switching the CPU to another process requires saving the state of the current process and restoring the state of a different process. This task is known as context switching. When context switching occurs, the operating system must do the following: • Stores the status of the running process (e.g. CPU registers, program counter) into the PCB. • Load the state of the process to be executed from the PCB into the CPU. • Upon completion, load the previously stopped process state from the PCB to the CPU. CONTEXT SWITCHING
  • 21.
    Context switching isvery important in multitasking systems because it allows multiple processes to run concurrently on the CPU in turn. The operating system periodically decides to switch execution to another process so that all processes get a chance to run. When an event occurs (e.g., a user presses a key or data arrives from the network), the operating system will stop the running process to handle the event. However, context switching has an overhead, as it takes time to save and reload the process state, so it can affect performance if done too often. CONTEXT SWITCHING
  • 22.
    Process management isone of the primary functions of an operating system, responsible for efficiently managing the execution of various processes. Each process in the operating system has a life cycle that includes creation, execution, waiting, and termination, closely monitored through structures like the Process Control Block (PCB). The operating system regulates CPU resource usage by employing scheduling algorithms that ensure each process gets a chance to run according to its priority. Additionally, processes are kept from interfering with one another using context switching, which allows the CPU to smoothly transition from one process to another. CONCLUcion