CSAPP英语学习系列:Chapter 1: A Tour of Computer Systems.

读CSAPP这本书是基于PDF,边读变记录英语生词。

We begin our study of systems by tracing the lifetime of the hello program,
from the time it is created by a programmer, until it runs on a system, prints its
simple message, and terminates. As we follow the lifetime of the program, we will
briefly introduce the key concepts, terminology, and components that come into
play.

terminate
美[ˈtɜːrmɪneɪt]
vt.& vi. 结束;使终结

briefly
美[ˈbriːfli]
adv. 短暂地;简单地;简略地;略略

concept
美[ˈkɑːnsept]
n. 概念;观念

terminology
美[ˌtɜːrmɪˈnɑːlədʒi]
n. 专门名词;术语,术语学;用辞

component
美[kəmˈpoʊnənt]
n. 组成部分,成分
1.1 Information Is Bits + Context

The representation of hello.c illustrates a fundamental idea: All information in 
a system—including disk fifiles, programs stored in memory, user data stored in
memory, and data transferred across a network—is represented as a bunch of bits.
The only thing that distinguishes different data objects is the context in which
we view them. For example, in different contexts, the same sequence of bytes
might represent an integer, flfloating-point number, character string, or machine
instruction.

representation
美[ˌrɛprɪzɛnˈteʃən]
n. 表现;陈述;表现…的事物

illustrate
美[ˈɪləstreɪt]
v. (用示例/图画等)说明

fundamental
美[ˌfʌndəˈmentl]
adj. 基础的;根深蒂固的

bunch
美[bʌntʃ]
n. 一伙;一束;一串

distinguish
美[dɪˈstɪŋɡwɪʃ]
v. 区分,使有别于;辨别出

sequence
美[ˈsiːkwəns]
n. []数列,序列

instruction
美[ɪnˈstrʌkʃn]
n. 指示;计算机指令
1.2 Programs Are Translated by Other Programs into Different Forms

Here, the gcc compiler driver reads the source file hello.c and translates it into
an executable object file hello. The translation is performed in the sequence
of four phases shown in Figure 1.3. The programs that perform the four phases
(preprocessor, compiler, assembler, and linker) are known collectively as the
compilation system.

perform
美[pərˈfɔːrm]
v. 执行;起…作用

sequence
美[ˈsiːkwəns]
n. []数列,序列

phase
美[feɪz]
n. 阶段;时期

figure
美[ˈfɪɡjər]
n. 图,表

