What is a spinlock in Linux?In the spin lock method, the scheduler resumes the process every ~1 second to do its task (which is simply check the existence of a file). In the inotifywait example, the scheduler only resumes the process when the child process (inotifywait) exits. Inotifywait is also sleeping; the scheduler only resumes it when the inotify event happens.