Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
irq handling in hardware, how do they work?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Tue Jan 08, 2013 1:12 pm    Post subject: irq handling in hardware, how do they work? Reply with quote

hi,

At which frequency does the irq part of the hardware operate? What controls it? I sounds wierd that devices should have to WAIT to process their job.

irq turns on and off serialy for each device signal? There can't be lanes permanetly connected to the cpu for an un-interrupted communication?

It just sounds odd.

In the case of sound card, if there's a song playing it means that X bits are transfered from/to the sound card until another device interrupts the sound card, then the sound card picks up again? If so, a long song is never played continuously but chopped up along the way and re-assembled somewhere else.

How is possible to watch movies and and listen smoothly if there are interrupts? Why don't we see and listen movies and sound with interruptions?

thanks

(or it's all magic?)
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Tue Jan 08, 2013 1:35 pm    Post subject: Re: irq handling in hardware, how do they work? Reply with quote

_______0 wrote:
(or it's all magic?)

Yes it is ! :twisted:

OK then, more seriously there are different kinds of interrupts. So there cannot be a unique answer to each one of your questions apart from : "It depends"

_______0 wrote:
At which frequency does the irq part of the hardware operate?

Apart from timer related interrupts, there is nothing such as a given frequency of interrupts.
Interrupts occur when events occur. If the event is periodic then the interrupt will be generated at the same period; if the event is not periodic then so will be the interrupt.
_______0 wrote:
I sounds wierd that devices should have to WAIT to process their job.

In the vast majority of the times, devices do not wait to process their job. Devices are generally considerably slower than the CPU of the system. The concept of interrupt has been invented so that the CPU does not have to wait for a device to process its job.
_______0 wrote:
In the case of sound card, if there's a song playing it means that X bits are transfered from/to the sound card until another device interrupts the sound card

Formally speaking no other device will interrupt the sound card. Another device may interrupt the CPU which was busy with the sound card and require the CPU for something else if the priority of the interrupt is higher than the priority of the sound card interrupt.
_______0 wrote:
If so, a long song is never played continuously but chopped up along the way and re-assembled somewhere else.

Seen from the CPU, yes, you are correct, the CPU will not manage the whole sound file in a single go. Seen from the CPU, the sound file will be chopped.
But not necessarily seen from the sound card itself... if... the CPU is fast enough, not that much loaded and not that much interrupted by higher priority interrupts. And more surely depending on the size of...
_______0 wrote:
How is possible to watch movies and and listen smoothly if there are interrupts? Why don't we see and listen movies and sound with interruptions?

... Buffers !
Devices get input and output buffers (RAM) that the CPU writes or reads following its own pace and that the device reads or writes following its own pace.
If these buffers are undersized, you might well get your movies / sound interrupted depending on the load of the CPU.
_________________
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Jan 08, 2013 4:05 pm    Post subject: Re: irq handling in hardware, how do they work? Reply with quote

_______0 wrote:
How is possible to watch movies and and listen smoothly if there are interrupts?

Because the CPU is fast enough to do it all. Especially if the GPU is helping out with the video decoding via e.g. VDPAU.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum