1

What are the differences between clock and I/O interrupts?

As I understand it a clock interrupt uses the system clock for interrupting the CPU and an I/O interrupt is sent to the CPU based off of program input or output completion. This was helpful in understanding interrupts in general, but I'm trying to compare these two kinds.

edit: In a multiprogramming context, using a uniprocessor (to make things simple)

Community
  • 1
  • 1
broinjc
  • 2,619
  • 4
  • 28
  • 44

2 Answers2

3

Timer/clock interrupts are often used for scheduling. These interrupts invoke the scheduler and it may switch the currently executing thread/process to another by saving the current context and loading another one.

Other than the purpose, an interrupt is an interrupt.

Alexey Frunze
  • 61,140
  • 12
  • 83
  • 180
0

The main purpose of clock interrupt is to help out in what we call it "Multitasking". It deceives us and make us to think that internally parallel working is going on (Means many applications are running at the same time).But in reality it's not.Clock sends interrupt after a specified fraction of second,depends on system speed, to the processor to terminate it's current thread, save its address and data to stake and hold the application of which interrupt is sent. i hope this will help you.

Zohaib
  • 1