The first chapter in-depth understanding of computer systems computer system roam second time

 

The second time reading this book, spend two to three hours a week of time, you can read how much to read (the first chapter see page 9)

The first pass the corresponding notes link  https://www.cnblogs.com/stone94/p/9787261.html

 

+ Context information is the bit, came to the throne and context can determine the content of information, bits not be divorced from context and represent some kind of precise information.

 

Compilation system by the preprocessor, compiler, assembler and linker composition

I think we can focus on memory compiler and assembler role

Compiler source code into assembler

The assembler assembler into binary executables

That is, the assembler is present as an intermediate result

Why there is a need to compile the program do? Interpretation set forth in the following:

"Assembly language is very useful because it provides a common output statements for different compilers different high-level language."

Combined with the actual project work, in fact, is the packaging and decoupling, for example, we have a system to customers, if the system is quite complex, so have re-development, then for each customer, will cause a lot of unnecessary waste

So we need to be divided into several parts, is typically provided with one or more intermediate results between source and target data, interfacing with the client part of the code that is custom code, customized according to different situations each client of development, this part of the customized development goal is to generate an intermediate result of a fixed format, and then read the intermediate results from the system that rarely change are processed to produce a final result, but no matter who the customer is, behind this part of the code do not have to repeat We developed it independently as long as the upgrade version, iteration can

 

"Understanding how the compiler work is a great advantage."

Here can be compared to the actual work using frames, the frame of the source code can not understand the details, but we have to know roughly how it works, so we use it, will be able to more efficiently use it, for us to let him provide better service

 

The concept of the word

Hardware system bus, are generally designed to transmit a fixed length block of bytes, i.e. word (Word), the number of bytes in a word (i.e., word length) is a basic system parameters, each system is different .

We often say 64-bit operating system and 32, respectively 4 and 8 word length.

 

Important principle of locality

Program has a tendency to visit the local area where the data and code, this idea is very important for the cache

 

Great speed between the processor, main memory and disk

Because of this difference, combined with the theoretical basis of the principle of locality, it leads to the concept of buffer

1, the difference between the processor and main memory Solution:

ps: "the processor reads data from the register file read from main memory is almost 100 times faster than"

So with L1, L2, L3, etc. cache hierarchy (L1 register with the same speed, L1 five times faster than L2, L2 faster than the main memory 5 to 10 times)

2, the difference between main memory and disk solutions:

ps: "overhead for the processor to read a word from the disk drive time overhead than read from the main memory is 1000 times"

Because disk I / O is too time-consuming, so when processing large amounts of data in the program, you should try to avoid disk I / O, it can not be avoided, but also the number of disk I / O is to find a way to reduce

So there indexing techniques (to minimize disk I / O) database, and so on Mysql do with Redis layer cache (to avoid disk I / O to avoid)

 

doubt:

1, Java bytecode program What is the difference here with the assembler?

2, JVM has nothing linker and the like?

3, the difference between the controller and adapter?

4, memory, and disk I / O, the CPU does not require participation, because of the direct memory access (DMA) techniques (mentioned book on page 8 of this technique) it?

 

Guess you like

Origin www.cnblogs.com/stone94/p/11441993.html