How do computers keep time?

preview_player
Показать описание
My first laptop lost track of time, so that got me thinking: how do computers keep track of time? Can they do it forever? And why don't they lose track of time when we turn them off?

Turns out the answer is a combination of processor, quartz crystal and the internet. They all work together to keep time.

📚 Sources

🌍 Social

Рекомендации по теме
Комментарии
Автор

I have been working with computers my whole life and did not expect to learn something new from this video. However, the way you explained these concepts, such as the limitations of a 32-bit system for keeping time, really helped me understand this for the first time. You have a real talent for explaining complicated concepts in a way that is easy to digest. Thanks for making such helpful content!

ryanschenk
Автор

Very important correction: 1GHz processor doesn't necessarily mean it's 1billion instructions per second, but rather 1billion cycles per second. The cycle is literally an electrical wave (imagine it as "sin" graph). One instruction, however, can be measured in number of cycles and that's dependent of the machine architecture. So for example if a machine architecture decided that "addition" instruction needs 2 cycles, and that machine has a a processor of 1GHz:
1GHz ---> 1billion cycles per second ---> 500million addition instructions per second. A processor usually has many more instructions each of which requires different number of cycles. So measuring a processor's frequency in number of instructions per second is hard unless every instruction cost exactly 1 cycle, which is not realistic.
Any way, I love your channel. You rock!

EddieSaleh
Автор

This was literally a shower thought of mine. Just based off my own intuition, I assumed computers tracked time in relation to processing speed. The RTC & its battery is honestly a wild concept to me

Onetwistyboi
Автор

Very comprehensive explanation. Thanks for making and sharing this with us.

Perspectologist
Автор

Thanks for answering my 3 a.m thoughts

inversionist
Автор

Great video once again :)
I envy you your ability tho explain things so well and understandably.

I have two small corrections though: Jan 1st, 1970 is not just your mac's default, it is actually the start date for unix time.
And, secondly, the 2038 problem is not just limited to linux but rather all 32-bit unix based systems, windows versions and applications

Mosquitobomber
Автор

Just thought about how could this work and this video solved all my questions. Very clear and concise explanation, loved it. Thank you and keep it up!!

joaohenri
Автор

I dont know how you do it. You explain it very well.

sendhilkumarans
Автор

Thank a very comprehensive video with all the nitty gritty details

heshankumarasinghe
Автор

you are one of the smartest people I ever met or saw, thank you for all you videos) nice seeing you, at last

IQ
Автор

This was bugging me for 2 weeks now!
cool bro!!

anujd
Автор

Hi @Savjee, Really excellect video once again.. I have two queries :

1. As I understand, RTC is a counter which keeps track of the no of oscillations of the quartz crystal you've mentioned that when the computer boots up the OS will read time from RTC. How can the OS determine the exact time without the offset.

Let's say I shutdown my system at 5 PM and switched it back on at 6 PM, meanwhile let's say RTC's counter has incremented 555 times. In this example, 555 is the duration. OS can only know its 6 PM if it had stored the offset 5 PM. [Let me know if I'm not clear]

2. How does OS account for network delays when syncing with atomic clocks using NTP ?

GK-rldu
Автор

You have very good knowledge in technology

aryanmazumder
Автор

This is awesome 😎 would like to see more interactive content along with explanation

Seaofthoughts
Автор

Can you make videos in tensorflow because you teaching clean and clear

sanjeevi
Автор

Great video!
But there is a small error at 7:23. The year should be 1970, not 1901.

duzuns
Автор

iBook G4s have a capacitor to power the RTC. Thought the PowerBook was doing the same !
So when you took off the battery for a certain time, you had to set time (and WiFi/Airport...) again :/

glujaz
Автор

and what about NEM (XEM) simply explained??

beniaminmiara
Автор

But we are still interrupting the processer a 100 times per second so won't it still slow it down?

eisigerwurfel
Автор

Some computers thought the time was 19100

ultimatedude