Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts

Friday, May 27, 2016

The Year Of 2038 Problem - The Unix Millennium Bug

The Year Of 2038 Problem
The Unix Millennium Bug




Animation showing how the date would reset, represented as a signed 32-bit integer (at 03:14:08 UTC on 19 January 2038).

The Year 2038 problem is an issue for computing and data storage situations in which time values are stored or calculated as a signed 32-bit integer, and this number is interpreted as the number of seconds since 00:00:00 UTC on 1 January 1970 ("the epoch"). Such implementations cannot encode times after 03:14:07 UTC on 19 January 2038, a problem similar to but not entirely analogous to the "Y2K problem" (also known as the "Millennium Bug"), in which 2-digit values representing the number of years since 1900 could not encode the year 2000 or later. Most 32-bit Unix-like systems store and manipulate time in this "Unix time" format, so the year 2038 problem is sometimes referred to as the "Unix Millennium Bug" by association.

The year of 2000 which marked a significant date in the computer industry. Those days raised the heat of Y2K - Year 2000 or Millennium bug with all computing systems. If you remember those days, it was supposed to make a huge negative impact if it were not corrected at right time. The bug was fixed properly which saved the computer industry from great failure.
A similar problem may occur on all Unix based systems on 19th of January, 2038 if they are not upgraded from 32 bit to 64 bit. Here is a note about what happened in 2000 (Y2K) and what will happen in year 2038.

What is Y2K ? Why was it caused ?

Computers during initial days were made to "think" in two digits for year while counting dates. They were done with intent of keeping the first 19 as constant and changing the last two digits like in 1998, 1999 etc. This was supposed to cause a major problem of resetting everything on some programmed computers as a result of overflow of date from 1999 to 1900. Anyway major nations took it seriously and developers succeeded to fix the problem which resulted in reducing losses on a major part.

What is Year 2038 Problem?

Now, its time for Unix for a Millenium Bug, it is also called as Unix Millenium Bug. This is caused due to the Unix time is computed on a binary format and the counting will be valid from 1970 to 2038. On January 19th 2038 at 03:14:37 this resetting will take place and lead the Unix systems to count the date from 1970. This can be fixed by Unix vendors when they switch from 32 bit to 64 bit versions. Thought it is a long time ahead, it could cause a problem for programs which work for very future dates.

Here is how the date gets reset on year 2038.

Note that the image contains an error that the counting will reset to 1901 which is not the same as in the explanation. One more confusion is the time region that wikipedia says as UTC. Do you think the time zone would matter for any system to reset? I think its that time in any region the computer is set for.

Simply say, it is when the computer software can't interpret the date properly past the year 2038 and it reverts back to December 13, 1901. It will cause the software to fail. It is caused because the system time is a 32-bit integer. It is often referred to as the Unix Milennium Bug.

According to Wikipedia the software will "interpret this number as the number of seconds since 00:00:00 UTC on Thursday, 1 January 1970. The furthest time that can be represented this way is 03:14:07 UTC on Tuesday, 19 January 2038. Times beyond this moment will "wrap around" and be stored internally as a negative number, which these systems will interpret as a date in December 13, 1901 rather than January 19, 2038. This is caused by integer overflow. The counter "runs out" of usable digits, "increments" the sign bit instead, and reports a maximally negative number (continuing to count up, toward zero). This is likely to cause problems for users of these systems due to erroneous calculations."

Will affect you?

Most new computers use a 64-bit system and should not have an issue with the programs that run in 64-bit mode. However, older computers, 64-bit computers that have programs running in 32-bit mode, or embedded systems that use dates to compute or run diagnostics will verly likely be affected by the Unix Milennium Bug (2038 bug). Transportation systems and cars have embedded systems. Basically, anything with a computer embedded in it that uses dates, can suffer from this. Think of all of the objects around us that have a computer chip in it.

So why worry now? It is only 2016.

