Process Management
Process Management
1
Introduction
In conventional (centralized) operating system, process
management deals with mechanisms and policies for
sharing the processor of the system among all processes.
In a distributed operating system, the main goal of process
management is to make the best possible use of the
processing resources of the entire system by sharing them
among all processes.
Three important concepts are used to achieve this
goal:
-Processor allocation
-Process migration
-Threads 2
Cont…
Process allocation deals with the process of
deciding which process should be assigned to which
processor.
4
Cont… : Flow of execution of a
migration process
Source node
Destination node
Time Process P1 in
execution
Execution
suspended
Transfer of
control
Freezing time
Execution
resumed
Process p1 in execution
5
Cont…
Preemptive process migration is costlier.
6
Desirable features of a good process
migration mechanism
Transparency
Minimal Interference
Minimal Residual Dependencies
Efficiency
Robustness
Communication between coprocesses of a job
7
Transparency
Level of transparency:
Object Access Level
System Call & Interprocess Communication level
8
Cont… : Object Access level Transparency
Minimum requirement for a system to support non-
preemptive process migration facility.
10
Minimal Interference
Migration of a process should cause minimal
interference of progress of the process involved.
11
Minimal Residual Dependencies
No residual dependency should be left on
previous node.
12
Efficiency
Minimum time required for migrating a process.
13
Robustness
The failure of a node other than the one on which a
process is currently running should not in any way
affect the accessibility or execution of that process.
14
Communication between coprocessors of a job
15
Process Migration Mechanisms
Four major activities
Freezing the process on its source node and
Issues:
Immediate and delayed blocking of the process
Fast and slow I/O operations
Information about open files
Reinstating the process on its Destination node
17
Cont… :Immediate and delayed
blocking of the process
If the process is not executing a system call, it can be
immediately blocked from further execution.
18
Cont… : Fast and Slow I/O Operations
Process is frozen after the completion of all fast I/O
operations like disk access.
19
Cont… : Information about open files
Includes name and identifier of the file, their access
modes and the current positions of their file pointers.
22
Cont…
Once all the state of the migrating process has been
transferred from the source to destination node and
copied into the empty state, new copy of the process
is unfrozen and old copy is deleted.
23
Address Space Transfer Mechanisms
The migration of a process involves the
transfer of
Process’s state
Process’s address space
24
Cont…
Process State consists of
Execution Status – Register Contents
Memory Tables
I/O State : I/O Queue, I/O buffers, Interrupts
Capability list
Process’s Identifier
Process’s user and group identifier
Information about Open Files
25
Cont…
Process address space
code,
data and
program stack
26
Cont…
Mechanisms for address space transfer:
Total freezing
Pretransferring
Transfer on reference
27
Cont… : Total Freezing
A process’s execution is stopped while its address
space is being transferred.
Disadvantage:
Process is suspended for long time during migration,
timeouts may occur, and if process is interactive, the
delay will be noticed by the user.
28
Cont…
Source Destination node
node
Time Migration
Execution decision made
suspended
Transfer of
Freezing time address space
Execution
resumed
29
Cont … : Pretransferring
Also known as precopying.
30
Cont …
The pretransfer operation is executed at a higher
priority than all other programs on the source node.
31
Cont…
Source Destination node
node
Time Migration
decision made
Execution Transfer of
suspended address space
Freezing time
Execution
resumed
32
Cont… : Transfer on Reference
The process address space is left behind on its
source node, and as the relocated process executes
on its destination node.
34
Cont…
Source Destination
node node
Time Execution Migration
suspended decision
made
Freezing
time Execution
resumed
On-demand
transfer of
address space
35
Message-forwarding Mechanisms
In moving a process, it must be ensured that all
pending, re-route, and future messages arrive at the
process’s new location.
Types of messages:
1. Messages received at the source node after the process’s execution
has been stopped on its source node and the process’s execution has
not yet been started on its destination node.
3. Messages that are to be sent to the migrant process from any other
node after it has started executing on the destination node.
36
Cont…
Mechanisms:
Mechanism of resending the message
Origin site mechanism
Link traversal mechanism
Link update mechanism
37
Cont… : Mechanisms of resending the
message
Messages of the types 1 and 2 are returned to the
sender as not deliverable or are simply dropped,
with the assurance that the sender of the message is
storing a copy of the data and is prepared to
retransmit it.
38
Cont…
Disadvantage:
The message forwarding mechanism of process
migration operation is nontransparent to the
processes interacting with the migrant process.
39
Cont… : Origin Site Mechanism
Each site is responsible for keeping information
about the current locations of all the processes
created on it.
41
Cont… : Link Traversal Mechanism
To redirect message type 1, a message queue for the
migrant process is created on its source node.
42
Cont…
Disadvantage:
Several link may have to be traversed to locate a process
from a node and if any node in chain of link fails, the
process cannot be located.
43
Cont… : Link Update Mechanisms
During the transfer phase of the migrant process,
the source node sends link-update messages to the
kernels controlling all of the migrant process’s
communication partners.
44
Mechanisms for Handling
Coprocesses
To provide efficient communication between a
process and its sub processes which might have
been migrated on different nodes.
Mechanisms :
Disallowing separation of coprocesses.
Home node or origin site concept.
45
Cont… : Disallowing Separation of
coprocesses
Easiest method of handling communication
between coprocesses is to disallow their separation.
Methods :
By disallowing the migration of processes that wait for
one or more of their children to complete.
By ensuring that when a parent process migrates, its
children process will be migrated along with it.
46
Cont…
Disadvantage:
It does not allow the use of parallelism within jobs.
47
Cont… : Home node or Origin Sites
Concept
Used for communication between a process and its
sub process when the two are running on different
nodes.
48
Cont…
Disadvantage:
All communication between a parent process and its
children processes take place via the home node.
49
Advantages of Process Migration
Reducing average response time of processes
To reduce the average response time of the processes,
processes of a heavily loaded node are migrated to idle or
underutilized nodes.
51
Cont…
Reducing network traffic
Migrating a process closer to the resources it is using
most heavily.