CSAPP | A Tour

The Compilation System

Why we need to understand how compilation systems work?

  • Optimizing program performance
  • Understanding link-time errors
  • Avoiding security holes

Buses: transfer fixed-size chunks of bytes known as words

I/O Devices: system’s connection to the external world

Main Memory: temporary storage device that holds both a program and the data it manipulates while processor executes the program

Processor: CPU, engine that executes instructions stored in main memory


Cache Memories

Serve as temporary staging areas for information that the processor is likely to need in the near future

Memory Hierarchy
storage at one level serves as a cache for the next level (e.g. L1 as cache for L2)


Operating system

  1. Protect the hardware from misuse by runaway applications
  2. Provide applications with simple and uniform mechanisms for manipulating complicated and often wildly different low-level hardware devices

- Processes

~~ a running program
interleaving–>context switching
Context Switching

transition is managed by kernel, which is a collection of code and data structures that the system uses to manage all the processes

- Threads

~~ multiple execution units
(a process consists of multiple execution units --> threads)


- Virtual Memory

~~ provides each process with the illusion that it has exclusive use of the main memory (”我不是备胎“的幻觉)


- Files

~~ a sequence of bytes (all I/O device – disks, keyboards, displays and networks is modeled as a file)

Amdahl’s law

When speed up a part of a system, the effect on the overall performance depends on both how significant this part was and how much it sped up


Thread-Level Concurrency

Multiple programs execute at the same time
Hyperthreading (simultaneous multi-threading): allows a single CPU to execute multiple flows of control --> having multiple copies of some of the CPU hardware (e.g. program counters and register files), while having only single copies of other parts of the hardware.

Instruction-Level Parallelism

Processors execute multiple instructions at one time
superscalar processors: processors that can sustain execution rates faster than 1 instruction per cycle

Single-Instruction, Multiple-Data (SIMD) Parallelism

Allows a single instruction to cause multiple operations to be performed in parallel
–> speed up applications that process image, sound and video data

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值