Any embedded system that is 32-bit and uses future dates 24 years in the future must be fixed by 2016.

What do you do ?, what is the solution ?

There is no universal solution for the Year 2038 Bug. Any change to the definition of the time_t data type would result in code compatibility problems in any application in which date and time representations are dependent on the nature of the signed 32-bit time_t integer. For example, changing time_t to an unsigned 32-bit integer, which would extend the range to the year 2106, would adversely affect programs that store, retrieve, or manipulate dates prior to 1970, as such dates are represented by negative numbers. Increasing the size of the time_t type to 64-bit in an existing system would cause incompatible changes to the layout of structures and the binary interface of functions.
The only real solution is to upgrade your equipment to 64-bit systems before the problem affects you. While your own personal equipment may not cause you any issues, the major concern is everything around you. Transportation systems, streetlgihts, etc...

Starting with NetBSD version 6.0 (released in October 2012), the NetBSD operating system uses a 64-bit time_t for both 32-bit and 64-bit architectures. Applications that were compiled for an older NetBSD release with 32-bit time_t are supported via a binary compatibility layer, but such older applications will still suffer from the Year 2038 problem.

OpenBSD since version 5.5, released in May 2014, also uses a 64-bit time_t for both 32-bit and 64-bit architectures. In contrast to NetBSD, there is no binary compatibility layer. Therefore, applications expecting a 32-bit time_t and applications using anything different from time_t to store time values may break.

Linux uses a 64-bit time_t for 64-bit architectures only; the pure 32-bit ABI is not changed due to backward compatibility. There is ongoing work, mostly for embedded Linux systems, to support 64-bit time_t on 32-bit architectures, too.

The x32 ABI for Linux (which defines an environment for programs with 32-bit addresses but running the processor in 64-bit mode) uses a 64-bit time_t. Since it was a new environment, there was no need for special compatibility precautions.

Alternative proposals have been made (some of which are in use), such as storing either milliseconds or microseconds since an epoch (typically either 1 January 1970 or 1 January 2000) in a signed 64-bit integer, providing a minimum range of 300,000 years. Other proposals for new time representations provide different precisions, ranges, and sizes (almost always wider than 32 bits), as well as solving other related problems, such as the handling of leap seconds. In particular, TAI64 is an implementation of the Temps Atomique International standard, the current international real-time standard for defining a second and frame of reference.

Here You Can See..,

Count-down for Y2K38 bug

Share... Facebook Twitter Google Plus LinkedIn Reddit


Thursday, March 24, 2016

Meet ubuntuBSD, UNIX for Human Beings

UbuntuBSD (Ubuntu Linux + BSD)
The Brand New Open Source OS
To Bring The Two Super Powers Together Into Single OS.


UbuntuBSD ScreenShot

BSD -- the open source, Unix-like operating system kernel that lives in Linux's shadow -- is now coming to the Ubuntu world, thanks to a new open source project called UbuntuBSD.

For the uninitiated, here's the BSD back story: Created starting in the late 1970s (originally as an enhanced version of AT&T's Unix operating system, then as a complete replacement for it) at the University of California, Berkeley, BSD was one of the first freely redistributable operating systems. Then, in the 1990s, for various complicated reasons -- largely but not solely related to legal challenges -- BSD took a back seat to other free operating systems that were based on GNU software and the then-new Linux kernel.

A handful of BSD-based systems have survived into the present: FreeBSD, NetBSD and OpenBSD and so on... But they haven't been nearly as influential, within either the server or desktop markets, as GNU/Linux systems.

Now, a group of programmers wants to combine one of the most popular GNU/Linux distributions, Canonical's Ubuntu, with BSD by developing a new operating system called (plainly enough) UbuntuBSD (also dubbed as "UNIX for Human Beings" on social ntworks). The idea is to deliver "the ease and familiarity of Ubuntu with the rock-solid stability and performance of the FreeBSD kernel," according to the project.

