From: FredK on

"yoxoman" <invalid(a)invalid.invalid> wrote in message
news:4bec45fb$0$15518$426a74cc(a)news.free.fr...
> On Thu, 13 May 2010 09:09:21 -0400, FredK wrote:
>
>> [...] Unless you are spinning on a register (tying up a CPU) [...]
>
> OK. And does that happen in real life today ?
>
>
> Thank you for your answer.
>
>

No.


From: FredK on

"FredK" <fred.nospam(a)dec.com> wrote in message
news:hshhci$pv$1(a)usenet01.boi.hp.com...
>
> "yoxoman" <invalid(a)invalid.invalid> wrote in message
> news:4bec45fb$0$15518$426a74cc(a)news.free.fr...
>> On Thu, 13 May 2010 09:09:21 -0400, FredK wrote:
>>
>>> [...] Unless you are spinning on a register (tying up a CPU) [...]
>>
>> OK. And does that happen in real life today ?
>>
>>
>> Thank you for your answer.
>>
>>
>
> No.
>

Let me qualify that "no". Spinning on a register is not unusual when
waiting for some register state change that the driver writer thinks will
happen in some short finite amount of time. Usually such a spin will have
some type of count or time based exit. But no driver would ever hard spin
as the natural state of waiting for the an event that will happen randomly
(or an undefined amount of time) in the future.



From: mac on
> Are there still devices today on which polling is used (I think of
> keyboard and mouse, but I'm not sure) ? Are the both techniques used
> on some devices ? Does it depend on the OS ?

Lots of embedded systems use polling. A typical embedded system running
a static set of software won't have anything else to do while waiting.
Small CPUs are cheap.

Think of the keypress interface on your television remote control.

--
mac the naïf
From: Peter Dickerson on
"mac" <alex.colvin(a)valley.net> wrote in message
news:532764736296418297.185930alex.colvin-valley.net(a)news.eternal-september.org...
>> Are there still devices today on which polling is used (I think of
>> keyboard and mouse, but I'm not sure) ? Are the both techniques used
>> on some devices ? Does it depend on the OS ?
>
> Lots of embedded systems use polling. A typical embedded system running
> a static set of software won't have anything else to do while waiting.
> Small CPUs are cheap.
>
> Think of the keypress interface on your television remote control.

I don't think that's a good example. It very unlikely that a TV remote uses
polling of the keyboard on power consumption grounds. Much more likely is
the edges wake the CPU (if there is one) which might provoke scanning poll.

Peter


From: Tim McCaffrey on
In article <htghhn$neq$1(a)news.eternal-september.org>,
first.last(a)tiscali.invalid says...
>
>"mac" <alex.colvin(a)valley.net> wrote in message
>news:532764736296418297.185930alex.colvin-valley.net(a)news.eternal-september.o
rg...
>>> Are there still devices today on which polling is used (I think of
>>> keyboard and mouse, but I'm not sure) ? Are the both techniques used
>>> on some devices ? Does it depend on the OS ?
>>
>> Lots of embedded systems use polling. A typical embedded system running
>> a static set of software won't have anything else to do while waiting.
>> Small CPUs are cheap.
>>
>> Think of the keypress interface on your television remote control.
>
>I don't think that's a good example. It very unlikely that a TV remote uses
>polling of the keyboard on power consumption grounds. Much more likely is
>the edges wake the CPU (if there is one) which might provoke scanning poll.
>

There is a bit of future shock with modern embedded systems. I've worked on a
I/O board that offloaded Disk & Network I/O, handled Gigabit speeds on the
network (with a complete TCP/IP stack) & 4G Fiber channel, and it didn't
(really) use interrupts. All with a single 800 Mhz MIPS processor.

Well, they were there, but it would have been more efficient just to use
polling (the interrupts just kicked started the poll, more or less), but I
couldn't convince the PTW to make the switch. All the real processing on the
system was done with the interrupts disabled.

- Tim