"深入解析Linux内核源代码:中断处理程序与内核同步"

3 下载量 170 浏览量 更新于2023-12-23 收藏 170KB PPT 举报
The Linux kernel source code analysis interrupt handler and kernel synchronization ppt courseware.ppt; LINUX Interrupt Handler and Kernel Synchronization PPT Courseware.ppt; LINUX Interrupt Handler and Kernel Synchronization• System call and interrupt (review of previous lesson)• The upper and lower half mechanism of interrupt handling program• Lower half processing mechanism in LINUX• Classic synchronization problems• Implementation of kernel synchronization in LINUX• Experimental problem solving1 System calls and interrupts (review of previous lesson)• Principles of system calls• INT 80H• Interrupt descriptor (80H points to system_call)• System call table (system_call_table)• System call number (position of system call in the system call table)• Interrupts• Interrupt descriptors• Interrupt numbers• Interrupt handling program2 The upper and lower half mechanism of interrupt handling program• Why interrupt handling program needs to be divided into upper and lower halves – Interrupt handling program is executed asynchronously and may interrupt the execution of important operations, so the faster the better – Interrupt handling program masks other interrupts, so the faster the better – Interrupt handling program often needs to operate hardware, usually with high time constraints – Interrupt handling program does not run in the context of the process, so it cannot be blocked. In summary, the interrupt handling program must execute quickly, otherwise it will affect concurrency; the interrupt handling program must mask other interrupts at certain times. Some operations that must mask interrupts are placed in the upper half, and some operations that can be interrupted are placed in the lower half. This is the upper and lower half mechanism of interrupt handling in the operating system. (Example of network communication)3 How to separate the upper and lower halves • If a task is very sensitive to time, ..."