The idea is to deliver , The ease and familiarity of Ubuntu with the rock-solid stability and performance of the FreeBSD kernel

Actually, UbuntuBSD probably won't look too much like Ubuntu to most users. That's because it runs Xfce as its default interface, rather than Unity, the one that ships with Ubuntu. So UbuntuBSD is more like the Ubuntu backend combined with a BSD kernel (specifically, the project is using the FreeBSD kernel) and an alternative interface.

But we're guessing most users won't mind much, especially since Xfce is popular with users who want a desktop interface that is less resource intensive than options like Unity and GNOME, but still looks pretty and delivers extensive functionality.

UbuntuBSD has seen nearly 5,000 downloads already, even though developers warn that it remains in beta form and is not yet ready for production use in all cases.

Look @ UbuntuBSD



In the short term, it's unlikely that UbuntuBSD will see much of a following beyond a certain community of power users who want to experiment with a new open source OS. But the project does provide novel opportunities for integrating the extensive software ecosystem that surrounds Ubuntu with a kernel that offers some features not present in Linux -- not to mention more liberal licensing terms, since the FreeBSD kernel does not use the GNU GPL license. That could lead not just to a new type of desktop OS, but also new server or cloud solutions, down the road.

How To UbuntuBSD




Wednesday, March 23, 2016

BSD For Human Beings? | Interview

BSD For Human Beings? | Interview


BSD for humans -PC BSD

Continuing our BSD summer interviews, we introduce today a very interesting interview with Kris Moore, the founder and current leader of development of the desktop user-friendly PC-BSD project. Enjoy!

As the founder of PC-BSD, what can you tell us about your decision to start this project? How did you get involved with BSD systems, and what drove you into creating one?

I first ran into FreeBSD back in the mid nineties, when I started working at a local dial-up ISP. At the time it was my first experience with any *nix related system, and I can still recall how exciting it was to be able to log in remotely and run "pine" for this new thing called "E-Mail".

I decided to create PC-BSD in early 2005, after running various Linux desktops, and continually having problems with them. In particular what drove me was how package management was performed in all open-source desktops at the time, with the idea that every package is a part of your "base-system", and an upgrade of one thing could trigger a chain of dependencies causing numerous other things to be touched as well. This felt WAY too familiar, especially after coming off the years of "DLL Hell" in Windows desktops and the problems that caused. Instead I wanted to implement a "clean" package system, which kept the applications separated away from the core desktop, reducing the potential for "Libary Hell" and dependency related issues. Thus the PBI (Push Button Installer) package format was born and desiring to build upon a stable API and base-system, FreeBSD was the logical choice.

What is your current role in PC-BSD?

I'm currently the project director, and lead developer of the system.

Why did you choose Free-BSD as the basis for your system?

I was already somewhat familiar with FreeBSD, but the real deciding factor was trying to find a stable "base OS" for the PBI software, something with a very stable ABI, allowing applications to run on current and future versions. Add in the rock-solid stability, security and it was an easy decision.

What goodies from Free-BSD can be found on PC-BSD? Are all the innovative security tools of Free-BSD available on PC-BSD too?

PC-BSD is 100% FreeBSD under the hood, not a fork, which means all the features of FreeBSD, such as ZFS, PF and others are also available. Over the years we have added various graphical "front-ends" to these features, such as a firewall manager, ZFS installation wizards and more. At this point users wanting to install with ZFS will find the PC-BSD graphical installer the easiest and fastest way to go.

I found the installer and the AppCafe very user-friendly. What else is there making user's life easier, while also confirming PC-BSD's desktop aiming?

In addition to the easy Installer and AppCafe, we also include graphical utilities for managing wired/wireless networking, system updates, firewall, and others. Coming in 9.1 is also a revamped FreeBSD "Jail" management utility called the "Warden". It will allow users to easily create and manage sandboxed servers, including linux servers, in a secure FreeBSD jail.

Continue Reading....