Distributed Systems: an Introduction
-
Upload
seth-mendez -
Category
Documents
-
view
44 -
download
0
description
Transcript of Distributed Systems: an Introduction
1
Distributed Systems: Distributed Systems: an Introductionan Introduction
G53ACCG53ACC
Chris GreenhalghChris Greenhalgh
2
ContentsContents
Distributed Systems and Parallel Distributed Systems and Parallel ArchitecturesArchitectures
Applications and MotivationsApplications and Motivations Client-Server SystemsClient-Server Systems
3
Distributed SystemsDistributed Systems
Def.:Def.:"A collection of autonomous computers linked "A collection of autonomous computers linked by a computer network and equipped with by a computer network and equipped with distributed system software.”distributed system software.”
4
Parallel Computer ArchitecturesParallel Computer Architectures
A) SISD - “standalone”
B) MIMD, shared memory - “parallel”
C) MIMD, disjoint memory - “distributed”
5
Disjoint vs. Shared memory: latenciesDisjoint vs. Shared memory: latencies
Network communication (to “access” remote Network communication (to “access” remote memory)memory)– ~2 us custom cluster network (e.g MyriNet) ~2 us custom cluster network (e.g MyriNet) – ~ 1 ms Ethernet LAN, ~ 1 ms Ethernet LAN, – 10s ms WAN, 100s ms dialup/GPRS10s ms WAN, 100s ms dialup/GPRS
Local memory accessLocal memory access– ~10 ns~10 ns
~100,000 times faster than Ethernet~100,000 times faster than Ethernet 1,000,000+ times faster than WAN1,000,000+ times faster than WAN
CPU instruction timeCPU instruction time– ~1 ns!~1 ns!
6
DistributedDistributed System System Programming Implications Programming Implications
Communication is relatively SlowCommunication is relatively Slow Requires different programming approachesRequires different programming approaches Communication is generally achieved by explicit Communication is generally achieved by explicit
actions rather than shared variablesactions rather than shared variables– Sending and receiving “messages”Sending and receiving “messages”– ““Distributed Shared Memory” is technically Distributed Shared Memory” is technically
possible, but not common in usepossible, but not common in use Computation must be divided into relatively large Computation must be divided into relatively large
communication-free chunkscommunication-free chunks– Or most CPU time will be wasted waiting for Or most CPU time will be wasted waiting for
messagesmessages
7
Distributed System ApplicationsDistributed System Applications
The InternetThe Internet Communication (e.g. electronic mail)Communication (e.g. electronic mail) Network Information Retrieval (NIR) services Network Information Retrieval (NIR) services
(e.g. WWW)(e.g. WWW) Resource sharing, e.g. shared printers, Resource sharing, e.g. shared printers,
shared disksshared disks Collaborative applications (e.g. Collaborative applications (e.g.
teleconferencing, networked games)teleconferencing, networked games) Supercomputers (implementation and Supercomputers (implementation and
access)access)
8
Why build distributed systems (1)?Why build distributed systems (1)?Mirroring RealityMirroring Reality
People are distributed People are distributed – Support, Support, – CollaborationCollaboration
Information is distributedInformation is distributed– Access, Access, – Control,Control,– Performance (mobile code)Performance (mobile code)
Other resources are distributedOther resources are distributed– Physical devices (e.g. printer, robot)Physical devices (e.g. printer, robot)
9
Why build distributed systems (2)? Why build distributed systems (2)? Performance / CostPerformance / Cost
Centralised or distributed?Centralised or distributed?– Law of diminishing returns on single CPU Law of diminishing returns on single CPU
performanceperformance– The cost of moving ALL data to/from the The cost of moving ALL data to/from the
centre across a wide-area may be centre across a wide-area may be prohibitiveprohibitive
So: distribute processing and communicate So: distribute processing and communicate only as necessaryonly as necessary– Sometimes necessarySometimes necessary– EconomicEconomic
10
Challenge: InterconnectionChallenge: Interconnection
Connecting independent components, requires use of Connecting independent components, requires use of common:common:– Paradigms and models?Paradigms and models?
i.e. ways of understanding, dividing up and organising i.e. ways of understanding, dividing up and organising distributed operations and activitiesdistributed operations and activities
– FormatsFormats– ProtocolsProtocols– TimingTiming– Physical interfacesPhysical interfaces– Standards?Standards?
(i.e. networking - see CCN!)(i.e. networking - see CCN!)
11
One Common Paradigm: One Common Paradigm: Client-ServerClient-Server
Server(e.g. database)
Application
TCP/IP(e.g.)
Application
TCP/IP
Application
TCP/IP
Clients
12
Example:Example:Resource SharingResource Sharing
Resources include:Resources include:– hardware components, hardware components,
e.g. disks and printerse.g. disks and printers– software-defined entitiessoftware-defined entities
e.g. files, databases, other data objectse.g. files, databases, other data objects But:But:
– physically encapsulated within one physically encapsulated within one computercomputer
– remote access requires communicationremote access requires communication => Resource manager...=> Resource manager...
13
Resource Sharing (cont.)Resource Sharing (cont.)
Resource managerResource manager
= Software module = server= Software module = server– Manages a set of resources of a particular Manages a set of resources of a particular
typetype– Implements management policies for:Implements management policies for:
naming, naming, ConcurrencyConcurrency
E.g. E.g. – dept. print serversdept. print servers– disk servers (network drives)disk servers (network drives)
14
The Client-Server ModelThe Client-Server Model
= An effective general purpose approach to = An effective general purpose approach to sharing information and resources:sharing information and resources:– Shared resources are held and managed Shared resources are held and managed
by server processes.by server processes.– Client processes issue requests to servers Client processes issue requests to servers
whenever they need to access one of their whenever they need to access one of their resources.resources.
– If the request is a valid one, the server If the request is a valid one, the server performs the requested action and send a performs the requested action and send a reply to the client process.reply to the client process.
15
Example:Example:The X-Window systemThe X-Window system
A server controls access to the shared resource A server controls access to the shared resource - the user's display and input(s).- the user's display and input(s).
Clients communicate with the server, and ask it Clients communicate with the server, and ask it to display information to the user to display information to the user (e.g. xterm, netscape, ...)(e.g. xterm, netscape, ...)
So:So:
– multiple clients can display informationmultiple clients can display information– conflicts are resolved by server (e.g. conflicts are resolved by server (e.g.
overlapping windows)overlapping windows)
16
Client-server CommentsClient-server Comments
Not the only approach to creating distributed Not the only approach to creating distributed systemssystems– See also peer-to-peer, multi-tier, message-See also peer-to-peer, multi-tier, message-
orientedoriented Often complicated by “callback” or “notification” Often complicated by “callback” or “notification”
featuresfeatures– Original “client” is sometimes the receiver of Original “client” is sometimes the receiver of
requests (callbacks or notifications) requests (callbacks or notifications) originated by the original “server”originated by the original “server”
But simple, common, powerful and manageableBut simple, common, powerful and manageable