Skip to content

Ask HN: How OS processes mouse events?

2 pointslangsamer1 comment
On HN

I'm curious about a question that came up in my OS class. I understand that a device interrupt schedules an event in an event loop that is then handled by the application or window server. How does this work for mouse move events? Does an event get fired for every mouse-move event? If so, doesn't moving the mouse continuously prevent other interrupts from being fired or does it all happen so fast that it's not noticeable by the human eye.

I realize this is a very trivial question, but I figured this would be the best community to ask. Thanks for your help!

Comments

A typical USB mouse sends 125 events per second and each one probably only takes a few microseconds to process, so there's plenty of time for the computer to do other work.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.