2009年11月5日星期四

terms--trap,exception,system call,interrupt

From "Art of Assembly"

Trap: Denote a programmer initiated and expected transfer of control to a special handler routine.In many respects, a trap is nothing more than a specialized subroutine call. Many texts refer to traps as software interrupts.

exception: Exceptions are illegal program actions that generate an interrupt. Examples of illegal programs actions include divide by zero, attempt to access memory outside segment bounds, and so on.

system call: With a system call a user program can ask for an operating system service.System calls provide the interface between a process and the operating system.

Interrupt: Interrupts are generated by hardware devices that need attention of the operating system. For example, a clock chip may generate an interrupt every 100 msec to allow the kernel to implement time sharing. As another example, when the disk has read a block from disk, it generates an interrupt to alert the operating system that the block is ready to be retrieved.

没有评论:

发表评论