第18章数据库系统体系结构.ppt

  1. 1、本文档共36页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
第18章数据库系统体系结构

第18章: 数据库系统体系结构 集中式系统 集中式计算机系统 客户-服务器系统 客户-服务器系统 (续) 客户-服务器系统 (续) 事务服务器 事务服务器进程结构 典型的事务服务器包含多个进程在共享内存中存取数据. 服务器进程 接收用户查询(事务), 执行查询并返回结果 进程可以是多线程的, 允许单个进程并发执行多个用户查询 通常有多个多线程服务器进程 锁管理器进程 详见后 数据库写进程 不断输出更新后的缓冲块到磁盘 事务服务器进程 (续) 日志写进程 服务器进程向日志记录缓冲区增加日志记录 日志写进程将日志记录输出到稳定存储器. Checkpoint进程 执行周期性的checkpoints 进程监控进程 监控其他进程, 当其他进程失败时采取恢复行动 E.g. 中止正在由服务器进程执行的任何事务并重启之 事务系统进程 (续) 事务系统进程 (续) 共享内存包含共享数据 缓冲池(Buffer pool) 锁表 日志缓冲区 Cached查询计划(如果同一查询再次提出可以重用) 所有数据库进程都可存取共享内存 为确保两个进程不同时存取同一数据结构, 数据库系统实现互斥, 通过 操作系统信号灯 原子指令 Transaction System Processes (Cont.) To avoid overhead of interprocess communication for lock request/grant, each database process operates directly on the lock table data structure (Section 16.1.4) instead of sending requests to lock manager process Mutual exclusion ensured on the lock table using semaphores, or more commonly, atomic instructions If a lock can be obtained, the lock table is updated directly in shared memory If a lock cannot be immediately obtained, a lock request is noted in the lock table and the process (or thread) then waits for lock to be granted When a lock is released, releasing process updates lock table to record release of lock, as well as grant of lock to waiting requests (if any) Process/thread waiting for lock may either: Continually scan lock table to check for lock grant, or Use operating system semaphore mechanism to wait on a semaphore. Semaphore identifier is recorded in the lock table When a lock is granted, the releasing process signals the semaphore to tell the waiting process/thread to proceed Lock manager process still used for deadlock detection Data Servers Data Servers (Cont.) Data Servers (Cont.) 并行系统 加速比和扩展比 加速比 扩展比 批量与事务扩展 影响加速比和扩展必的因素 Interconnection Network Architectures Interconnection Architectures 并行数据库体系结构 并行数据库体系结构 共享内存 共享磁盘 无共享 层次式 分布式系统 分布式数据库 Homogeneous distributed databases Same software/schema on all sites, data may be partitioned among sites Goal: provide a view of a single database, hiding details of

文档评论(0)

qwd513620855 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档