Upload
berk-hatasiz
View
751
Download
1
Tags:
Embed Size (px)
Citation preview
Introduction
Chapter 1
Definition of a Distributed System (1)
Distributed System is:
A collection of independent computers that appears to its users
as a single coherent system
Definition of a Distributed System (2)
• A distributed system organized as a middleware
• Note that the middleware layer extends over multiple machines
1.1
Distributed Systems: Examples (1)
Network of workstations in a company departmentsuch a system have a single file system, all files accessible
from all machines in the same way and using the same pathname
when a user types a command, the system could look for the best place to execute that command
if the system as a whole looks and acts like a classical single-processor time-sharing system
Distributed Systems: Examples (2)
A workflow information systemsupports the automatic processing of orders
used by people from several departments, possibly at different locations
people from sales department may be spread across an entire country
orders are placed by means of laptop computers that are connected to the system through cellular phones
Distributed Systems: Examples (3)
Internet
Distributed Systems: Examples (4)
A typical Intrarnet
Distributed Systems: Examples (5)
Portable / handheld devices in Distributed Systems
Key Design Challenges
•Connecting resources and users
•Distribution transparency
•Heterogeneity
•Openness
•Scalability
•Concurrency
•Security
•Failure handling
•Mobility and location dependency
Transparency in a Distributed System
Different forms of transparency in a distributed system
Transparency Description
AccessHide differences in data representation and how a resource is accessed
Location Hide where a resource is located
Migration Hide that a resource may move to another location
RelocationHide that a resource may be moved to another location while in use
Replication Hide that a resource is replicated
ConcurrencyHide that a resource may be shared by several competitive users
Failure Hide the failure and recovery of a resource
PersistenceHide whether a (software) resource is in memory or on disk
Openness (1/3)Open distributed system: Be able to interact with services from other open systems, irrespective of the underlying environment:• systems should conform to well-defined interfaces
• systems should support portability of applications
• systems should easily interoperate
Achieving openness: At least make the distributed system independent from heterogeneity of the underlying environment:• hardware
• platforms
• languages
Openness (2/3)
Implementing Openness: Requires support for different policies specified by applications and users:
• What level of consistency do we require for client cached data?
• Which operations do we allow downloaded code to perform?
• Which QoS requirements do we adjust in the face of varying bandwidth?
• What level of secrecy do we require for communication?
Openness (3/3)Implementing Openness: Ideally, a distributed system provides only mechanisms;
• Allow (dynamic) setting of caching policies, preferably per cachable item
• Support different levels of trust for mobile code
• Provide adjustable QoS parameters per data stream
• Offer different encryption algorithms
Scalability
•Size scalabilitynumber of users and/or processes
•Geographical scalabilitymaximum distance between nodes
•Administrative scalabilitynumber of administrative domains
Today, the challenge lies in geographical and administrative scalability
Scalability Problems
Examples of scalability limitations
Concept Example
Centralized services A single server for all users
Centralized data A single on-line telephone book
Centralized algorithmsDoing routing based on complete information
Scaling Techniques (1/3)Distribution: Partition data and computation across multiple machines:• Move computations to clients (Java applets)• Decentralized naming services (DNS)• Decentralized information systems (WWW)
Replication: Make copies of data available at different machines:• Replicated file servers (mainly for fault toleranc e)• Replicated databases• Mirrored Web sites• Large-scale distributed shared memory systems
Caching: Allow client processes to access local copies:• Web caches (browser/Web proxy)• File caching (at server and client)
Scaling Techniques (2/3)
1.4
The difference between letting:
a) a server or
b) a client check forms as they are being filled
Scaling Techniques (3/3)
1.5
An example of dividing the DNS name space into zones
Mobility and Location Dependency
Moving changes everything.
Location management
Tracking moving objects
Location-dependent data management
Location Based Services (LBS)
Hardware Concepts
1.6
Different basic organizations and memories in distributed computer systems
Multiprocessors (1)
A bus-based multiprocessor
1.7
Multiprocessors (2)
a) A crossbar switchb) An omega switching network
1.8
Homogeneous Multicomputer Systems
a) Gridb) Hypercube
1-9
Heterogeneous Multicomputer Systems: Networks of Computers
High degree of node heterogeneity• High-performance parallel systems (multiprocessors as well as
multicomputers)• High-end PCs and workstations (servers)• Simple network computers (offer users only network access)• Mobile computers (palmtops, laptops)• Multimedia workstations
High degree of network heterogeneity
• Local-area gigabit networks• Wireless connections• Long-haul, high-latency POTS (Plain Old Telephone Service)
connections• Wide-area switched megabit connections
Observation: Ideally, a distributed system hides these differencies
Software Concepts
An overview between
• DOS (Distributed Operating Systems)
• NOS (Network Operating Systems)
• Middleware
System Description Main Goal
DOSTightly-coupled operating system for multi-processors and homogeneous multicomputers
Hide and manage hardware resources
NOSLoosely-coupled operating system for heterogeneous multicomputers (LAN and WAN)
Offer local services to remote clients
MiddlewareAdditional layer a top of NOS implementing general-purpose services
Provide distribution transparency
Uniprocessor Operating Systems
Separating applications from operating system code through a microkernel
1.11
• Built to manage computers with only a single CPU
• Allow users and applications an easy way of sharing resources such as CPU, main memory, disks and peripheral devices
Multiprocessor Operating Systems (1)
A monitor to protect an integer against concurrent access
monitor Counter {
private:
int count = 0;
public:
int value() { return count;}
void incr () { count = count + 1;}
void decr() { count = count – 1;}
}
•Main difference from the uniprocessor OS is that data are now accessible by multiple processors
•So, they have to be protected against concurrent access to guarantee consistency semaphore , monitor
Multiprocessor Operating Systems (2)
A monitor to protect an integer against concurrent access, but blocking a process
monitor Counter {
private:
int count = 0;
int blocked_procs = 0;
condition unblocked;
public:
int value () { return count;}
void incr () {
if (blocked_procs == 0)
count = count + 1;
else
signal (unblocked);
}
void decr() {
if (count ==0) {
blocked_procs = blocked_procs + 1;
wait (unblocked);
blocked_procs = blocked_procs – 1;
}
else
count = count – 1;
}
}
Multicomputer Operating Systems (1)Some characteristics:• OS on each computer knows about the other computers• OS on different computers generally the same
• Services are generally (transparently) distributed across computers
1.1Distributed operating system services
Kernel Kernel Kernel
Multicomputer Operating Systems (2)Harder than traditional (multiprocessor) OS: Because memory is not shared, processor communication is done by message passing:
• Often no single global communication
• No simple system wide synchronization mechanisms such as semaphores and monitors
• Virtual (distributed) shared memory requires OS to maintain global memory map in software
• Inherent distributed resource management: no central point where allocation decision can be made
Practice: Only very few truly multicomputer operating systems exist (example: Amoeba)
Multicomputer Operating Systems (3)
Alternatives for blocking and buffering in message passing
1.15
Distributed Shared Memory Systems (1)
• Practice shows that programming multicomputers is much harder than programming multiprocessors
• Communication by accessing shared data and using semaphores or monitors is much easier than message-passing facilities
• There has been considerable research in emulating shared memory on multicomputers
• The goal is to provide a distributed (virtual) shared memory machine, running on multicomputer
Distributed Shared Memory Systems (2)
a) Pages of address space distributed among four machines
b) Situation after CPU 1 references page 10
c) Situation if page 10 is read only and replication is used
d) Replicate not only read-only pages, but all pages applying data consistency issues
Distributed Shared Memory Systems (3)
False sharing of a page between two independent processes
• Another issue is deciding how large pages should be?
• Having large pages may possibly reduce the amount of data that is transferred
• But, if a page contains data of two independent processes on different processors, OS may need to repeatedly transfer the page between two processors
Network Operating Systems (1)Some characteristics: • Each computer has its own operating system with networking
facilities• Computers work independently (they may even have different
operating systems)• Services are tied to individual computers (ftp, telnet, WWW)• Highly file oriented (basically, processors share only files)
Network Operating System (2)
Two clients and a server in a network operating system
1-20
•There is a global file system accessible from all the workstations
•File system is supported one or more machines called file servers
Positioning Middleware
1-22
Some characteristics:• OS on each computer need not know about the other computers• OS on different computers need not generally be the same• Services are generally (transparently) distributed across
computers
Need for MiddlewareMotivation: Too many networked applications were hard or difficult to
integrate:
•Departments are running different NOSs
•Integration and interoperability only at level of primitive NOS services
•Need for federated information systems:–Combining different databases, but providing a single view to applications
–Setting up enterprise-wide Internet services, making use of existing information systems
–Allow transactions across different databases
–Allow extensibility for future services (e.g., mobility, teleworking, collaborative applications)
Constraint: use the existing operating systems, and treat them as the underlying environment (they provided the basic functionality anyway)
Middleware and Openness
• In an open middleware-based distributed system, the protocols used by each middleware layer should be the same, as well as the interfaces they offer to applications
1.23
Middleware Services (1/3)
•Remote procedure calls across networks
•Remote object-based method invocation
•Message-queuing systems
•Advanced communication streams
•Event notification services
Communication services: Abandon primitive socket-based message passing in favor of :
Middleware Services (2/3)
•Large-scale, system-wide naming services (DNS)
•Advanced directory services (search engines)
•Location services for tracking mobile objects
•Data caching and replication
•Persistent storage facilities
Information system services: Services that help manage data in a distributed system:
Middleware Services (3/3)
•Distributed transaction processing
•Code migration
Control services: Services giving applications control over, when, where, and how they access data:
•Authentication and authorization services
•Simple encryption services
Security services: Services for secure processing and communication:
Comparison Between Systems
ItemDistributed OS
Network OS
Middleware-based OSMultipro
c.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 FilesModel
specific
Resource management
Global, central
Global, distributed
Per node Per node
Scalability No Moderately Yes Varies
Openness Closed Closed Open Open
Clients and Servers
Clients and Servers
1.25
Characteristics:
•There are processes offering services (servers)
•There are processes that use services (clients)
•Clients and servers can be distributed across different machines
•Clients follow request/reply model with respect to using services
Application Layering (1)
•Client-server applications are usually constructed with a distinction between three levels:
•User-interface level
•Processing level
•Data level
•Clients implement the user-interface level.
•Servers implement the rest !!
C/S Example: Processing Level (1)
The general organization of an Internet search engine into three different layers
1-28
C/S Examples: Multitiered Architectures (2)
Alternative client-server organizations (a) – (e)
1-29
C/S Examples: Multitiered Architectures (3)
An example of a server acting as a client
1-30
C/S Examples: Modern Architectures (4)
An example of horizontal distribution of a Web service
1-31
Multiple Server Model
Proxy Servers and Cache Model
Peer Process Model
The Applet Model
Mobile Code and Mobile Agent
Thin Clients
Spontaneous Networking (1)
Spontaneous Networking (2)
Key characteristics•easy connection to a local network•easy integration with local services•limited connectivity•security and privacy
Discovery services•registration service•lookup service
Design Requirements (1)
Performance Issues•Responsiveness - fast and consistent response•Throughput - high work completion rate•Computational Load Balancing
Quality of Service (QoS)•Reliability•Security•Performance•Adaptability
Design Requirements (2)
Caching and Replication•Admission policy and replica
placement•Replacement policy•Consistency and validation•Caching and replication protocols
Dependability•Correctness•Security•Fault tolerance