Unix has turned 50. What does this mean?

The year 2020 is significant for Unix: at the very beginning of the year, the original operating system turned 50 years old. Unix time, also known as 'epoch time,' is the number of seconds that have elapsed since January 1, 1970. But what concerns kernel developers regarding Unix's half-century anniversary?

Unix has turned 50. What does this mean?

Although some early developments of Unix predate the official start of its 'epoch,' January 1, 1970, remains the zero point in POSIX time. Therefore, as of January 1, 2020, the platform officially turned exactly 50 years old.

Time Unix versus human time

From a human time perspective, 50 years is a long period. From Unix's perspective, there is nothing special about 50 years, and even 43 years would be just as significant. Unix systems (including Linux) represent date and time values as the number of seconds since 1970-01-01 00:00:00 UTC, recorded in 32 bits. To determine how many seconds have passed since then and, consequently, the current Unix time value, you can run the command:

$ date +%s

1576883876

The %s argument after the date command specifies the display of the current date and time as the number of seconds since the beginning of 1970-01-01.

Unix has turned 50. What does this mean?

What is the maximum date that Unix systems can store? Unix?

To understand how much time a Unix system can accommodate, you need to assess the capacity of a 32-bit field. This can be calculated as follows:

$ echo '2^32' | bc

4294967296

However, since Unix accommodates negative numbers, one bit is reserved for the sign, thus reducing the time value to:

$ echo '2^31' | bc

2147483648

And since Unix numbering starts from 0, this means we have 2,147,483,648 values, but the maximum is 2,147,483,647 — the Unix date and time value cannot exceed this number. Just as the odometer in a car cannot show more than 999,999 kilometers — add 1, and the value resets.

How long is a year in seconds?

The number of seconds in a year can be calculated as follows:

$ expr 24 * 60 * 60 * 365

31536000

In a leap year, an additional day is added:

$ expr 24 * 60 * 60 * 366

31622400

Unix has turned 50. What does this mean?

How does Unix display its 50th birthday?

On January 1, 2020, at 12:00 AM, the time will be 1577836800. The calculation is somewhat complicated because leap years must be taken into account. Since the Unix epoch, there have been 12 such years, starting from 1972 and ending in 2016. This means that 38 ordinary years have passed.

Here is how the expr command looks to count seconds over the past 50 years:

$ expr 24 * 60 * 60 * 365 * 38 + 24 * 60 * 60 * 366 * 12

1577836800

Or like this, taking into account previous calculations:

$ expr 31536000 * 38 + 31622400 * 12

1577836800

This method of recording time made Unix systems immune to the Y2K problem, which worried people at the end of 1999 that the transition to the year 2000 might damage computer systems. The difficulties turned out to be much less than expected. In fact, only applications that recorded years in two-digit format encountered date rollovers. Many developers did extra work to ensure that their applications would not be affected by the Y2K problem.

When will time Unix face problems?

Similar difficulties are expected for Unix systems no earlier than 2038, when dates stored in the format described above will exceed 32-bit space. There are still 18 years left, but kernel developers are already working to avoid the upcoming crashes.

The 2038 problem is sometimes referred to as the Y2K38 problem. If it is not resolved by Tuesday, January 19, 2038, after that date systems may think that it is the year 1901. One way to solve this problem is to switch to a 64-bit representation of date and time information. Some believe that this will be much more complicated than it may seem.

In any case, it's too early to panic. What is truly significant today is the 50th anniversary of Unix systems, which are recognized as one of the most important operating systems in history.



Source: 3dnews.ru
Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster