Distributed Systems - A

Download Report

Transcript Distributed Systems - A

Chapter 2 Architecture
CS 6823 Spring’10 @ ASU
1
Overview
•
•
•
•
•
Architecture overview
Architectural styles
Software architectures
Architectures versus middleware
Self-management in distributed systems
CS 6823 Spring’10 @ ASU
2
Uniprocessor Operating Systems
• Multitasking
– A virtual machine to application
• CPU
– Kernel mode and user mode
• System call
– Programming interfaces between application and
kernel
• Monolithic Kernel & Microkernel
CS 6823 Spring’10 @ ASU
3
Multiple CPU System
• Shared/Private Memory
– Multiprocessors & Multicomputers
• Interconnection network
– Bus & Switched
CS 6823 Spring’10 @ ASU
4
Homogeneous Multicomputer Systems
• System Area Network(SAN)
– Bus-based multicomputer
• 100M,Fast Ethernet, Broadcast
• 25~100 nodes
– Switch-base multicomputer
• Meshes
• Hypercubes
 MPP
 COW (Clusters)
CS 6823 Spring’10 @ ASU
5
Shared-Memory Architectures
• Examples: Cray C90, SGI Power Challenge
CS 6823 Spring’10 @ ASU
6
Distributed (Multi-Private) Memory Architectures
• Examples:
– NUMA: Cray T3E, SGI Origin 2000 (connected on memory bus)
– UMA: Sun Enterprise 10000
(connected on memory bus)
– Clusters: IBM SP-2, UC Berkeley NOW (connected on I/O bus)
CS 6823 Spring’10 @ ASU
7
Cluster Architectures
CS 6823 Spring’10 @ ASU
8
Network Operating System
• A collection of OSs of computers connected through a
network incorporating modules to provide access to
remote resources
– Users are aware of file locations; remotely log-in
CS 6823 Spring’10 @ ASU
9
Network Operating System
•
Two clients and a server in a network operating system.
1-20
CS 6823 Spring’10 @ ASU
10
Distributed Operating Systems
• Requirements
–
–
–
–
Provide users with a single coherent computer system
Hide distribution of resources
Mechanisms for resource protection
Secure communication
• Definition of Distributed OS
– To users, it looks like ordinary centralized OS, but runs on
multiple and independent CPUs
• use of multiple processors is invisible
• user views system as a virtual uniprocessor
CS 6823 Spring’10 @ ASU
11
Distributed Operating Systems
• Single System Image: sharing local and remote
resources in the same way
• Homogeneous and inextensible
Adapted from Instructor’s Guide for
CS 6823 Spring’10 @ ASU
12
Structure of Distributed Operating Systems
UP
User Space
SVR
Kernel
User Space
SVR
Kernel
CS 6823 Spring’10 @ ASU
13
Distributed vs. Network Operating Systems
• Transparency
– How aware are users of the fact that multiple computers are
being used?
• Network OS
– Users are aware where resources are located
– Network OS is built on top of centralized OS
– Handles interfacing and coordination between local OSs
• Distributed OS
– Designed to control and optimize operations and resources in
distributed systems, but giving a virtual single system to
users
CS 6823 Spring’10 @ ASU
14
Distributed Systems: Positioning Middleware
• General structure of a distributed system as
middleware
CS 6823 Spring’10 @ ASU
15
Software Concepts
System
Description
Main Goal
DOS
Tightly-coupled operating system for
multi-processors and homogeneous
multicomputers
Hide and
manage
hardware
resources
NOS
Loosely-coupled operating system for
heterogeneous multicomputers (LAN
and WAN)
Offer local
services to
remote clients
Middleware
Provide
Additional layer atop of NOS
distribution
implementing general-purpose services
transparency
•
An overview between
DOS (Distributed Operating Systems)
NOS (Network Operating Systems)
Middleware
CS 6823 Spring’10 @ ASU
16
Comparison between Systems
Item
Distributed OS
Network OS
Middlewarebased DS
Multiproc.
Multicomp.
Degree of
transparency
Very High
High
Low
High
Same OS on all nodes
Yes
Yes
No
No
Number of copies of
OS
1
N
N
N
Basis for
communication
Shared
memory
Messages
Files
Model specific
Resource management
Global,
central
Global,
distributed
Per node
Per node
Scalability
No
Moderately
Yes
Varies
Openness
Closed
Closed
Open
Open
• A comparison between multiprocessor operating systems,
multicomputer operating systems, network operating systems,
and middleware based distributed systems.
CS 6823 Spring’10 @ ASU
17
Distributed Shared Memory
• Build a “virtual” memory address over distributed
multiple physical memories; an abstraction for data
sharing between computers that do not share physical
memory
– load/store vs. send/receive message passing
– Run-time system support for transparent accesses
CS 6823 Spring’10 @ ASU
18
Organization of Distributed Systems
• Software architectures
– How to organize software components
– How they should interact
• System architectures
– Final instantiation of software architectures on real machines
• Autonomic systems
– A distributed system monitor its own behavior and taking
appropriate measures when needed
CS 6823 Spring’10 @ ASU
19
Software Architectures
• Goal: Distribution transparency
– Trade-offs between performance, fault tolerance, ease-ofprogramming, and so on
• Component:
– Modular units with well-defined required and provided
interfaces
• Connector
– Mechanism to mediate communication coordination, or
cooperation among components
CS 6823 Spring’10 @ ASU
20
Architectural Styles
• Important styles of architecture for distributed
systems
–
–
–
–
Layered architectures
Object-based architectures
Data-centered architectures
Event-based architectures
CS 6823 Spring’10 @ ASU
21
Layered Architectural Style
• A component at layer Li is allowed to call
components at the underlying layer Li-1
CS 6823 Spring’10 @ ASU
22
Object-based Architectural Style
• Each object corresponds to what we have defined
as a component
• These components are connected through a
(remote) procedure call mechanism
CS 6823 Spring’10 @ ASU
23
Data-centered Architectural Style
• Components communicate through a common
(passive or active) repository
– Network applications: communicate through shared
distributed file systems
– Web applications: processes communicate through the use
of shared Web-based data services
CS 6823 Spring’10 @ ASU
24
Event-based Architectural Style
• Processes essentially communicate through the
propagation of events
– Optionally also carry data
• Publish/subscribe systems
– Only subscribed processes will receive the published events
– Referentially decoupled: Processes are loosely coupled
CS 6823 Spring’10 @ ASU
25
Shared Data-space Architectural Style
• Combine event-based architectures and datacentered architectures
– Processes are decoupled in time
CS 6823 Spring’10 @ ASU
26
System Architectures
• Centralized Architectures
• Decentralized Architectures
• Hybrid Architectures
CS 6823 Spring’10 @ ASU
27
Centralized Architectures
• Client-server model:
– Processes are divided into two (possibly overlapping) groups
– Server: a process implementing a specific service
– Client: a process sending a request to a server and
subsequently waiting for the server's reply
CS 6823 Spring’10 @ ASU
28
Communication between Clients and Servers
• Connectionless protocol
– Efficient, but unreliable
• Good for LANs
– Idempotent: an operation can be repeated multiple times
without harm
• Connection-oriented protocol
– Inefficient, but reliable
• Good for WANs
CS 6823 Spring’10 @ ASU
29
Application Layering
• Traditional three-layered view:
– User-interface layer
• Contains units for an application’s user interface
– Processing layer
• Contains the functions of an application, i.e. without specific data
– Data layer
• Contains the data that a client wants to manipulate through the
application components
• Observation:
– This layering is found in many distributed information
systems, using traditional database technology and
accompanying applications.
CS 6823 Spring’10 @ ASU
30
Internet Search Engine
• The core : information retrieval part
CS 6823 Spring’10 @ ASU
31
More Examples
• A Stock Brokerage System
– User Interface
– Process Level
• Analysis of financial data requires sophisticated
methods and techniques from statistics and artificial
intelligence
– Data Level
• Financial database
• Word Processor
CS 6823 Spring’10 @ ASU
32
Data Level
• Persistency of data
• Keeping data consistent across different
applications
• Database
– Relational database
– Object-oriented database
CS 6823 Spring’10 @ ASU
33