This is written in the manual for my Sony_NEX_3N:
..This camera has an internal rechargeable battery for maintaining the date and time and other settings regardless of whether the power is on or off, or the battery is installed or not. This rechargeable battery is continually charged as long as you are using the camera. However, if you use the camera for only short periods, it gradually discharges. If you do not use the camera at all for about three months it becomes completely discharged. In this case, be sure to charge this rechargeable battery before using the camera.
However, even if this rechargeable battery is not charged, you can still use the camera as long as you do not record the date and time. If the camera resets to the default settings each time you charge the battery, the internal rechargeable battery may be dead. Consult your Sony dealer or local authorized Sony service facility.
Charging method of the internal rechargeable battery
Insert a charged battery pack into the camera, or connect the camera to a wall outlet (wall socket) using the AC Adaptor (supplied), and leave the camera for 24 hours or more with the power off....
Most probably this is the standard also for Pentax - at least for the "older" models. A small internal battery for supplying power to a similar internal
EEPROM memory to keep the file number, time / date and all the other individual settings. This has been / is standard for many kinds of similar hardware. Occationally I read this from the Sony manual a few days ago and recharged the NEX_3N for 24 hours - to avoid it to become completely discharged because of minimal use for the last months. Perhaps this is something I should remember to do occationally with my second Pentax camera (K10d) as well.
Or has this, for the latest models, been replaced by a a non-volatile form of memory?