nathan
nathan

Reputation: 854

why we need Interrupt Handling

I am learning LDD3. Chatper Interrupt Handling. And wanna double check my understanding, also have question about logic relationship of the statement

1.Although some devices can be controlled using nothing but their I/O regions(char driver is the example, right??),

2.most real devices are a bit more complicated than that. Devices have to deal with the external world, which often includes things such as spinning disks, moving tape, wires to distant places, and so on.(understood)

3.Much has to be done in a time frame that is different from, and far slower than, that of the processor.

4.Since it is almost always undesirable to have the processor wait on external events, there must be a way for a device to let the processor know when something has happened.

is the author trying to say because of both 3rd condition and 4th condition, then we use interrupt handler?? I always thought just 4th condition can lead to interrupt handling. Does 3rd condition really matter here??

Thanks

Upvotes: 0

Views: 67

Answers (2)

Scott Hunter
Scott Hunter

Reputation: 49920

If the device were much faster than the processor, then #4 wouldn't be an issue.

Upvotes: 1

Rob
Rob

Reputation: 15168

They are related. I would have phrased as "much can be done". A processor can go and handle a multitude of tasks when waiting for a response from some external device if that device is a spinning disk or I/O response or other mechanical thing.

Upvotes: 2

Related Questions