CSAPP - Chapter 1 Notes

Chapter 1 Roaming Computer Systems


Amdahl's Law

When we speed up a part of the system, its effect on the overall performance of the system depends on the importance of that part and the degree of acceleration. If the system takes time to execute an application T O l d . Assume that the ratio of the execution time required for a part of the system to that time is a , and the performance improvement ratio of this part is k . That is, the initial time required for this part is a T O l d , now the required time is ( a T O l d ) / k . Therefore, the total execution time should be

T n e w = ( 1 a ) T O l d + ( a T O l d ) / k = T O l d [ ( 1 a ) + a / k ]

From this, the speedup can be calculated S = T O l d / T n e w for

S = 1 ( 1 a ) + a / k

The main point of Amdahl's law - to significantly speed up the entire system, you must increase the speed of a significant portion of the entire system.


Concurrency and Parallelism

thread-level concurrency

Traditionally, this kind of concurrent execution was only simulated , by having a computer switch rapidly between the processes it was executing, as if a juggler kept multiple balls flying in the air.
Hyper-threading, sometimes referred to as simultaneous multi-threading, is a technology that allows a single CPU to execute multiple control flows.

instruction level parallelism

At a lower level of abstraction, the property that modern processors can execute multiple instructions simultaneously is called instruction-level parallelism .
If a processor can achieve a faster execution rate than one instruction per cycle, it is called a super -scalar processor. Most modern processors support superscalar operations. When programmers can write program code with a higher degree of instruction-level parallelism, programs run faster.

Single instruction, multiple data parallelism

At the lowest level, many modern processors have special hardware that allows a single instruction to produce multiple operations that can be executed in parallel, in a way called single-instruction, multiple-data , or SIMD parallelism. For example, newer generations of Intel and AMD processors have instructions to add 8 pairs of single-precision floating point numbers (C data type float) in parallel.
Most of these SIMD instructions are provided to improve the execution speed of applications that process image, audio, and video data.


The importance of abstraction in computer systems

A file is an abstraction of I/O devices, virtual memory is an abstraction of program memory, and a process is an abstraction of a running program. A virtual machine , on the other hand, provides an abstraction of the entire computer, including the operating system, processor, and programs.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325726556&siteId=291194637