0

I've read a few posts on how sleep works at the system level in Linux but I couldn't find whether or not the system determines the time to wake by creating a second/millisecond counter or by noting a time in the future to resume.

*This came about while working on a VM and saving its state while a process was sleeping. When told to wait for a certain amount of time, the time while the VM was saved did not count... so I'm guessing a counter of some sort is implemented.

If there is any differences or special cases for Python, Ruby, Java or C (i.e. they don't use the same system calls) please make a note of this in your answer.

user8897013
  • 443
  • 4
  • 15
  • 1
    Possible duplicate of [How is sleep implemented at the OS level?](https://stackoverflow.com/questions/1719071/how-is-sleep-implemented-at-the-os-level) – mik1904 Jun 27 '19 at 11:26
  • Thanks. Probably more a duplicate of this one: https://stackoverflow.com/questions/427808/what-is-the-effect-of-changing-system-time-on-sleeping-threads?rq=1. However, when searching for my original question I didn't see this even in the question title suggestions (until it was linked to my question). – user8897013 Jul 02 '19 at 20:36

0 Answers0