[CSAPP] Chapter 1 A Tour of Computer Systems

 

Chapter 1 A Tour of Computer Systems

1 A Tour of Computer Systems

 

1.1 Programs are translated by other programs into different forms

1.2 Hardware Organization of a System

  1. Buses:
    • 传输fixed-sized chunks of bytes known as words; word size 是系统的基本参数,现在多是32或64。
  2. I/O Devices:
    • 每个devices由controller或adapter 与 I/O bus相连;
    • controller是device上或板上的芯片组;adpater是母板上插的一张卡;
    • 它们的目的都是在I/O bus 与 I/O devices 之间来回传数据。
  3. Main memory:
    • a temporary stroge device.
  4. Processor:
    • 即CPU;
    • PC指向Main Memory 中的指令;
    • register file一组word-size regsiters,每个都有自己的名字;
    • ALU计算数据或地址。

1.3 数据搬运

  1. 运行hello程序 系统花了很多时间在数据搬运上
    • 键入“./hello”,由shell读入register,再存入内存;
    • 键入enter后,shell加载可执行文件,通过DMA,不需CPU参与。
    • CPU执行hello

1.4 操作系统管理硬件,提供fundamental abstractions

  • processes: a running program 的抽象;context 包括PC,register file,context of main memorty.
  • Threads:一个process可有多个excution units 组成;共享上下文,代码和全局变量。
  • Virtual Memory: 都用的虚拟地址空间,看起来独占内存;有相似的组织结构
  • 图1.13
  • Files:就是 a sequence of bytes, 所有 I/O device 都被抽象为Files.

1.5 Concurrency an Parallelisem

  • Thread-level concurrency
  • Muliti-core:多核有各自的cache;Hyperthreading:一个和中部分硬件有多个
  • Instruction-level parallism:流水线
  • Single-Instrction,Multiple-data(SIMD) parallism
posted @ 2019-10-13 08:52  董庆然  阅读(114)  评论(0)    收藏  举报