Through the first week of Learning: "Linux kernel Analysis" MOOC course http://mooc.study.163.com/course/USTC-1000029000
How does a computer work? (Zhu Hengzhi)
First: Understand what a von Neumann structure is.
1) The use of a single processing unit to complete the calculation, storage and communication work.
2) The storage unit is a fixed-length linear organization.
3) The unit of storage space is addressed directly.
4) Use the low-level machine language, instruction through the operation code to complete the simple operation.
5) centralized sequential control of the calculations.
6) The computer hardware system is composed of five components of the arithmetic, memory, controller, input device and output device, and stipulates their basic functions.
7) Use binary form to represent data and instructions.
8) The program and data must be loaded into the main memory from the external memory when executing the program and processing the data, and then the computer can automatically remove the instruction from the memory and execute it when it is working.
Next, the Experiment section:(The following command is for the lab building 64-bit Linux virtual machine environment, 32-bit Linux environment may be slightly different)
Use
- Gcc–s–o main.s Main.c-m32
Commands compiled into assembly code
- int g (int x)
- {
- return x + 3;
- }
- int f (int x)
- {
- return g (x);
- }
- int main (void)
- {
- return F (5) + 1;
- }
Experiment:
The conduct of computer work