In mathematics, Fibonacci numbers are the following sequence of numbers:
0, 1, 1, 2, 3, 5, 8, 13, …By definition, the first two Fibonacci numbers are 0 and 1, and each remaining number is the sum of the previous two. This naturally occurring sequence is useful for determining the amount of time to sleep whenever you are polling a resource.
I’m often required to poll a database resource in some sort of daemon. For example, check a table for some asynchronous tasks to complete. If you have a lot of threads polling this resource at quick intervals, the impact on the resource can be excessive/high. Rather than poll at a set interval, I use a Fibonacci sequence to determine what the next sleep interval will be. Following are code examples of this polling technique hosted on GitHub in my most commonly used programming languages…
Ruby
Perl
PHP
Essentially what each script does is the following …
Initialise a thread with a sleep interval of 5 seconds (or F5 in reference to the Fibonacci sequence number)
The thread will then:
1. Check if there is work to do by polling the resource
2. Complete any work and indicate if work has been done
3. If work has been done then next sleep interval will be 3 seconds (or F5-1)
4. If work has not been done then next sleep interval will be 8 seconds (or F5+1)
5. Sleep for the desired interval and loop
Enjoy!

I created a one program to generate a Fibonacci series in c language but don’t how the background process works but this is great information about languages like ruby and perl.