How the operating system works--------Linux Experiment II

Source: Internet
Author: User

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

    1. CD linuxkernel/linux-3. 9.4
    2. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.