Review Operating System 2 (logical structure of the operating system)

Source: Internet
Author: User

1. Concepts of operating system virtual machines

Running the operating system on bare metal is called an operating system virtual machine.

2 processor state: core State, tube state, user State, Mutual Difference

Core State: the State of the processor Operation Management Program

Use all commands (including privileged commands)

Use all buckets

Tube state: the tube state has a lower priority than the core state, but can use some system resources that are not available in the user State, but cannot use commands that modify the CPU status.

When no kernel state is available, the entire core state function is used.

User State: the state in which the user program is executed. Privileged commands are not allowed and only accessible to the storage area of the user program.

3. Concept of Interruption: definition and type

When an event is interrupted, the system terminates the program that is running. The program that processes the event is triggered to process the event. After the event is processed, the system returns the breakpoint and continues executing the event.

Interrupt type:

By Function

Input/Output interruption: the interruption that occurs when the external device or channel ends normally or when an error occurs (I/O transmission ends and an error occurs)

External interruption: interruption caused by external non-channels (clock interruption, user console interruption, communication interruption)

Machine Fault interruption: for example, power supply, primary access command Error

Procedural interruptions: errors of the program nature, or errors in some specific States (floating point overflow, use of core commands in user mode, out-of-bounds, illegal operations)

Access Management interruption (interruption caused by a certain requirement raised by the operating system)

4 Definition and essence of interrupt response

When the central processor finds that there is an interrupted request, it aborts the running program execution and automatically leads to the process of interrupting the processing program.

Interrupt response process: preserve program breakpoint and processor Information

Automatically transfer to the corresponding interrupt handler

Essence of interrupt response

Switch command address and processor status information

5. interrupt handling process

After the hardware is interrupted, it is switched to the interrupt processing program to process the software interruption. This process mainly involves three tasks:

1. Protect the site and transmit Parameters

2. Execute the corresponding interrupt (self-trapping) processing program.

3. Restore and exit

Interrupt into the PC and PS of the hardware protection program interrupted

Interrupt Processing protects the value and other status information of each register

6. Concept of vector interrupt

When an interruption occurs, the interrupt source directs the processor to interrupt the service program.

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.