operating system - Polling vs. Interrupts with slow/fast I/O devices -
i'm learning differences between polling , interrupts i/o in os class , 1 of things teacher mentioned speed of i/o device can make difference in method better. didn't follow on i've been wracking brain , can't figure out why. feel using interrupts better , don't see how speed of i/o device has it.
the advantage of polling comes when don't care every change occurs.
assume have real-time system measures temperature of vat of molten plastic used molding. let's device can measure resolution of 1/1000 of degree , can take new temperature every 1/10,000 of second.
however, need temperature every second , need know temperature within 1/10 of degree.
in kind of environment, polling device might preferable. make 1 polling request every second. if used interrupts, 10,000 interrupts second temperature moved +/- 1/1000 of degree.
polling used common i/o devices, such joysticks , pointing devices.
that said, there little need polling , has pretty gone away.
Comments
Post a Comment