Lighting for common passages in an apartment complex

While the lighting of each flat in an apartment complex is connected to the power grid supply, and meter for the flat, the lighting method for common passages in an apartment complex may vary greatly. In some areas, all the areas have the same power supply.
However in newer buildings with lifts, it is observed that the lighting for the common passages is usually isolated and is directly connected to the backup power supply from a generator in case of failure of the main electricity grid power supply
So when the main electricity grid power will fail, the common passages like the staircases, roads continue to have lighting, while the homes are usually without lighting, However for prolonged power failure, the generator fuel will get exhausted and the whole area will be without any lighting
Most smaller homes do not have any elaborate lighting arrangement.