20 ms·
It is well understood that many 32-bit systems will stop working in the year 2038 when the 32-bit time_t overflows. On the other hand, MS-DOS, which internally
by userbinator 6y ago
It is well understood that many 32-bit systems will stop working in the year 2038 when the 32-bit time_t overflows.
On the other hand, MS-DOS, which internally uses a 1980 year-epoch with a byte-sized year counter (and does not use a seconds-based epoch unlike Unixes), will be fine up to 2107, and Windows NT's timekeeping has a range of approximately 30000 years. Despite the elegance of the 1970 seconds-epoch, it's interesting to see how other systems designed roughly around that time period, a little later but not by much, chose to do something else, and as a result became quite a bit more future-proof.
- jolux 6y agoMS-DOS was released in 1981, UNIX considerably before then. Windows NT was not released until 1993. A decade has always been a long time in software, and it used to be longer.
- burade 6y agoIt's still pointless because no MS-DOS system will be alive in 2107.
- exikyut 6y agoYes it will; it (the last one) will host a single file documenting the true source of the "640K of RAM" quote. And it will make it available over PC/TCP, using a chain of adaptors and converters from 100BASE-TX.
- userbinator 6y ago"Wanna bet...?" I wouldn't be surprised at all if there were some original embedded systems still running machinery and the like in a century from now, catastrophic events notwithstanding. The sort of low-power embedded systems likely to be running DOS don't really experience any wear. There's quite a bit of equipment in the "low-level" manufacturing industry which is around a century old, and has basically been in continuous operation since it was installed.
- kevin_thibedeau 6y agoTheir capacitors will die. In the power supply this could destroy unobtanium parts.
- yjftsjthsd-h 6y agoCapacitors are replaceable, and in fact the process of replacing them is already a routine operation in the retrocomputing community.
- Iv 6y agoI don't think any hardware running MS-DOS will survive that long.
- flomo 6y agoModern x86 PCs still can boot DOS, no? (If not, sounds like a bug.) The bigger issue would be ISA control cards and the like. A HN user recently posted a link of "new" ISA boards for sale, but the latest CPU support was Pentium 4 (about 20 years ago).
- Iv 6y agoI am not even sure of that. Booting DOS requires a legacy BIOS mode and some legacy video modes that I am not sure manufacturers support anymore.
- djxfade 6y agoI think most (if not all) modern PCI-E GPUs still supports this. If I am not mistaken, this is what is preventing them from working on ARM right now (Raspberry PI 4, Apple M1, etc.), because the driver expect specific BIOS features
- exikyut 6y agoAaaand that's why X11 has an x86 (v86) emulator in it, so Suns (circa late 90s/early 2000s) could use PC-focused graphics cards with BIOSes containg x86 initialization code. ._.
- colejohnson66 6y agoHopefully
- throwaway201103 6y agoThey will be if they are still providing value.
- shakna 6y agoI find this statement to be overly hopeful. Legacy systems exist in all walks of life, for all kinds of systems. They've solved the problem they were set up for, and so even maintaining them is often something management can be unwilling to set a budget for. There's an oft shown, but rarely sourced, image suggesting that the US Navy food service management system was running on MS-DOS in 2011, and if that is accurate, I can't find any suggestion they have since changed that situation.
- xvilka 6y agoIf it works, has all necessary features, no significant bugs, and still performing all functions - why change? Especially since the change to modern technologies will not guarantee to produce a better result in terms of features and stability. The change is necessary if the system unmaintainable, buggy, or can't be easily interfaced with other modern systems.
- shakna 6y ago> The change is necessary if the system unmaintainable, buggy, or can't be easily interfaced with other modern systems. Unfortunately, all of these are frequently true of legacy systems. Only a small number are relatively bug free. Most are simply unmaintained. Few are easy to interface with. I have no particular problem with old software and hardware. But the massive expenditure leading up to Y2K is demonstrative of the legacy problem. Let it rot until an impending crisis forces your hand, costing far more than if you had simply maintained it.
- oblio 6y agoUnless you want to end up with Adeptus Mechanicus worshipping the Machine God in the MS-DOs boxen, you need to change from time to time. You need to at least be able to open the metaphorical box and see if you can reproduce it in case of disaster recovery. The more important the system, the higher the existential threat for the organization if you just let it be. I do understand that it's a thankless job, so this needs to be enforced from up high.
- epx 6y agoOnce a guy told me that MS-DOS would be alive in 2000, I laughed at him. It was 1994 or so. Worked in DOS-based systems (running on Windows machines, at least) until 2005, had to find a job cross-country, and tell "no" firmly a number of times, to finally get rid of them and force the clients to move on. Clipper/xBase systems that do their job is one niche of MS-DOS apps that refuse to die. Another niche I know of, is gambling machines (one-armed bandits), for some reason people kept using DOS (at least they moved to FreeDOS by early 2000s).
- pjmlp 6y agoAs someone that wrote Clipper applications during the early 90's, there are few systems that can match its elegance for CRUD driven applications. Doing DB operations is relatively simple, formdata entry and validation is super easy, supports modules, OOP and even compiles to native code. Yeah not good for networked operations, but in many mom and pop shops it isn't needed anyway. Even VB/Delphi for all their RAD capabilities were already much more complex than Clipper, but they messed up their migration into the GUI world and CA Visual Objects was too complex for the Clipper crowd.
- neverartful 6y agoSpot on with Clipper. I used it to write software for a mom and pop shop and it worked fantastic until I started running out of memory. We transitioned from DOS/Clipper to OS/2 with VX-REXX at that point. VX-REXX was also equally impressive.
- watermelon59 6y agoDo you think Clipper/xBase is a niche one could get into at this point in history? Or is that market already fully taken by old timers?
- neverartful 6y agoThere are 2 aspects you would need to consider - the toolset and the product market. I don't think Clipper is sold anymore although there are some alternatives (Harbour). I think the products that still use Clipper would likely either be POS or a niche utility use. I don't know the feasibility of new entries in those markets.
- cable2600 6y agoWings of Hope, my uncle volunteered for them. They use MS-DOS and Netware to control flight simulators and other old stuff. NASA still uses PC-DOS based IBM PCs to control things. DOS doesn't crash like Windows. GRR Martin uses Wordstar and MS-DOS to write his novels because he does not want to be distracted by pop up windows and system alerts and updates.
- yjftsjthsd-h 6y ago> DOS doesn't crash like Windows. No, it crashes like DOS. I suppose if your application is well written and you have fully exercised the functionality that you use, it might be more stable, but "reliable" is not a word I would have associated with those systems.
- jacobush 6y agoIt’s like embedded software. DOS is basically bug free at this point. If there are bugs in DOS, they are known. ANY bugs will be in the application.
- neverartful 6y agoOr misconfigured CONFIG.SYS.
- beagle3 6y agoOr some clash with a TSR (sidekick?)
- SomeoneFromCA 6y agoIf you a write a simple protected mode monitor and debug it well, your app (running under the abovementioned monitor) will be more stable than if it were running on Linux, Windows or other monstrosity.
- pjmlp 6y agoIndeed it doesn't crash, just hangs in some strange way that forces a reboot, or if you are lucky it affects the beeper that starts issuing random beep noises with different kinds of volume until you reach for the power button running like crazy,
- 0xcde4c3db 6y agoThere's no fundamental reason that time_t needs to be 32-bit on 32-bit systems, it's just that a ton of software casts/coerces time_t to/from int.
- ComputerGuru 6y agoGP's point still stands. MS-DOS fits that range without 64-bits, a separately correct design decision would have been to use 64-bits of time from the start. Poor software casts/stores time_t in int because that was good enough for decades - if it didn't fit an int from the start, they wouldn't be doing that (or if an int were enough by having different semantics, it would also be OK for them to keep doing that).
- kps 6y ago> a separately correct design decision would have been to use 64-bits of time from the starta separately correct design decision would have been to use 64-bits of time from the start On a 16-bit machine when memory cost close to a dollar a byte?
- rat87 6y agoyes what percent of memory do dates usually use? Even in a spreadheet, it wouldn't double needed memory at worst it would probably be signficantly less then 10% extra memory
- eropple 6y agoA PDP-11/20 could address (without extensions) 32 16-byte kilowords, or 64 kilobytes, of RAM. Most machines shipped with twelve kilowords, or 24 kilobytes, of RAM. Tell me again how free the creators of Unix should've been with it.
- wtallis 6y ago> GP's point still stands. MS-DOS fits that range without 64-bits 32-bit Unix timestamps would have a broader range than MS-DOS timestamps if they made the same sacrifice in resolution and only had 2-second precision rather than single-second precision [1]. And if Unix timestamps additionally used 32-bit unsigned numbers to sacrifice the ability to represent timestamps before the beginning of the epoch, then the year 2038 problem would instead be more of a year 2242 problem. [1] https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-dosdatetimetofiletime https://docs.microsoft.com/en-us/windows/win32/api/winbase/n...
- saagarjha 6y agoHaven’t libcs started to move towards 64-bit time_t? I think musl just rolled it out by default.
- bonzini 6y agoMany 32-bit embedded systems aren't able to update their libc.
- goodcanadian 6y agoSure, but what percentage of those systems will be alive in 18 years? I'm sure it is non-zero, but it is also probably small. Regardless, those systems can't be updated, so they will have the problem either way. That says nothing about whether new systems should be given 64 bit time stamps.
- throwaway09223 6y agoSystems which can't update their libc or other system software have already broken in various ways. For example, in 2007 the Energy Policy Act of 2005 changed the date when DST begins and ends. Any system unable to update its libc data files since about 13-15 years ago will display the incorrect time. I have a cheap $10 radio clock which I've had for two decades. It always displays the wrong time for a few weeks around the DST change. Any system which needs to display the correct time needs to have a mechanism for updates. The time_t wraparound is a bit deeper and more serious, granted.
- cstross 6y agoThe time_t limit in Linux is inherited from UNIX, which baked it in circa 1970, back when it was developed on PDP-8s (manufacturing lifetime: about 50,000 machines total) so Ken Thompson could write a space wars game on an unused machine with no OS. And then migrated to PDP-11s circa 1972 when someone at Bell Labs wanted a typesetting system. Back then, digital computers were only 25-28 years old. There was no such thing as legacy hardware back then, in our terms. Designing for a 68 year lifespan -- nearly three times the entire duration of the industry to that date -- probably seemed excessive!
- the_why_of_y 6y agoNit: PDP-7, not PDP-8. Cost 4 times as much and sold only 120 units, according to Wikipedia. Looks like 12-bit PDPs were a lot more affordable than 18-bit ones.
- cm2187 6y agoStill, sounds like a new Y2K fire drill ahead.
- stjohnswarts 6y agoCould be a good time $$ wise for C programmers versed in how to get around the issues.
- rurban 6y agoNot at all. Simply interpret time_t as unsigned, recompile and it works until 2106. There's no need for unix timestamps before 1970 anymore. There are also other replacement tricks, as in perl5.
- bregma 6y agoYou'll find a large chunk of software breaks because it incorrectly uses time_t as a generic arithmetic type. Taking the diff of two unsigned integers and checking if the result is less than zero will end up making you weep.
- LoveMortuus 6y agoIs this correct? 32-bit will be dead in 2038? This is making me really concerned... Won't it just loop around? I still use a 32-bit laptop as my main writing PC... Acer Aspire One, from the age of netbooks. Even finding an up-to-date Linux distro was kinda hard... Is there a fix for the time_t?
- toyg 6y agoRead the article. TLDR: this has been fixed in code, at least in Linux. This said, I hope you don’t really plan to be still using that thing in 18 years’ time.
- LoveMortuus 6y agoThank you. For writing it's still amazing and if it still works in 18 that would be amazing, I did just buy a bigger longer battery via eBay! I don't know why but the keyboard feels so amazing... It's like a part of me, I don't even need to think of typing yet the words still appear! I've also put SSD storage into it and upgraded the RAM... It really just makes me very happy
- megous 6y agoJust set your clock to that time and watch what happens.
- core-questions 6y agohttps://askubuntu.com/a/299489 https://askubuntu.com/a/299489 > No, it will not fail. In the worst case, from the viewpoint of a programmer it will work as expected: it will be reseted to date 1901-12-13 20:45:52:
- jmclnx 6y agoThe article has noted the kernel will be fine, but if I read that correctly, glib still uses 32bit time_t. And I thought I saw somewhere ext4 was changed to be fine until sometime around 2160 due to seconds granularity. I wonder how much this is a function of "never break user space." ? The BSDs have no problem with breaking user space, Net/OpenBSD has been using 64bit time_t for a while. And starting with 6.8 OpenBSD's default file system uses 64bit timestamps. With that said, I think Linux's "never break user space" is one of the main reasons Linux is so dominant. And that is making the time_t work harder to complete.
- randyrand 6y agoHow many programs care literally what year it is? Why would they stop working? Very few apps care the exact time. And if we want we can just reset the clock back for a system that does not care.