1. How does a von Neumann computer work?
cup (calculator + controller + register) <-----> memory (machine code) <-------> input and output devices
2. How to solve the problem of speed matching in the computer now?
Ride a donkey cart vs ride a rocket
cup 0.3ns 1s
DRAM 120ns 6min
Rotational disk 1-10ns 1-12month
internet 181ms 19years
Solution: Improve other device configuration ---> Impossible temporarily
Solution: then increase the utilization of the cpu and keep the cpu busy
- Synchronous Asynchronous
- Sequential - concurrent
- Multi-core, parallel three cpu parallel
- Increase the middle layer - cache For example, the cpu has register L0, the chip has register L1L2, and then the memory L3
3. Do you know what happens when the power is pressed?
- Mainboard power supply
- Tell the cpu to start restart
- cup finds a specific memory address, here is a jump instruction to jump to the system BIOS startup code
- Read the MBR code to start the self-check. If there is a problem, there will be beeps of different frequencies. If there is no problem, the startup is successful.
- The first 446 in the MBR is loading, the middle 64 is the partition, and the active partition can be installed in the system. The last two bytes are the system status code.
4. The life of Hello World
- After the program is written, the JVM compiles and generates a binary machine instruction file, which is stored on the hard disk
- Run the program, the operating system puts the hello world from the hard disk in the memory
- The cpu starts to execute the machine language instructions in the main program
- Machine language instructions move "hello world" from memory to registers
- Machine language instructions copy the register data to the display for display