Originally posted by F.Ultra
View Post
Some of the hints in the other direction could operate on the basis of a high-resolution timestamp indicating the beginning of the timeslice. I'm sure the kernel already has this information, so it just needs to put it where userspace can read it. Then, subtract it off the current vaule of the TSC register and you can tell how deep you are into the timeslice. Of course, there's the potential for an interrupt to come along and invalidate your calculations, but that should be rare.
Comment