"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Task migration in os
1. TASK MIGRATION
Group Members
1 – Imran Khan BSIT-F14-LC-236
2 – Allah Rakha BSIT-F14-LC-241
3 -Sunny Arif BSIT-F14-LC-224
4 –Mirza Khurrum BSIT-F14-LC-249
2. Introduction
process/task migration as the transfer of partially executed tasks to another node in
a distributed system.
in other words, preemptive task transfer. Some references to task migration include
the transfer of processes before execution begins, but the most difficult issues are
those related to preemption.
Terminology:
Task placement: non-preemptive transfer of process that has never run
Task migration: preemptive transfer of process that has been executed
Home node: site where the process originates
Foreign process: process executing on a node other than its home node
Freezing: when a process is migrated, its execution is interrupted (frozen) for the
time it takes to move the process to another site.
3. Introduction
Migration is useful for several reasons:
load distribution, to equalize workload due to
1 transient periods of high load at some network nodes (transfer processes from
temporarily overloaded node to another node)
2 or in a system where process origination is always unbalanced (a few workstations
consistently generate many processes )
to return a workstation to its owner. (migrate a foreign process back to its home
node when owner returns)
to improve communication (processes that communicate frequently can be moved
to the same node; processes that access resources at a remote site may be moved to
that site)
4. Introduction
Two steps in task migration:
1 State transfer: collect all information crucial to process execution and transfer to
another machine
2 Unfreeze: after installing the process state at the new site, the process is put in the
Ready queue to be scheduled
5. Issues in Task Migration
State Transfer: Issues to consider here include
Cost in processor time, network bandwidth, etc.:
When a process is moved to another node, it is frozen until the transfer is
complete. There is the cost of a complete context switch, plus transfer, plus
possible affect on other processes that might be affected. (Processes that
interact with the migrating process may timeout during the interval when it is
frozen, and thus could be aborted)
Residual dependencies: These are resources that the original host node must
maintain on behalf of the migrated process. For example, a process may
transfer pages in virtual memory only as they are referenced; the original
host may have to forward messages directed to the process at its original
site.
6. Issues in Task Migration
Location Transparency:
Users aren't required to know where a task is executed; there
should be no affect on the process. Process names, file names,
etc., must be independent of the host machine. A uniform name
space is important to allow the process to maintain access to
system resources, to continue to be able to communicate with
other processes, etc.
7. Issues in Task Migration
Structure of the Migration Mechanism:
Singhal and Shivaratri emphasize the separation of policy from
mechanism. Policy decides when/where/why transfer to be
done (see discussion of policies earlier) while mechanism is the
act of collecting state, sending it elsewhere, etc. As always,
there are benefits to separating the two: for example, policies
can be changed without affecting mechanisms.
8. Issues in Task Migration
Performance:
This is the major drawback to any kind of
dynamic task migration facility.
9. Process Migration Mechanisms
Stallings identifies the following issues in designing a
process migration facility:
Who initiates the migration?
What part of the process is migrated?
What happens to messages and signals?
10. Process Migration Mechanisms
Migration Initiation
Migration can be initiated either by a module in
the operating system, or by the process itself.
OS module is the most common when load sharing
is the primary objective of the migration
If the goal is to move closer to resources or other
processes, then the migration could be initiated by
the process itself.
11. Process Migration Mechanisms
What is Migrated:
The process control block (PCB) is required, but is relatively
easy to transfer from one machine to another (especially if
the machines are heterogeneous)
Process address space is more difficult. The process will
have a number of virtual pages in memory, and the question
is whether to some or all, whether to precopy (move pages to
new host while execution continues on old host), etc
12. Process Migration Mechanisms
Some possibilities include:
Immediately move all of them (eager transfer)
Move all pages that are dirty, but transfer others
on demand only
Move no pages at all until they are referenced
Flush pages to disk, page back in when they are
referenced on the remote site
13. Process Migration Mechanisms
Messages and Signals:
Any messages or signals intended for a frozen
process are stored at the host until the process
transfer is complete
Other messages and signals must be routed from
the home site to the new host.