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 not a hardware expert, but at a first glance it 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? ( ..: 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?
2 in more detail:
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 keyboard would have required more power overall. Also, the USB protocol needs to manage several devices, and 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 keyboard suck from the 5 V input.
It 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 keyboard 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 1 kHz. By comparison, consoles like PS3 poll at 100 Hz, and XBox at 125 Hz. Even if 1 KHz 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 keyboard to generate 1,000 interrupts per second?