1 / 57

分布式系统介绍

分布式系统介绍. 中国科技大学软件学院 丁箐. 主要内容. 1.1 分布式系统概念 1.2 分布式系统的特点 1.3 硬件概念 1.4 软件概念 1.5 分布式系统设计问题. 主要内容. 1.1 分布式系统概念 1.2 分布式系统的特点 1.3 硬件概念 1.4 软件概念 1.5 分布式系统设计问题. 1.1 分布式系统概念. What is a Distributed System? “ 一个分布式系统是若干个独立的计算机的集合,但是对该系统的用户来说,系统就像一台计算机一样。 ”

Download Presentation

分布式系统介绍

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 分布式系统介绍 中国科技大学软件学院 丁箐

  2. 主要内容 1.1 分布式系统概念 1.2 分布式系统的特点 1.3 硬件概念 1.4 软件概念 1.5 分布式系统设计问题

  3. 主要内容 1.1 分布式系统概念 1.2 分布式系统的特点 1.3 硬件概念 1.4 软件概念 1.5 分布式系统设计问题

  4. 1.1 分布式系统概念 • What is a Distributed System? • “一个分布式系统是若干个独立的计算机的集合,但是对该系统的用户来说,系统就像一台计算机一样。” • 两个方面的含义: • 硬件方面:各个计算机都是自治的 • 软件方面:用户将整个系统看作是一台计算机

  5. 集中式系统

  6. NOW(Network of Workstations) Sun ULTRA5 with 32GB disk 16 Units Sun ULTRA10 32GB disk One unit Eathernet Switch 100M

  7. The Grid

  8. 分布式系统定义 1.1 一个分布式系统组织成中间件形式, 中间件层分布在多台机器上。

  9. 应用举例 • 银行“一卡通”系统 • 电信“神州行”系统 • SETI@Home • 从集中式系统到分布式系统 • 高性能微型计算机(PC)的普及 • 高速计算机网络(LAN、WAN)的普及

  10. 主要内容 1.1 分布式系统概念 1.2 分布式系统的特点 1.3 硬件概念 1.4 软件概念 1.5 分布式系统设计问题

  11. 1.2 分布式系统的特点 优点 -- 与集中式系统相比较 1、经济性:高的性能/价格比 Grosch’Law: Power ↑ Price2 NOPC vs. 大型机(mainframe)

  12. 优点 -- 与集中式系统相比较 2、性能:能产生单个大型主机不能达到的绝对性能 10,000 X 50MIPS  500,000MIPS(5千亿次)= 0.002ns/次=〉0.7mm

  13. 优点 -- 与集中式系统相比较 • 3、应用的固有的分布性, 例如: • CSCW • 工作流 • 4、可靠性高 • 多工系统的容错能力 • 5、可扩充性强 • 系统演进能力(evolution)

  14. 优点 -- 与集中式系统相比较 总结:

  15. 优点 --与独立PC机比较 • 1、支持数据共享 • 文件 • 数据库 • 2、支持设备共享 • 高档打印机 • 海量磁盘

  16. 优点 --与独立PC机比较 • 3、P2P通信 • email • BBS • 4、灵活性 • 负载分配

  17. 优点 --与独立PC机比较 总结:

  18. 存在的问题

  19. 主要内容 1.1 分布式系统概念 1.2 分布式系统的特点 1.3 硬件概念 1.4 软件概念 1.5 分布式系统设计问题

  20. CPU 指令流个数 数据流个数 1.3 硬件概念:多台计算机是如何联结在一起 ? • Flynn分类: • (1972) • SISD(单指令流、单数据流 ):(PC机) • SIMD (单指令流、多数据流 ) :矩阵计算机 • MISD (多指令流、单数据流 ) :无 • MIMD (多指令流、多数据流 ) :分布式系统 

  21. P P P P P P M M M M MIMD分类 • 存储器使用:共享式、私有式 • 多处理器系统(multi-processor) • 多计算机系统(multi-computer) 具有共享存储器的通常称为多处理机(multiprocessor)或多处理器;而不具有共享存储器的则称为多计算机(multicomputer)

  22. MIMD分类 • 连接方式: • 总线式 • 交换式 • 关联程度: • 紧耦合式:多用于并行系统 • 松耦合式 :多用于分布式系统

  23. MIMD系统分类 sequent 超级计算机 LAN工作站 超立方 Encor RP3 Transputer

  24. (1)总线型多处理机 控制线、数据线、地址线 SMP? • 解决总线过载:高速缓存(cache): • 命中率(hit rate) • 缓存一致性(coherency) • 直写(Write-through) • 监听( Snoopy)

  25. (2)交换型多处理机 交叉开关线:n2个交叉开关点 Omega开关网:2 • 2开关点,共n (log2n) /2个 NUMA(NonUniform Memory Access):分层存储

  26. (3)总线型多计算机 • 本地内存 • 局域网络(10M ~ 1000M) • 只用于CPU和CPU之间的通信

  27. (4)交换型多计算机 网格(grid):二维平面(n2个节点)。 超立方(hypercube):n维立方(2n个节点)

  28. Intel 单核CPU芯片

  29. Intel多核结构 • Replicate multiple processor cores on a single die.

  30. 多核处理器是一类特殊的多处理机 • 所有处理器在同一个芯片上 • 多核处理器是MIMD: 不同的核执行不同的指令,操作内存的不同位置 • 多核是一个共享内存的多处理机:所有核共享同一个内存

  31. 2 Processors vs. 2 Cores 2 Cores • Two cores on same die connected directly • Multiple threads and processes automatically processed in parallel • Only a small increase in power consumption • 2 Processors • Two separate chips connected externally by a system bus • Requires explicit software support • Much greater power consumption

  32. Pentium D with 975X Chipset Core 0 L2 Cache (for Core 0) Core 1 L2 Cache (for Core 1) 1066 / 800 MHz FSB Inter-Core Bus Interface DDR2 Memory Memory Controller Hub PCI Express x16 or 2 PCI Express x8 DMI (2 GB/s) I/O Controller Hub 6 USB 2.0 6 PCI High-Definition Audio 4 Serial ATA Ports 6 PCI Express x1 Intel Matrix Storage BIOS Support Intel Pro 1000 LAN

  33. 主要内容 1.1 分布式系统概念 1.2 分布式系统的特点 1.3 硬件概念 1.4 软件概念 1.5 分布式系统设计问题

  34. 1.4 软件相关概念 • 分类: • 紧耦合式、 松耦合式 硬件 松耦合 紧耦合 网络OS 分布式OS 多处理机分时OS 紧耦合 松耦合 软件

  35. 软件相关概念 • An overview of • DOS (Distributed Operating Systems) • NOS (Network Operating Systems) • Middleware

  36. 网络操作系统(NOS) • 网络操作系统的一般结构

  37. 网络操作系统(NOS) • 远程登录 • telnet • rlogin

  38. 网络操作系统(NOS) • 网络文件NFS • mount • 磁盘映射

  39. 真正的分布式系统 • 单一的、全局的进程间通信机制 • 协议、位置 • 全局进程管理 • 创建、启动、挂起、撤销 • 全局文件系统 • 文件名、目录、操作 • 统一的系统调用接口

  40. 多处理机分时系统(MPOS) 具有一个运行队列的多处理机系统

  41. 多处理机分时系统(MPOS) 特点: • 存在一个唯一的运行队列 • 文件系统的结构不同

  42. 多计算机操作系统 • 多件算机操作系统的一般结构 1.14

  43. 多计算机操作系统 • 消息传递的阻塞和缓冲 1.15

  44. 多计算机操作系统 • Relation between blocking, buffering, and reliable communications.

  45. 分布式共享内存系统 • Pages of address space distributed among four machines • Situation after CPU 1 references page 10 • Situation if page 10 is read only and replication is used

  46. 分布式共享内存系统 • False sharing of a page between two independent processes.

  47. 中间件 • 分布式系统作为中间件的一般结构 1-22

  48. 中间件和开放性 • 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

  49. 三种操作系统比较

  50. 主要内容 1.1 分布式系统概念 1.2 分布式系统的特点 1.3 硬件概念 1.4 软件概念 1.5 分布式系统设计问题

More Related