This is a problem that appeared with Vista and I see that it is also there in Windows 7. It looks like, if you connect it for an extended period of time (a couple of hours), Windows "will take possession" of the drive. I don't know what exactly is running on it though.
Desactivating the ReadyBoost service can help and, if there is a defragment service it can help too.
When it happens to me, even if I would make sure everything is closed (even an explorer) and loging off and come back on, it wouldn't do it. I had to reboot to be able to eject. Also, this far, instead of rebooting, why not close it and remove it (USB drive) while the PC is off and then turning on the PC again? Simply EXTREMELY annoying.