How does the operating system work?
20135108 li Zeyuan "linux kernel Analysis" MOOC course http://mooc.study.163.com/course/USTC-1000029000
Mykernel Experimental Guidance (how the operating system works)
Run and analyze a streamlined operating system kernel to understand how the operating system works
Open the shell with a virtual machine in the lab building
- CD linuxkernel/linux-3. 9.4
- Qemu-kernel Arch/x86/boot/bzimage
Then CD Mykernel you can see the contents of the Qemu window output code MYMAIN.C and myinterrupt.c
In the experimental building set up a system to open running Mykernel due to the operation of QEMU into Qume appeared a small error should not appear
To perform My_start_kernel and My_timer_handler code run results
Enter Mykernel to see MYINTERRRUPT.C and mymain.c File open these two files respectively
Execution of the My_start_kernel operating system entry execution operating system there is a cycle of 100,000 prints per cycle a my_start_kernel here if you change the value of the list to a little slower because the CPU is now fast
Each clock interrupt is called once PRINTK print My_timer_handler here
The basic principle of computer is stored program and program control. A sequence of instructions (called a program) and raw data that directs the operation of the computer in advance is delivered to the computer's memory via the input device. Each instruction explicitly specifies which address the computer takes from, what to do, and what address to send to.
When the computer is running, the first instruction is removed from the memory, and the decoding of the controller, according to the requirement of the instruction, takes the data from the memory to perform the processing of the specified arithmetic and logic operation, and then sends the result to the memory by the address. Next, take out the second instruction and complete the specified operation under the command of the controller. Proceed accordingly. Until a stop command is encountered.
How the operating system works--------Linux Experiment II