The responsibility is the “operating system”’s. How that is implemented varies.
There are two cases to consider:
If the system’s only time source is the RTC, then there’s no need to update it, except when the time is set. On Linux this is typically handled either by
hwclock, or by
If the system has an external time source (over the network), the RTC should be updated. On Linux this used to be handled at shutdown (using
hwclock), but the kernel (since 3.7) can update the RTC automatically every eleven minutes if the system time is maintained using an external source and the RTC is configured appropriately.
On Linux, the kernel expects time synchonisation services to report whether time is synchronised; that is done by clearing or setting the
STA_UNSYNC status bit using the
adjtimex system call. The kernel itself can set that bit if it determines that time isn’t synchronised, but it never clears it on its own.