Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm gonna sketch my understanding of both. I've googled around but i'm not sure about my knowledge. Please correct me!

Hardware interrupt is generated by the operation system event scheduler to reassign the cpu time for another process. Is this true?

Software interrupt can be generated from a running program who wants for example to read a file, and for that we need to reassign the cpu for the appropriate operation system call. Is this true?

Is there other kind of software/hardware interrupts?

share|improve this question

closed as off topic by Tom O'Connor, Iain, mfinni, David Schwartz, Ward Nov 17 '11 at 18:07

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

Hardware and software interrupts primarily differ by how they're generated: hardware interrupts are generated by hardware, e.g. a timer, keyboard, network card etc while software interrupts are triggered by a special software instruction (e.g. int 0x80). There is also a related difference in their role: hardware interrupt handlers are supposed to handle hardware events (e.g. a packet arriving on a network interface) while software handlers are supposed to serve another piece of software, usually an application, which executed the interrupt instruction (e.g. in order to request the kernel to access a file on application's behalf).

Timer interrupt is indeed used by operating system's scheduler to periodically regain control and perform various operations (e.g. resource accounting, context switches).

Generating a software interrupt is one way of communicating with the kernel and may be used on some platforms to invoke system calls.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.