ULK --- Chap 4: Interrupts and Exceptions

An interrupt is usually defined as an event that alters the sequence of instructions executed by a

processor. Such events correspond to electrical signals generated by hardware circuits both inside

and outside chip.

Interrupts are often divided into synchronous and asynchronous intertupts:

Synchronous interrupts are produced by the CPU control unit while executing instructions and are

called synchronous because the control unit issues them only after terminating the execution of an

instruction.

Asynchronous interrupts are generated by other hardware devices at arbitrary times with respect to

the CPU clock signals.

Intel microprocessor manuals designate synchronous and asynchronous interrupts as exceptions and

interrupts, respectively. We will adopt this classification, although we will occasionally use the term

"interrupt signal" to designate both types of together.

Interrupts are issued by interval timers and I/O devices; for instance, the arrival of a keystroke from

a user sets off an interrupt.

Exceptions, on the other hand, are caused either by programming errors or by anomalous conditions

that must be handled by the kernel. In the first case, the kernel handles the exception by delivering

to the current process one of the signals familiar to every UNIX programmer. In the second case, the

kernel performs all the steps needed to recover from the anomalous condition, such as page fault or

a request --- via an assembly language instruction such as int or sysenter --- for a kernel service.

We start by describing in the next section the motivation for introducing such signals. We then show

how the well-known IRQs (Interrupt ReQusts) issued by I/O devices give rise to interrupts, and we

detail how 80x86 processors handle interrupts and exceptions at the hardware level. Then we illustrate

, in the section "Initializing the Interrupt Descriptor Table", how Linux initializes all the data structures

required by the 80x86 interrupt architecture. The remaining three sections describe how Linux handles

interrupt signals at the software level.

One word of caution before moving on: in this chapter, we cover only "classic" interrupts common to

all PCs; we do not cover the nonstandard interrupts of some architectures.

                    The Role of Interrupt Signals

时间: 2024-10-13 06:51:03

ULK --- Chap 4: Interrupts and Exceptions的相关文章

ULK --- Chap 4: Interrupts and Exceptions (Note)

The Intel documentation classifies interrupts and exceptions as follows: 1. Interrupts: Maskable interrupts: All Interrupt ReQuests (IRQs) issued by I/O devices give rise to maksable interrupts. A maskable interrupt can be in two states: maksed or un

ULK --- Chap 4: Softirqs and Tasklets (Note)

We mentioned earlier in the section "Interrupt Handling" that several tasks among those executed by the kernel are not critical: they can be deferred for along period of time, if necessary. Remember that the interrupt service routines of an inte

ULK --- Chap 4: Tasklets (Note)

Tasklets are the preferred way to implement deferrable functions in I/O drivers. As already explained, tasklets are built on top of two softirqs named HI_SOFTIRQ and TASKLET_SOFTIRQ. Several tasklets may be associated with the same softirq, each task

Linux Kernel - Debug Guide (Linux内核调试指南 )

http://blog.csdn.net/blizmax6/article/details/6747601 linux内核调试指南 一些前言 作者前言 知识从哪里来 为什么撰写本文档 为什么需要汇编级调试 ***第一部分:基础知识*** 总纲:内核世界的陷阱 源码阅读的陷阱 代码调试的陷阱 原理理解的陷阱 建立调试环境 发行版的选择和安装 安装交叉编译工具 bin工具集的使用 qemu的使用 initrd.img的原理与制作 x86虚拟调试环境的建立 arm虚拟调试环境的建立 arm开发板调试环

MIT 6.828 JOS学习笔记17. Lab 3.1 Part A User Environments

Introduction 在这个实验中,我们将实现操作系统的一些基本功能,来实现用户环境下的进程的正常运行.你将会加强JOS内核的功能,为它增添一些重要的数据结构,用来记录用户进程环境的一些信息:创建一个单一的用户环境,并且加载一个程序运行它.你也可以让JOS内核能够完成用户环境所作出的任何系统调用,以及处理用户环境产生的各种异常. Part A: User Environments and Exception Handling 新包含的文件inc/env.h里面包含了JOS内核的有关用户环境(

MIT 操作系统实验 MIT JOS lab3

MIT JOS lab3 Allocating the Environments Array In lab 2, you allocated memory in  mem_init()  for the  pages[]  array, which is a table the kernel uses to keep track of which pages are free and which are not. You will now need to modify  mem_init()  

[蓝牙] 5、Battery Service module

Detailed Description This module implements the Battery Service with the Battery Level characteristic. During initialization it adds the Battery Service and Battery Level characteristic to the BLE stack database. Optionally随意地 it can also add a Repor

Maintaining processor resources during architectural events

In one embodiment of the present invention, a method includes switching between a first address space and a second address space, determining if the second address space exists in a list of address spaces; and maintaining entries of the first address

linux内核调试指南

linux内核调试指南 一些前言 作者前言 知识从哪里来 为什么撰写本文档 为什么需要汇编级调试 ***第一部分:基础知识*** 总纲:内核世界的陷阱 源码阅读的陷阱 代码调试的陷阱 原理理解的陷阱 建立调试环境 发行版的选择和安装 安装交叉编译工具 bin工具集的使用 qemu的使用 initrd.img的原理与制作 x86虚拟调试环境的建立 arm虚拟调试环境的建立 arm开发板调试环境的建立 gdb基础 基本命令 gdb之gui gdb技巧 gdb宏 汇编基础--X86篇 用户手册 AT&