preprocessor
美[pri'proʊsesə(r)]
n. 预处理程序

assembler
美[əˈsɛmblɚ]
n. 装配工;汇编程序

collectively
美[kəˈlɛktɪvlɪ]
adv. 全体地,共同地

compilation
美[ˌkɑmpɪˈleɪʃn]
n. 汇编物
1.3 It Pays to Understand How Compilation Systems Work

Optimizing program performance. Modern compilers are sophisticated tools
that usually produce good code. As programmers, we do not need to know
the inner workings of the compiler in order to write efficient code. However,
in order to make good coding decisions in our C programs, we do need a
basic understanding of machine-level code and how the compiler translates
different C statements into machine code. For example, is a switch statement
always more efficient than a sequence of if-else statements? How much
overhead is incurred by a function call? Is a while loop more efficient than
a for loop? Are pointer references more efficient than array indexes? Why
does our loop run so much faster if we sum into a local variable instead of an
argument that is passed by reference? How can a function run faster when we
simply rearrange the parentheses in an arithmetic expression?

optimize
美[ˈɑptɪmaɪz]
vt. 使最优化,使尽可能有效

sophisticate
美[sə'fɪstɪkeɪt]
adj. 老于世故的

efficient
美[ɪˈfɪʃnt]
adj. 效率高的;有能力的

overhead
美[ˈoʊvərhed]
n. 经常性支出,运营费用

incur
美[ɪnˈkɜːr]
vt. 招致,引起

rearrange
美[ˌriəˈrendʒ]
vt. 重新安排;重新布置

parenthesis
美[pəˈrɛnθɪsɪs]
n. 插入语;插入成分

arithmetic
美[əˈrɪθmətɪk]
n. 算术;数据统计
1.4 Processors Read and Interpret Instructions Stored in Memory

The shell is a command-line interpreter that prints a prompt, waits for you
to type a command line, and then performs the command. If the first word of the
command line does not correspond to a built-in shell command, then the shell
assumes that it is the name of an executable file that it should load and run. So
in this case, the shell loads and runs the hello program and then waits for it to
terminate. The hello program prints its message to the screen and then terminates.
The shell then prints a prompt and waits for the next input command line.

interpreter
美[ɪnˈtɜːrprətər]
n. 解释者

prompt
美[prɑːmpt]
n. 激励;提示符;提词;提示

correspond
美[ˌkɔːrəˈspɑːnd]
v. 符合;相当于;通信

assume
美[əˈsuːm]
v. 假设,认为
1.4.1 Hardware Organization of a System

From the time that power is applied to the system until the time that the
power is shut off, a processor repeatedly executes the instruction pointed at by the
program counter and updates the program counter to point to the next instruction.
A processor appears to operate according to a very simple instruction execution
model, defined by its instruction set architecture. In this model, instructions execute
in strict sequence, and executing a single instruction involves performing a series
of steps. The processor reads the instruction from memory pointed at by the
program counter (PC), interprets the bits in the instruction, performs some simple
operation dictated by the instruction, and then updates the PC to point to the next
instruction, which may or may not be contiguous in memory to the instruction that
was just executed.

instruction
美[ɪnˈstrʌkʃn]
n. 计算机指令

accord
美[ əˈkɔːrd]
v. 给予(某种待遇);符合,与…一致

strict
美[strɪkt]
adj. 严格的;严密的

interpret
美[ɪnˈtɜːrprət]
v. 诠释;领会,把…理解为

dictate
美[ ˈdɪkteɪt]
vt. 口述;命令,指示

contiguous
美[kənˈtɪɡjuəs]
adj. 接触的,邻近的,共同的
1.4.2 Running the hello Program

Given this simple view of a system’s hardware organization and operation, we can
begin to understand what happens when we run our example program. We must
omit a lot of details here that will be fifilled in later, but for now we will be content
with the big picture.Initially, the shell program is executing its instructions, waiting for 
us to type a command. As we type the characters ./hello at the keyboard, the shell program
reads each one into a register and then stores it in memory, as shown in Figure 1.5.

omit
美[oʊˈmɪt]
vt. 省略;遗漏

initially
美[ɪˈnɪʃəli]
adv. 开始;最初
1.5 Caches Matter

To deal with the processor–memory gap, system designers include smaller,
faster storage devices called cache memories (or simply caches) that serve as
temporary staging areas for information that the processor is likely to need in
the near future. Figure 1.8 shows the cache memories in a typical system. An L1
cache on the processor chip holds tens of thousands of bytes and can be accessed
nearly as fast as the register file. A larger L2 cache with hundreds of thousands
to millions of bytes is connected to the processor by a special bus. It might take 5
times longer for the processor to access the L2 cache than the L1 cache, but this is
still 5 to 10 times faster than accessing the main memory. The L1 and L2 caches are
implemented with a hardware technology known as static random access memory
(SRAM). Newer and more powerful systems even have three levels of cache: L1,
L2, and L3. The idea behind caching is that a system can get the effect of both
a very large memory and a very fast one by exploiting locality, the tendency for
programs to access data and code in localized regions. By setting up caches to hold
data that are likely to be accessed often, we can perform most memory operations
using the fast caches.

gap
美[ɡæp]
n. 间隔;差距

temporary
美[ˈtempəreri]
adj. 短暂的

stage
美[steɪdʒ]
v. 上演;举办;组织;使发生

typical
美[ˈtɪpɪkl]
adj. 典型的;

chip
美[tʃɪp]
n. 炸薯条,炸薯片

exploiting
美[ɪksp'lɔɪtɪŋ]
v. 开采( exploit的现在分词 )

tendency
美[ˈtendənsi]
n. 倾向;趋势
1.6 Storage Devices Form a Hierarchy

This notion of inserting a smaller, faster storage device (e.g., cache memory)
between the processor and a larger, slower device (e.g., main memory) turns out
to be a general idea. In fact, the storage devices in every computer system are
organized as a memory hierarchy similar to Figure 1.9. As we move from the top
of the hierarchy to the bottom, the devices become slower, larger, and less costly
per byte. The register fifile occupies the top level in the hierarchy, which is known
as level 0 or L0. We show three levels of caching L1 to L3, occupying memory
hierarchy levels 1 to 3. Main memory occupies level 4, and so on.

notion
美[ˈnoʊʃn]
n. 概念,观念;意见,见解

hierarchy
美[ˈhaɪərɑːrki]
n. []分层,层次

occupy
美[ˈɑːkjupaɪ]
v. 居住;占用;占领
1.7 The Operating System Manages the Hardware

The operating system has two primary purposes: (1) to protect the hardware
from misuse by runaway applications and (2) to provide applications with simple
and uniform mechanisms for manipulating complicated and often wildly different
low-level hardware devices. The operating system achieves both goals via the
fundamental abstractions shown in Figure 1.11: processes, virtual memory, and
fifiles. As this fifigure suggests, fifiles are abstractions for I/O devices, virtual memory
is an abstraction for both the main memory and disk I/O devices, and processes
are abstractions for the processor, main memory, and I/O devices. We will discuss
each in turn.

misuse
美[mɪsˈjuz]
vt. 使用…不当

uniform
美[ˈjuːnɪfɔːrm]
adj. 一致的,统一的

mechanism
美[ˈmekənɪzəm]
n. []机制,机能,[]机理

manipulate
美[məˈnɪpjuleɪt]
vt. 操作,处理

complicate
美[ˈkɑːmplɪkeɪt]
v. 使复杂化

fundamental
美[ˌfʌndəˈmentl]
adj. 基础的;根深蒂固的
1.7.1 Processes

A process is the operating system’s abstraction for a running program. Multi-
ple processes can run concurrently on the same system, and each process appears
to have exclusive use of the hardware. By concurrently, we mean that the instruc-
tions of one process are interleaved with the instructions of another process. In
most systems, there are more processes to run than there are CPUs to run them.
Traditional systems could only execute one program at a time, while newer multi-
core processors can execute several programs simultaneously. In either case, a
single CPU can appear to execute multiple processes concurrently by having the
processor switch among them. The operating system performs this interleaving
with a mechanism known as context switching. To simplify the rest of this discus-
sion, we consider only a uniprocessor system containing a single CPU. We will
return to the discussion of multiprocessor systems in Section 1.9.2.

exclusive
美[ɪkˈskluːsɪv]
adj. 独有的

interleaved
美[ɪntə'lɪvd]
adj. 交叉存取的,隔行扫描的

several
美[ˈsevrəl]
det. 几个;数个

simultaneously
美[ˌsaɪməlˈteɪniəsli]
adv. 同时地

mechanism
美[ˈmekənɪzəm]
n. []机制,机能,[]机理
1.7.2 Threads

consist
美[kənˈsɪst]
v. 由…组成;在于

efficient
美[ɪˈfɪʃnt]
adj. 效率高的
1.7.3 Virtual Memory

Virtual memory is an abstraction that provides each process with the illusion that it
has exclusive use of the main memory. Each process has the same uniform view of
memory, which is known as its virtual address space. The virtual address space for
Linux processes is shown in Figure 1.13. (Other Unix systems use a similar layout.)
In Linux, the topmost region of the address space is reserved for code and data
in the operating system that is common to all processes. The lower region of the
address space holds the code and data defifined by the user’s process. Note that
addresses in the fifigure increase from the bottom to the top.

illusion
美[ɪˈluːʒn]
n. 错觉;幻想

exclusive
美[ɪkˈskluːsɪv]
adj. 独有的

uniform
美[ˈjuːnɪfɔːrm]
adj. 一致的,统一的

topmost
美[ˈtɑpmoʊst]
adj. 最高的

reserved
美[rɪˈzɜrvd]
adj. 预订的
1.7.4 Files

This simple and elegant notion of a fifile is nonetheless very powerful because
it provides applications with a uniform view of all the varied I/O devices that
might be contained in the system. For example, application programmers who
manipulate the contents of a disk fifile are blissfully unaware of the specific disk
technology. Further, the same program will run on different systems that use
different disk technologies. You will learn about Unix I/O in Chapter 10.

elegant
美[ˈelɪɡənt]
adj. 优美的;典雅的

nonetheless
美[ˌnʌnðəˈles]
adv. 虽然如此,但是

varied
美[ˈverid]
adj. 各种各样的

manipulate
美[məˈnɪpjuleɪt]
vt. 操作,处理

blissfully
美['blɪsfəlɪ]
adv. 幸福地,充满喜悦地

specific
美[spəˈsɪfɪk]
adj. 明确的
1.8 Systems Communicate with Other Systems Using Networks

With the advent of global networks such as the Internet, copying information
from one machine to another has become one of the most important uses of
computer systems. For example, applications such as email, instant messaging, the
World Wide Web, FTP, and telnet are all based on the ability to copy information
over a network.

advent
美[ˈædvent]
n. 出现

instant
美[ˈɪnstənt]
adj. 立即的
1.9 Important Themes

This concludes our initial whirlwind tour of systems. An important idea to take
away from this discussion is that a system is more than just hardware. It is a
collection of intertwined hardware and systems software that must cooperate in
order to achieve the ultimate goal of running application programs. The rest of
this book will fifill in some details about the hardware and the software, and it will
show how, by knowing these details, you can write programs that are faster, more
reliable, and more secure.

conclude
美[kənˈkluːd]
v. 推断出;总结

initial
美[ɪˈnɪʃl]
adj. 开始的

whirlwind
美[ˈwɜːrlwɪnd]
adj. 旋风般的;急速的

intertwine
美[ˌɪntərˈtwaɪn]
vt. 缠结在一起;使缠结

cooperate
美[koʊˈɑːpəreɪt]
v. 协作;配合

ultimate
美[ˈʌl..mət]
adj. 最后的

reliable
美[rɪˈlaɪəbl]
adj. 可信赖的

secure
美[sɪˈkjʊr]
adj. 安全的
1.9.1 Amdahl’s Law

Amdahl’s law describes a general principle for improving any process. In
addition to its application to speeding up computer systems, it can guide a company
trying to reduce the cost of manufacturing razor blades, or a student trying to
improve his or her grade point average. Perhaps it is most meaningful in the world
of computers, where we routinely improve performance by factors of 2 or more.
Such high factors can only be achieved by optimizing large parts of a system.

principle
美[ˈprɪnsəpl]
n. 法则;观念;理由;定律

manufacture
美[ˌmænjuˈfæktʃər]
vt. 制造,生产

blade
美[bleɪd]
n. 叶片;桨叶

routinely
美[ruˈtinlɪ]
adv. 例行公事地;常规地,惯常地

factor
美[ˈfæktər]
n. 因素;因子
1.9.2 Concurrency and Parallelism

We highlight three levels here, working from the highest to the lowest level.
1. Thread-Level Concurrency, With threads, we can even have multiple control flows 
executing within a single process.
2. Instruction-Level Parallelism, we will explore the use of pipelining, where the
actions required to execute an instruction are partitioned into different steps and
the processor hardware is organized as a series of stages, each performing one
of these steps.
3. Single-Instruction, Multiple-Data (SIMD) Parallelism, processors have instructions that 
can add 8 pairs of single-precision floating-point numbers (C data type float) in parallel.

parallel
美[ˈpærəlel]
adj. 平行的;并行的

pipelining
美[ˌpaɪp'laɪnɪŋ]
n. 流水线操作

partition
美[pɑːrˈtɪʃn]
vt. 分开,隔开

precision
美[prɪˈsɪʒn]
n. 精确度
1.9.3 The Importance of Abstractions in Computer Systems

The use of abstractions is one of the most important concepts in computer science.
For example, one aspect of good programming practice is to formulate a simple
application program interface (API) for a set of functions that allow programmers
to use the code without having to delve into its inner workings. Different program-
ming languages provide different forms and levels of support for abstraction, such
as Java class declarations and C function prototypes.

concept
美[ˈkɑːnsept]
n. 概念;观念

aspect
美[ˈæspekt]
n. 方面;样子

formulate
美[ˈfɔːrmjuleɪt]
vt. 构想出,规划

delve
美[dɛlv]
vi. 探究;挖掘

declaration
美[ˌdekləˈreɪʃn]
n. 公告,宣言

prototype
美[ˈproʊtətaɪp]
n. 原型
1.10 Summary

A computer system consists of hardware and systems software that cooperate
to run application programs. Information inside the computer is represented as
groups of bits that are interpreted in different ways, depending on the context.
Programs are translated by other programs into different forms, beginning as
ASCII text and then translated by compilers and linkers into binary executable
files.

consist
美[kənˈsɪst]
v. 由…组成;

cooperate
美[koʊˈɑːpəreɪt]
v. 协作;配合

represent
美[ˌreprɪˈzent]
v. 代表;象征

interpret
美[ɪnˈtɜːrprət]
v. 诠释;领会

本作品采用《CC 协议》,转载必须注明作者和本文链接
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!