- Nan Qiao, North Bridge
- 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6C/B7/wKiom1VQbKGCT7BwAAFO2-e7nEI605.jpg "/>
- The reason for the cache: because the CPU and memory speed is not coordinated, for example, the CPU to 10 times the amount of time spent in the data, the memory is given once (old bull pull train); So in order to coordinate, the computer began a compromise process, there is a cache, the speed of the cache between the two, and the concept of N-level For example, Level 1 cache speed >2 cache >3 level cache > Memory.
- The program follows the principle of locality
- Time: May be accessed multiple times, so put it in memory for a while
- Space: Data that is very close to the access data can also be accessed, so pull it together into memory
- Locality of
- Program compatibility (porting)
- because the underlying chip is different, binary programming (machine language) may vary, but because the computer runs and depends on the chip, so in order to speed up
- There is assembly language, assembly language compiled into machine language by the compiler, But because the assembly language is also different according to the company, in order to develop a convenient
- has a high-level language, combined with additional mechanisms to make up for different chips, so that the upper layer need to care about the underlying hardware
- to achieve the convenience of development
- 650) This . width=650; "src=" http://s3.51cto.com/wyfs02/M01/6C/B2/wKioL1VQbhuSt0QcAABQR5bSPVw439.jpg "/>
- The intermediary device is the so-called library, it is used to bridge the underlying hardware is different, is a bunch of unique programs
- general programs have execution portals, such as C:main,java: public static class
- but the library is no portal, it needs to be called by other, not independent execution , just provide the calling interface;
- Why does the computer appear to be executing in parallel (in layman's terms it opens multiple software at the same time)?
- Time slices, constant alternating (CPU)
- Memory cutting, how to know which section to access? So there's the address.
- How do you know how big the memory is? For convenience, programmers do not need to consider how much space when writing programs, because the reference to the virtual address space, can be directly regardless of physical memory, such as 32-bit host, then in the programmer's eyes, it has 2 of the memory 32 of the size, of course, in reality, the maximum physical memory is determined by the bus width.
- What if a job suddenly appears to occupy the time slice?
- In order to avoid this embarrassing situation, so there is the OS, it is used to coordinate and manage the hardware resources, it monitors the CPU working time, cut into several pieces, memory how many segments, to different programs, and responsible for a program start, terminate the switch work, run the program called a process, is a life cycle.
- Operating system interfaces: System calls
- With the OS, no program can directly deal with the hardware, all through the coordination of the OS, the equivalent of it is the boss.
- The approximate structure of the computer
- 650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6C/B7/wKiom1VQbKKQ6CXwAAHGxYr4-Nw493.jpg "/>
Computer's little knowledge point (Mess)