Computer Systems 2B Notes 计算机系统 2B 笔记分享
Computer Systems 2B Module (Year 23/24) Notes
计算机系统 2B 课程(2023-2024 学年)课程笔记
Be Advised
请注意
- What is taught may vary from year to year. This note cannot always represent that.
每届的教学内容可能不一致。此笔记不能始终代表实际教学内容。 - Do not rely on this note. Always incorporate actual courseware for effectiveness.
请勿依赖该笔记。请始终结合实际课件食用以发挥效果。 - Do not share this note with non-DIICSU faculty/students, unless they are authorised.
请勿分享给非 DIICSU 教职工/学生,除非他们经过授权。
Note ToC
笔记目录
1 Introduction to Architecture
1.1 Fetch-Execute Cycle 读取-执行周期
1.2 Moore’s Law 摩尔定律
1.3 Multi-level Memory 多级内存结构
2 Hardware Caches & Memory Management
2.1 Von Neumann Bottleneck 冯诺依曼瓶颈
2.2 Cache 缓存
2.2.1 定义
2.2.2 Locality of Reference 引用的局部性
2.2.3 Hit and Miss 命中与未命中
2.2.4 Mapping Schemes 映射方案 (直接映射, 全关联映射, N 路集合关联映射)
2.2.5 Updating Schemes 更新方案
2.2.6 Cache Sizes 缓存大小
2.2.7 Multi-level Caches 多级缓存
2.2.8 Cache Coherence 缓存一致性 (直写, 回写, 外部一致性)
2.2.9 Intel 处理器中的缓存
2.3 Memory Management 内存管理
2.3.1 目标
2.3.2 Memory Allocation 内存分配 (固定大小分区, 可变大小分区, 分段, 分页)
3 CPU Improvements
3.1 Instructions 指令
3.1.1 概念
3.1.2 Instruction Set 指令集
3.1.3 SIMD 单指令多数据
3.1.4 指令与操作数打包
3.1.5 其他
3.2 Addressing Modes 寻址模式
3.2.1 定义
3.2.2 Immediate Addressing 立即寻址
3.2.3 Direct Addressing 直接寻址
3.2.4 Indirect Addressing 间接寻址
3.2.5 Displacement Addressing 位移寻址
3.2.6 Stack 堆栈
3.3 Addressing Modes in Pentium 奔腾处理器中的寻址模式
3.3.1 概念
3.3.2 Base Mode 基准寻址模式
3.3.3 Base with Displacement Mode 带位移的基准寻址模式
3.3.4 Base with Scaled Index and Displacement Mode 带缩放索引和位移的基准寻址模式
3.4 Instruction Formats 指令格式
3.4.1 CISC vs RISC
3.4.2 CPU 指令的发展历史
3.4.3 Pentium Instruction Formats 奔腾处理器指令格式
3.5 总体发展情况
3.6 The Programmer’s Model 程序员模型
3.7 The Instruction Cycle 指令循环周期
4 More CPU Improvements
4.1 Pipelining 流水线
4.1.1 Definition & ILP 指令级并行
4.1.2 Dependencies and Stalls 依赖与停滞 (数据依赖, 分支依赖, 分支预测, 奔腾处理器的分支预测, 奔腾二代处理器的分支预测, BTB 如何被使用)
4.2 Super-scalar Architecture 超标量架构
4.2.1 Definition & TLP 线程级并行
4.2.2 Pentium Architecture 奔腾处理器架构 (Pentium Pipeline 的五个阶段, 指令配对)
4.2.3 Simultaneous Multi-threading 同时多线程
4.2.4 Power Consumption 功耗
5 I/O Improvements
5.1 概念
5.2 Polling 轮询
5.3 Interupt-Driven I/O 中断驱动I/O
5.3.1 Interupts 中断
5.3.2 实现方式
5.3.3 分析
5.4 DMA 直接存储器访问
5.4.1 Why DMA
5.4.2 定义
5.4.3 实现方式
5.4.4 Cycle Stealing 周期窃取
5.4.5 分析
5.5 I/O Buffering I/O 缓冲
5.5.1 概念
5.5.2 实现方式 (Single Buffer)
5.5.3 效果
5.5.4 Double Buffer 双缓冲
6 Bus Architectures
6.1 概念
6.2 发展
7 Operating Systems
7.1 Process 进程
7.1.1 定义
7.1.2 Threads 线程
7.1.3 Process States 进程状态 (五态进程模型, 队列模型)
7.1.4 Process Image 进程映像 (进程控制块)
7.1.5 Process Switching 进程切换
7.1.6 Context 上下文
7.1.7 Process Switch vs Context Switch
7.1.8 Process Tutorial (五态模型, 六态模型, 七态模型, 线程)
7.2 Scheduling 调度
7.2.1 Types (Levels) of Scheduling 调度类型(级别)
7.2.2 Scheduling Criteria 调度标准 (FCFS/FIFO, Round-Robin)
7.2.3 Pre-emption 抢占
7.2.4 Pre-emptive Scheduling vs Non-pre-emptive Scheduling
7.2.5 Scheduling Tutorial (FCFS/FIFO, Round-Robin, SJF, SRT, Process Arrival Time, Virtual Round-Robin)
7.3 Priority 优先级
7.3.1 概念
7.3.2 策略
7.3.3 Windows 的线程调度优先级
7.3.4 GNU/Linux 进程优先级
7.4 Concurrency 并发
7.4.1 概念
7.4.2 Synchronisation 进程同步
7.4.3 Race Condition 竞赛条件
7.4.4 Mutual Exclusion 互斥
7.5 Semaphore 信号量
7.5.1 概念
7.5.2 Advantages & Disadvantages
7.5.3 Test-&-Set inside Semaphore
7.5.4 Bounded Buffer 有界缓冲区 (Producer/Consumer Problem)
7.5.5 Monitor 监视器
7.5.6 Message Passing 消息传递
7.5.7 Semaphore Tutorial (停车场问题, 哲学家就餐问题)
7.6 Deadlock 死锁
7.6.1 定义
7.6.2 Four Conditions for Deadlock 死锁的四大条件
7.6.3 Deadlock Prevention 死锁预防 (能否应对 Mutual Exclusion, 能否应对 Hold and Wait, 能否应对 Pre-emption, 能否应对 Circular Wait)
7.6.4 Deadlock Tutorial (死锁检测, 打破死锁, 避免死锁, 安全状态)
7.7 Hard Disks 硬盘
7.7.1 Properties
7.7.2 Solid State Drive 固态硬盘 (SSD) (SSD vs HDD)
7.7.3 Access (寻找时间, 旋转延迟, 引用局部性, 数据碎片性, FIFO, LOOK, C-LOOK, Shortest Service Time First, LIFO)
7.7.4 Hard Disks Tutorial (调度策略, Exercise)
7.8 Redundant Array of Independent Disks 独立磁盘冗余阵列 (RAID)
7.8.1 概念 (RAID 0)
7.8.2 Data Strips and “Striping” 数据条和条带化 (RAID 1, RAID 2, RAID 3, 更高级 RAID)
7.9 Filesystems 文件系统
7.9.1 概念 (一些术语)
7.9.2 File Allocation 文件分配 (连续分配, 链式分配, 指数化分配)
7.9.3 Disk Allocation Table 磁盘分配表 (位表, 链式空闲块, 索引化的空闲部分)
7.9.4 Windows NT File System (NTFS) (簇)
7.10 Security of Information 信息安全
7.10.1 Security Tutorial (一般类型的安全威胁)
7.11 Distributed Systems 分布式系统
7.11.1 Client-Server Computing 客户机-服务器计算
7.11.2 Middleware 中间件
7.11.3 Remote Procedure Calls 远程过程调用 (RPC) (Four Parts, Synchronous RPC, Asynchronous RPC)
Accessing
获取该资料
Copyright 版权
The content shared in this post relates to DIICSU’s coursework materials, which are protected by copyright.
本贴中分享的内容涉及到 DIICSU 的教学课件材料,这些材料受到版权保护。
As this is a public platform, WaterCoFire is unable to provide direct sharing of relevant materials as it is unable to verify the identity of visitors here. Please understand that sharing these materials on third-party online platforms may be suspected of academic misconduct.
由于此处为公共平台,WaterCoFire 无法在此直接提供相关资料的分享,因为在此处无法核实访问者的身份。希望您理解,因为在第三方网络平台上分享这些资料可能涉嫌学术不端。
If you are a faculty/student of DIICSU, or other authorised person, please contact WaterCoFire for having access to relevant materials.
如果您是 DIICSU 的教职工/学生,或其他经过授权的人员,请与 WaterCoFire 联系以获取相关资料。
Unless otherwise stated, all posts from WaterCoFire are licensed under:
WaterCoFire 的所有内容分享除特别声明外,均采用本许可协议:
CC BY-NC-SA 4.0
Reprint with credit to this source.
转载请注明本来源,谢谢喵!