Professional Documents
Culture Documents
Distributed Systems
Processes
Multi-threading Process
Problems with single-thread processes
Context switch between processes is quite expensive
Creating a new process is expensive
Benefit of multi-threading
Blocking system calls does not stop the process (just switch to
another thread)
It is possible to exploit parallelism on multi-processor computers
Useful in cooperating programs, i.e., different parts of an application
may need to talk to each other
IPC between single-thread processes are expensive
Communication between multiple threads in a process is easy
Thread Implementation
Multi-threaded Server
Multi-threaded servers
Parallelism, blocking system call
Sequential process model
Finite-state machine
Parallelism, must use non-block system call
Sequential process model lost
6
Virtualization
Why virtualization?
In early days, to allow legacy software to run on
expensive mainframe hardware
The legacy software is developed for a specific OS, which
is not supported by mainframe
10
Client-Side Processes
The major task is
to provide user interface to access remote servers
Thin-Client Approach
15
16
Server-Side Processes
Generally, a server
Waits for an incoming request from a client
Ensure that the request has been taken care of
Waits for the next request
18
19
Server Cluster
The need for a server cluster
A single computer cannot handle the needed bandwidth,
computing, failure resistance, etc.
20
Distributed Servers
Provide a robust server that is highly available
The server cluster early has a single static access point
what if this access point fails?
Problem:
All traffic flow through home agent and the access point
22
Routing Optimization
23
PlanetLab
A global research network that supports the
development of network services such as
distributed storage, peer-to-peer network
PlanetLab Organization
From a users perspective
What he needs is a network of computers under his
control
26
Management of PlanetLab
The major management task is
assign a slice to a user upon request
1.
A node owner puts its node under the regime of a management authority, possibly
restricting usage where appropriate.
29
Code Migration
The communication in the distributed systems discussed so far
is limited to passing data
Being able to passing code, even while in execution, can
simplify the design of distributed systems
improve performance by moving process from heavily-loaded system
to lightly-loaded system
improve performance by exploiting parallelism (e.g., parallel search)
provide flexibility, i.e., clients dont have to pre-install all software
We will discuss
Different approaches for code migration
How to deal with the local resources that a migrating program uses
How to migrate code between heterogeneous systems
30
31
Example 4:
Temporarily freeze an environment, move to
another machine and unfreeze (e.g. for
debugging server production issues)
33
Weak mobility
Migrate only the code segment
Strong Mobility
Migrate all three segments
35
Resource Types:
Fixed Resources: bound to a specific machine or environment and can not be
moved (e.g. Local disk drives, communication ports)
Unattached resources: can easily be moved (e.g. Data files)
Fastened resources: may be possible but very costly (e.g. local databases or
complete web sites)
Binding strength:
(Strongest) By identifier: e.g. when a process uses a URL to refer to a web
site by its IP address
(Weaker) By Value: e.g. program relies on standard libraries such as C or
JAVA. No need to migrate if the lib is a standard library
(Weakest) By type: e.g. references to local device such as printers,
36
37