How does a freshly booted kernel, understand, that already a hibernated image of the same OS, exists, in the HDD? 

PS: I am trying to develop a new feature, which will allow multi-hibernation in Linux. 

Regards, 
Ashwin