Out of curiosity, I did a few readings online about how a computer keeps track of time, without being powered (and not being connected to the internet).
Of what I learnt, there is a special micro-processor having a crystal oscillator, keeping track of seconds, milliseconds etc. that reflects when a computer is switched on, hence displaying the precisely right time.
A few questions I have, How is this clock related to the operating system? Is it's initialization included in the bootstrap program?
What are the different ways how the Operating System can vary this time, reflecting faulty time?
Also, many a times we switch on a computer the time displayed is wrong. Is this only because of failure of motherboard battery or failure of the oscillator itself?
Lastly, Varying this time is a privileged function or not?