PROCESS DESCRIPTION AND
CONTROL
Processes requirements
 The OS must interleave the execution of
multiple processes, to maximize processor
utilization while providing reasonable
response time.
 The OS must allocate resources to
processes in conformance with a specific
policy (e.g., certain functions or
applications are of higher priority) while at
the same time avoiding deadlock.
 The OS may be required to support
interprocess communication and user
creation of processes, both of which may
aid in the structuring of applications
WHAT IS A PROCESS?
 A program in execution
 An instance of a program running on a
computer
 The entity that can be assigned to and
executed on a processor
 A unit of activity characterized by the
execution of a sequence of instructions, a
current state, and an associated set of
system resources
Process Control
Process Control Block (PCB)
 Identifier: A unique identifier associated with this process, to
distinguish it from all other processes.
 State: If the process is currently executing, it is in the running state.
 Priority: Priority level relative to other processes.
 Program counter: The address of the next instruction in the
program to be executed.
 Memory pointers: Includes pointers to the program code and
data associated with this process, plus any memory blocks shared
with other processes.
 Context data: These are data that are present in registers in
the processor while the process is executing.
 I/O status information: Includes outstanding I/O requests, I/O
devices (e.g., tape drives) assigned to this process, a list of files in
use by the process, and so on.
 Accounting information: May include the amount of processor
time and clock time used, time limits, account numbers, and so
on.
PROCESS STATES
 A very simple
example. A small
dispatcher program
that switches the
processor from one
process to another.
A process to
continue execution
for a maximum of
six instruction
cycles
A Two-State Process Model
Reason for proses creation
A Five-State Model
Description
PROCESS DESCRIPTION
 The OS controls events within the computer system. It
schedules and dispatches processes for execution by the
processor, allocates resources to processes, and responds to
requests by user processes for basic services. Fundamentally,
we can think of the OS as that entity that manages the use of
system resources by processes.
PROCESS CONTROL
UNIX SVR4 PROCESS MANAGEMENT
 Process States
• UNIX employs two Running states to indicate whether the
process is executing in user mode or kernel mode.
• A distinction is made between the two states: (Ready to
Run, in Memory) and(Preempted).These are essentially the
same state, as indicated by the dotted line joining
them.The distinction is made to emphasize the way in
which the preempted state is entered.When a process is
running in kernel mode (as a result of a supervisor call,
clock interrupt,or I/O interrupt), there will come a time
when the kernel
Processes description and process control.
Processes description and process control.

Processes description and process control.

  • 1.
  • 2.
  • 3.
     The OSmust interleave the execution of multiple processes, to maximize processor utilization while providing reasonable response time.  The OS must allocate resources to processes in conformance with a specific policy (e.g., certain functions or applications are of higher priority) while at the same time avoiding deadlock.  The OS may be required to support interprocess communication and user creation of processes, both of which may aid in the structuring of applications
  • 4.
    WHAT IS APROCESS?
  • 5.
     A programin execution  An instance of a program running on a computer  The entity that can be assigned to and executed on a processor  A unit of activity characterized by the execution of a sequence of instructions, a current state, and an associated set of system resources
  • 6.
  • 7.
    Process Control Block(PCB)  Identifier: A unique identifier associated with this process, to distinguish it from all other processes.  State: If the process is currently executing, it is in the running state.  Priority: Priority level relative to other processes.  Program counter: The address of the next instruction in the program to be executed.  Memory pointers: Includes pointers to the program code and data associated with this process, plus any memory blocks shared with other processes.  Context data: These are data that are present in registers in the processor while the process is executing.  I/O status information: Includes outstanding I/O requests, I/O devices (e.g., tape drives) assigned to this process, a list of files in use by the process, and so on.  Accounting information: May include the amount of processor time and clock time used, time limits, account numbers, and so on.
  • 9.
    PROCESS STATES  Avery simple example. A small dispatcher program that switches the processor from one process to another. A process to continue execution for a maximum of six instruction cycles
  • 10.
  • 12.
  • 15.
  • 17.
  • 18.
  • 19.
     The OScontrols events within the computer system. It schedules and dispatches processes for execution by the processor, allocates resources to processes, and responds to requests by user processes for basic services. Fundamentally, we can think of the OS as that entity that manages the use of system resources by processes.
  • 21.
  • 22.
    UNIX SVR4 PROCESSMANAGEMENT  Process States • UNIX employs two Running states to indicate whether the process is executing in user mode or kernel mode. • A distinction is made between the two states: (Ready to Run, in Memory) and(Preempted).These are essentially the same state, as indicated by the dotted line joining them.The distinction is made to emphasize the way in which the preempted state is entered.When a process is running in kernel mode (as a result of a supervisor call, clock interrupt,or I/O interrupt), there will come a time when the kernel