Operating system and device interaction

1. System call: the application actively sends a service request to the operating system (from the application)
2. Exception: illegal instruction or other bad processing status (from the bad application)
3. Interrupt: from different hardware devices Timers and network interrupts (from peripherals)
4. When the computer is running, the kernel is a trusted third party, and only the kernel can execute privileged instructions, in order to facilitate the application

5. Sources of the three:
*Interrupt: Peripheral
*Exception: Unexpected behavior of the application
*System call: The application requests an operation to provide services
6. Processing time:
*Interrupt: Asynchronous (I don't know when the interrupt request will be) Occurs)
*Exception: Synchronous (when the program execution error reaches the specified step, it can be predicted)
*System call: Asynchronous or synchronous (for example, a system call makes a request (memory call, etc.) The return time may be asynchronous or may be Synchronous)
7. Response:
*Interruption: continuous, transparent to the user application
*kill or re-execute unexpected application instructions
*system call: wait and continue

Guess you like

Origin blog.csdn.net/Vodka688/article/details/113883819