-
分布式系统分类
--
分布式计算系统:集群计算系统
&
网格计算系统(硬件,操作系
统,网络都不尽相同)
--
分布式信
息系统:事务处理系统
&
企业应用集成
--
分布式普适系统
Grid computing
Provide users with seamless access to:
–
Storage
capacity
–
Processing
–
Network bandwidth
Heterogeneous and geographically
distributed systems
系统体系结构:
集中式
&
非集中式
&
混合模式
远程过程调用(
RPC
)
:
机器
A
上的进程调用机
器
B
上的进程时,
A
< br>上的调用进程被挂起,
B
上被调用的开始执行调用方可以
通过使用参数将信息传送给被调用方,
然后可以通过传回
的结果
得到信息。
RPC
操作分为客户部分
和服务器部分。
命名系统
Naming
Problem
Given an essentially unstructured name
(e.g., an identi?er), how can
we locate its associated
access point?
Simple solutions (broadcasting)
Home-based
approaches
Distributed Hash Tables (structured
P2P)
Hierarchical location service
Flynn’s
Taxonomy
费林分类
SISD
SIMD
MISD
MIMD
单一指令流单一资料流
计算机
单一指令流多资料流
计算机
多指令流单一资料流
计算机
多指令流多资料流
计算机
Subclassifying MIMD
memory
–
shared memory
systems: multiprocessors
–
no shared memory: networks of
computers, multicomputers
interconnect
互联
–
bus
–
switch
delay/bandwidth
–
tightly coupled
systems
–
loosely coupled systems
Transparency
透明性
(
访问
access
< br>、位置
location
、迁移
migration
、重定位
relocation
、复制
replication
、并发
concurrency
、故障
failure)
–
Location
transparency
:
users don’t
care where resources are
–
Migration
transparency
:
resources move
at will
–
–
–
Replication transparency
:
users cannot tell whether there are
copies of resources
Concurrency
transparency
:
users share
resources transparently
Parallelism
transparency
:
operations
take place in parallel without user’s
knowledge
Design
issues
Transparency
Reliability
Performance
Scalability
目标
(
可访
问、透明性、开放性、可扩展性、可靠性
)
Centralized model
集中式模型
?
No networking
?
Traditional
time-sharing system
?
Direct connection of user terminals to
system
?
One or
several CPUs
?
Not easily scalable
?
Limiting
factor: number of CPUs in system
–
Contention for
same resources
Peer to peer model
?
Each machine on
network has (mostly) equivalent capabilities
?
No machines are
dedicated to serving others
?
E.g.,
collection of PCs:
–
Access other people’s files
–
Send/receive
email (without server)
–
Gnutella-style content sharing
–
SETI@home
computation
Processor pool
model
What about idle workstations
(computing resources)?
–
Let them sit
idle
–
Run jobs
on them
Alternatively…
–
Collection of
CPUs that can be assigned processes on demand
–
Users won’t
need heavy duty workstations
?
GUI on local
machine
–
Computation model of Plan 9
RPC
的步骤:
(1)
客户过程以正常的方式调用客户存根
(2)
客户存根生成一个消息,然后调用本地的操作系统
(3)
客户端操作系统将消息发送给远程操作系统
(4)
远程操作系统将消息交给服务器存根
(5)
服务器存根将参数提取出来,然后调用服务器
(6)
服务器执行要求的操作,操作完成后将结果返回给服务器存根
(7)
服务器存根讲结果打包成一个消息,然后调用本地操作系统
(8)
服务器操作系统将含有结果的消息发送回客户端操作系统
(9)
客户端操作系统将消息交给客户存根
(10)
客户存根将结果从消息中提取出来,返回给调用它的客户过程。
并发的方法
?
Two Phase
locking
两阶段锁协议
?
Strict two
phase locking
严格的两阶段锁
?
Read/write lock
读写锁
?
Two version locking
两版本锁
时钟
物理时钟和逻辑时钟
物理时钟:
--Real-time
Clock: CMOS clock (counter) circuit driven by a
quartz oscillator
--OS generally
programs a timer circuit to generate an interrupt
periodically
问题:
Getting two systems to agree on time
–
Two clocks
hardly ever agree
–
Quartz oscillators oscillate at
slightly different frequencies
Clocks
tick at different rates
–
Create ever-widening gap in perceived
time
–
Clock
Drift
Difference between two
clocks at one point in time
–
Clock Skew
时间偏移
Simplest synchronization technique
-
Issue RPC to
obtain time
–
Set
time
Cristian’s
algorithm
Compensate for
delays
–
Note
times:
?
r
equest sent:
T
0
?
r
eply received:
T
1
–
Assume network delays are symmetric