As far as I know, PS/2 keyboards are interrupt driven, while USB are polled. Typically a PS/2 keyboard was assigned IRQ_1 on Windows.
I'm no hardware expert, but at a first glance seems like the PS/2 keyboards are more efficient. So here are my questions:
- On modern day computers, are PS/2 keyboard better (or faster), and if so, would it be noticeable at all? (e.g.: in gaming)
- Since they don't need polling, do PS/2 keyboards save energy compared to USB? (notice I'm not talking only about the peripheral here, but about the overall computer energy consumption).
- In case PS/2 had any advantage over USB, would adding a PS/2 adapter to my USB keyboard make the device as good as an actual PS/2 keyboard? Conversely, would adding a USB adapter to a PS/2 make it as bad as a USB KB?
Thanks in advance.
Edit: I'll explain #2:
USB needs active polling. So the CPU must dedicate some of its cycles to scan for keypresses, meaning that the number of cycles available for other tasks is lower. This can cause the CPU frequency to rise, hence the power consumption would be higher. An interesting case: Let's say we put two identical computers side to side, one using a PS/2 keyboard and the other using a USB keyboard of the same model, and we keep them switched on for a whole day. If we only press a single key during the day, the amount of CPU time the PS/2 keyboard has required is much lower that the USB counterpart. So in a CPU with an extreme dynamic frequency scaling, the USB KB would have required more power overall. Also, USB protocol needs to manage several devices, I guess this management makes processing a USB keypress computationally more expensive that the dedicated IRQ in case of PS/2 keyboards. These are the kind of considerations I was asking in #2, taking into account the PC as a whole, and not only how much does the KB suck from the 5V input.
Seems that the polling thing is only up to USB 2.0, and according to Wikipedia, USB 3.0 gets rid of polling:
improved bus utilization – a new feature is added (using packets NRDY and ERDY) to let a device asynchronously notify the host of its readiness (no need of polling)
(USB 3.0 keyboards are rare as of today. I only know about a Gigabyte KB showcased this year at Computex, and I doubt it uses USB 3.0 to get rid of polling, but instead to provide a USB 3.0 hub right on the keyboard).
I'm also trying to find hard data on what is the polling rate for a USB KB. Some people says 125 Hz, and there are some tweaks up to 1kHz. By comparison, consoles like PS3 poll at 100 Hz, and XBox at 125 Hz. Even if 1KHz were the case, it seems negligible on a GHz CPU (0,000001 % of CPU cycles/second). These numbers lead to another question: for gaming purposes, how better (if any) would be for a PS/2 KB to generate 1k interrupts per second?