3 ms·
But, if you have an upper bound on the time of the operation, you can wait until the bound elapses, so that your operation always takes that long.
by robryk 12y ago
But, if you have an upper bound on the time of the operation, you can wait until the bound elapses, so that your operation always takes that long.
- TheLoneWolfling 12y agoThe problem is: good luck getting an upper bound. What happens if the process is paged to disk, for instance? No matter what upper bound you set you'll still end up with it going over at some point - and as soon as you go over the upper limit you're leaking timing information again. This also ups RAM requirements, drastically in some cases. And it isn't even necessarily secure against timing attacks! Because the thread scheduling by the OS changes depending on how much work is being done, and so it could take less or more time to retrieve the saved response depending on how long another request takes to process.