读书笔记:A tour of computer system<computer system a programmer perspective第一章>

1. 信息其实就是一些有特定含义的010101的bits文件

aside:c语言是system-level语言,他的诞生和unix系统紧紧相关。

2. 程序本身被其他的一些程序不断的转化直到机器可以执行

        例如:预编译,编译,汇编,链接 的过程,程序本身在不断转化

3. 编译系统很值得去了解,因为它可以让我们做到:

        a)优化程序,在了解c语言被编译成什么样的machine-level code的和machine-level code的基础上,可以作出很多优化。

b)理解一些link error

c)避免安全漏洞,比如buffer overflow就常常别人利用进行攻击。

4.处理器读取和解析储存在内存中的instructions

电脑的硬件系统组成有bus(连接传输作用), I/O device, main memory, processor, 其中cpu的功能主要有四种

i)load, memory->register

ii) store, register->memory

iii)operator, register->ALU

iiii)jump, 改变PC(program count)用来标记当前程序运行到的位置

5. cache的重要性,可以利用这个提升软件效率

L0(reg)->L1(CPU SRAM)->L2(CPU SRAM)->L3(CPU SRAM)->L4(main memory DRAM)->L5(local disk)->L6(remote disk)   7级缓存

6. 操作系统帮助我们管理底层的硬件,并抽象出一些接口

process:根据PC, register file, context of main memory 在user code和kernel code之间切换

thread

virtual memory:使每个process看起来他都有一个完整的memory结构

file


Kernel virtual memory

User stack(created at run time)

 

Memory mapped region forshared libraries

 

Run-time heap(created at run time bymalloc)

Read/write data

Read-only code and data

 

7 一些重要的主题

a) concurrency   vs  parallelism   第一个是多任务并行其并不会提升软件效率只是看起来可以有多个任务同时执行,第二个是多个CPU的同时运行,往往和多线程相关,可以提升软件效率,

i) 主要有thread-level的并行

ii) instruction-level的并行比如流水线,过去一个指令要几个时钟周期,现在是一个周期多个指令

iii) SIMD的并行,有效利用一些复杂的CPU指令

b)abstruction 抽象了就方便了别人的理解和使用




经典计算机操作系统教材第三版,详细内容可见亚马逊。 https://www.amazon.com/Computer-Systems-Programmers-Perspective-Engineering/dp/0134123832/ref=sr_1_2?ie=UTF8&qid=1541476471&sr=8-2&keywords=computer+systems+a+programmer's+perspective Computer systems: A Programmer’s Perspective explains the underlying elements common among all computer systems and how they affect general application performance. Written from the programmer’s perspective, this book strives to teach readers how understanding basic elements of computer systems and executing real practice can lead them to create better programs. Spanning across computer science themes such as hardware architecture, the operating system, and systems software, the Third Edition serves as a comprehensive introduction to programming. This book strives to create programmers who understand all elements of computer systems and will be able to engage in any application of the field--from fixing faulty software, to writing more capable programs, to avoiding common flaws. It lays the groundwork for readers to delve into more intensive topics such as computer architecture, embedded systems, and cyber security. This book focuses on systems that execute an x86-64 machine code, and recommends that programmers have access to a Linux system for this course. Programmers should have basic familiarity with C or C++. Personalize Learning with MasteringEngineering MasteringEngineering is an online homework, tutorial, and assessment system, designed to improve results through personalized learning. This innovative online program emulates the instructor’s office hour environment, engaging and guiding students through engineering concepts with self-paced individualized coaching With a wide range of activities available, students can actively learn, understand, and retain even the most difficult concepts.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值