Distributed UNIT 4
Distributed UNIT 4
Distributed UNIT 4
UNIT IV
******************
Introduction:
There are three techniques for scheduling processes of a
distributed system:
Task Assignment Approach, in which each process submitted
by a user for processing is viewed as a collection of related tasks and
these tasks are scheduled to suitable nodes so as to improve
performance.
Load-Balancing Approach, in which all the processes submitted
by the users are distributed among the nodes of the system so as to
equalize the workload among the nodes.
Load-Sharing Approach, which simply attempts to conserve the
ability of the system to perform work by assuring that no node is idle
while processes wait for being processed.
Execution Costs
Inter-task communication cost Nodes
T1 T2 T3 T4 T5 T6 N1 N2
T1 0 6 4 0 0 12 T1 5 5
T2 6 0 8 12 3 0 T2 2 ∞
T3 4 8 0 0 11 0 T3 4 4
T4 0 12 0 0 5 0 T4 6 3
T5 0 3 11 5 0 0 T5 5 2
T6 12 0 0 0 0 0 T6 ∞ 4
Optimal Assignment, where tasks t1, t2, t3, t4, t5 are assigned to
node n1 and task t6 is assigned to node n2.
Execution cost, x = x11 + x21 + x31 + x41 + x51 + x62
= 5 + 2 + 4 + 6 + 5 + 4 = 26
Communication cost, c = c16 + c26 + c36 + c46 + c56
= 12 + 0 + 0 + 0 + 0 = 12
Total cost = 38
Static: Ignore the current state of the system. E.g. if a node is heavily
loaded, it picks up a task randomly and transfers it to a random node.
These algorithms are simpler to implement but performance may not be
good.
Process Migration
- Similar to remote execution, a process migration needs to locate
and negotiate a remote host, transfer the cod image, and initialize the
remote operation,
- Since the process transferred to the destination node is pre-
empted, its state information must be also transferred,
- The state information, which should be transferred, consists of
two parts:
Computation state and Communication state,
1. Transparency
Ø levels of transparency:
a. object access level - supports non-preemptive process
migration
ü allows free initiation of programs at an arbitrary computer,
ü provides access to objects in location independent manner,
b. system call & interprocess communication level - supports
pre-emptive process migration
- all system call and interprocess communication should be
location independent in order not to depend upon its originating node
after being migrated,
Threads Performance
Ø Consider the server has a pool of one or more threads.
Ø Each thread removes a client request from a queue of received
requests and processes it.
Ø Example: (how multi-threading maximize the server throughput)
• Request processing: 2 ms
• I/O delay (no caching): 8 ms
• Single thread:
• 10 ms per requests, 100 requests per second.
• Two threads (no caching):
• 8 ms per request, 125 requests per second
• two threads and caching:
• 75% hit rate
• mean I/O time per request: 0.75 * 0 + 0.25 * 8ms =
2 ms
• 500 requests per second
P added
Process Process
A B SA preempted
Process SA unblocked
Kernel SA blocked
P idle
Virtual processors Kernel
P needed