Disclaimer: Though this article is based on religious scripture, it is not intended to hurt any religious beliefs and feeling knowingly or unknowigly.
Genesis 2:2 tells us that God rested on the Seventh day from his work. A similar concept of day and night, corresponding to the periods of activity and rest, is described in Manusmriti (1:65) ("रात्रि: स्वप्नाय भूतानां चेष्टायै कर्मणामह:"). Manusmriti goes a step further and describes the cycles of day and night for various beings like देव (gods), पितर (departed souls) and मनुष्य (human beings). Human being are weak. They are susceptible to fatigue. So it is expected that they will need a rest between two periods of activity. But gods are all strong, possess all kinds of powers, and are capable of doing almost anything. Why do they need a period of rest? Why can't they go on and on? Most surprisingly, God the Lord, almighty as well needs a period of rest. WHY? The question had been bugging me for quite some time.
One of my previous blogs answers this to some extent. During the period of activity, beings create garbage in order to increase efficiency. The period of rest is required to clean this garbage up. But gods or God possess such capabilities that they should be able to work without creating any garbage, I believed. Whether or not that is true, the question still remains.
One of my recent experiments has the answer to that question, I think. We have a single producer multiple consumer system which looks something like below (Fig. 1). Each consumer consumes a W and produces an L and sends it off to another system. Consumer cycles between periods of activity (produce and send L) and in-activity (wait for producer to produce W).
The process to convert W to L is same and once an L is available its copies can be reproduced easily. We wanted to change the system by introducing a Consumer-Producer which will consume W and produce L as seen in Fig.2 and Fig.3. It was expected that the modified system would require much lesser resources than the system in Fig.1 owing to the savings in W to L conversion. The best operation would have been what's shown in Fig.3 but the supply lines from W-producer to W-Consumer-L-producer weren't easily available. So we deviced an intermediate solution as shown in Fig.2. In this intermediate system one cycle of L-Consumer consists of two periods of activity and two periods of rest. W-Consumer-L-Producer's one cycle consists of one period of activity and one period of rest. When we measured resources required for this intermediate system, we were utterly disappointed. It required more resources than the original system. Further investigation revealed that the extra periods of activity in L-Consumer were consuming more resources. L-Consumer was spending resources doing needless work. Once the supply lines were straightened as shown in Fig.3 each process was active only for the time is was required to be and otherwise it was at rest. Lession learnt: unnecessarily active processes waste resource. Once they were given enough rest, they consumed optimal resources. The final system was observed to required much lesser resources compared to the original system.
Coming back to where we started, rest is not just for rejuvenation but it is necessary for optimal resource consumption as well. It seems that the latter is the main function of sleep and rejuvenation is just a byproduct. Sleep never reverses our age; we always grow older and older.
This realisation opens up new questions. What is the function of God? Why does that function need to stop when it rests? If we were to extend the producer-consumer example further, what each of these species, including the God, are producing and what are they consuming?