12 ms·
Those Win9x Crashes on Fast Machines
- thrownaway954 6y agoi love this site. os/2 was such a huge part of my life in the 90s and the sole reason i love computers back then. it's great that this site has preserved so much history of it.
- kzrdude 6y agoSerious question, what was OS/2 and who used it?
- TazeTSchnitzel 6y agohttps://en.wikipedia.org/wiki/OS/2 https://en.wikipedia.org/wiki/OS/2
- LeoPanthera 6y agoWikipedia's OS/2 article is comprehensive. https://en.wikipedia.org/wiki/OS/2 https://en.wikipedia.org/wiki/OS/2 tl;dr A graphical OS developed by IBM that succeeded DOS and competed with Windows. Notably, it featured pre-emptive multitasking before Windows did. It was not a success in the home market but was reasonably successful in big business, especially finance, for a short amount of time.
- Lammy 6y agoAnd still exists today as ArcaOS! https://www.arcanoae.com/ https://www.arcanoae.com/
- Narishma 6y agoI think the first version wasn't graphical.
- LeoPanthera 6y agoActually that's right! The GUI, called "Presentation Manager", debuted with OS/2 1.1.
- skissane 6y agoAs a tween/teen, I learnt a lot from OS/2. Up until then I had only used DOS and Windows 3.x. And then my Dad bought me a copy of OS/2 2.0, and also the Walnut Creek Hobbes OS/2 CD-ROM. And I discovered EMX (the OS/2 equivalent of Cygwin). And I started playing with bash, EMACS, GCC, etc. Next thing you know, I was installing Slackware Linux. At which point I largely lost interest in OS/2. But EMX was an important stepping-stone for me in getting in to Linux.
- kelnos 6y agoI think it's important to note (even in a tl;dr) that for a time OS/2 was a joint venture between IBM and Microsoft, and that MS sabotaged that relationship while secretly working on WinNT. On a related note, "Showstopper!: The Breakneck Race to Create Windows NT and the Next Generation at Microsoft" is a surprisingly entertaining story, and reads more like a novel than a documentary/memoir.
- WalterGR 6y agohttps://en.m.wikipedia.org/wiki/OS/2 https://en.m.wikipedia.org/wiki/OS/2 : As a result of a feud between the two companies over how to position OS/2 relative to Microsoft's new Windows 3.1 operating environment, the two companies severed the relationship in 1992 and OS/2 development fell to IBM exclusively. https://en.m.wikipedia.org/wiki/Windows_NT https://en.m.wikipedia.org/wiki/Windows_NT : Windows 3.0 was eventually so successful that Microsoft decided to change the primary application programming interface for the still unreleased NT OS/2 (as it was then known) from an extended OS/2 API to an extended Windows API. This decision caused tension between Microsoft and IBM and the collaboration ultimately fell apart.
- walterbell 6y agoPeople who wanted an object-oriented graphical desktop ATM machines.
- thrownaway954 6y agoan operating system made through a joint venture between microsoft and ibm. it was the predecessor to WinNT. it could run dos, win16, win32, posix as well as os/2 native apps. it really was an amazing operating system at the time with a VERY passionate community behind it. watch some of the videos for a good take on it: http://www.os2museum.com/wp/os2-history/os2-videos-1987/ http://www.os2museum.com/wp/os2-history/os2-videos-1987/
- uryga 6y agoi learned about OS/2 from the 'Doing Windows' series. really recommend it, it's a great read about the history behind all this stuff, the computing landscape of that period, and why OS/2 was a huge achievement. https://www.filfre.net/2018/06/doing-windows-part-1-ms-dos-and-its-discontents/ https://www.filfre.net/2018/06/doing-windows-part-1-ms-dos-a... the road to "run DOS stuff [without being DOS]" was very long, and paved with many gravestones... i think OS/2 comes in in part 5 or 6, but i really recommend reading the whole thing.
- som33 6y agoIt was the days where people owned their own software and DRM had not made it's way into games, since the internet has enabled PC game theft on a massive scale, by valve, ea and activision. OS/2 was an alternative Operating system oriented towards businesses that could run apps from different operating systems under one unified framework.
- LeoPanthera 6y agoThere's a patch for this problem, which is particularly useful if you want to run Windows 95 in a virtual machine. https://winworldpc.com/download/c39dc2a0-c2bf-693e-0511-c3a6e280947e https://winworldpc.com/download/c39dc2a0-c2bf-693e-0511-c3a6... Indeed, there's a pre-made VirtualBox image pinned to the top of Reddit's /r/windows95 if you are lazy.
- jeffbee 6y agoWe still face a related class of problem today. The x86 PAUSE has wildly varying throughput. On most Intel parts it is 1/8 or so, but on Skylake Xeon it's 1/141. On Ryzen its 1/3. I've seen code that makes assumptions about how much real time must have passed based on PAUSE loops.
- acqq 6y ago> I've seen code that makes assumptions about how much real time must have passed based on PAUSE loops. Note: here, the PAUSE instruction is not the problem at all, but the "code that makes assumptions." Because the "seen" code is not named, I assume it's something internal for some company?
- jeffbee 6y agoYes, private code. Basically there was some mutex fairness thing that was written on a SKX and on a Zen CPU where PAUSE is 50x faster it didn't have good fairness, it was too tight.
- userbinator 6y agoThe last time I benchmarked it, which was at the beginning of the i7 era, LOOP was just as fast (within the margin of error) as dec/jnz - Intel probably doesn't want to be seen as slower than AMD and didn't care about that timing loop anymore.
- MauranKilom 6y agoCouldn't they just microcode it to that?
- caf 6y agoThat's not how microcode works, but yes - the instruction decoders and retirement logic are capable enough these days that you can have it decode into the same sequence of μops, which is almost certainly what happens. Note that it's not exactly the same thing, because an interrupt can happen between the decrement and jump for the two-instruction case, but not for the LOOP case.
- TwoBit 6y ago>"It was somewhat unfortunate that this was called an “AMD fix” (the file containing the solution was called AMDK6UPD.EXE), even though Microsoft was clear that this was not a problem in AMD CPUs but rather in their own code." I'll bet the AMD name was suggested by producers and/or management at the protest of engineering, with the argument that the public knows this as an AMD problem and so it's better to call it that regardless of the technical reality. I've seen this logic many times in my career and do understand there's some rationale to it.
- Nextgrid 6y agoCould it be simply because since the bug primarily affected AMD CPUs at the time it would make it easier for everyone if the update was called the “AMD update” as opposed to some cryptic name like “network stack delay loop update”?
- Lammy 6y agoI figure it's for the same Microsoft×Intel mutual-back-scratching reason that made Microsoft try to charge $35 for the fix: https://www.theregister.com/1998/11/26/amd_posts_windows_95_k62/ https://www.theregister.com/1998/11/26/amd_posts_windows_95_...
- WalterGR 6y agoAh, yes, The Register. Faced with the Great Satan of Software's apparent refusal to admit its mistake and eliminate the charge, AMD has made the fix available from its Web site free of charge.
- mjevans 6y ago"Fast PC support"
- TwoBit 6y ago>"The issue also illustrates how seemingly solid assumptions made by software and hardware engineers sometimes aren’t. Software engineers look at the currently available CPUs, see how the fastest ones behave, and assume that CPUs can’t get faster by a factor of 100 anytime soon." Disagree. Where I've worked (Oculus/Facebook and EA) we would never allow such assumptions in code reviews, regardless of how unlikely the failure may be. You never allow div/0 unless it's mathematically provable to be impossible. I'm sure other orgs have the same code review policy, and static analysis these days would also catch it.
- raverbashing 6y agoThis reminds me of some discussion about the evolution of games (can't find it right now, it was probably about ID Software). Computers today are literally 1000x better than PCs 30 years ago. 1000x (even more) faster, 1000x more ram, not to mention storage and other capabilities
- netsharc 6y agoHuh, my 1st computer hat 640KB of RAM (does it count as a computer?), the 3rd one had either 4 or 8 MB. My current one has 16GB, so you're right, that is actually 2048 (or 4096) times more...
- Dylan16807 6y agoAnd yet latency to RAM goes almost unchanged, which has a lot of very interesting effects.
- anyfoo 6y agoThat's simplifying things a little. The 90s were a completely different time in computing, still somewhat pioneer when it came to "modern" operating systems in personal computing. What came before on home computers was usually tied to the actual hardware and its implementation in a very thorough way, where way more outrageous (but at the time, widely accepted) assumptions were made. For example, what memory location to write into for direct display on the screen from your application code. A few years earlier, the absolute time that a particular instruction takes. Computers became more powerful and more diverse, we added abstractions, we abolished assumptions. And still I'm pretty sure that even in Oculus (to pick up your example, I know nothing about that), there are bound to be a great deal of assumptions in the code that cease to be valid with later versions of the products.
- Wowfunhappy 6y agoWould it have been possible for Microsoft to test for something like this, or would it be possible today? For example, is it feasible to slow down time to simulate an impossibly-fast CPU?
- traverseda 6y agoYou can do that for linux userpace apps using the "faketime" utility. It just intercepts that calls that try to find out the actual system time. Not sure how that would effect kernalspace, since the kernal is sort of the thing that decides what time actually is.
- Wowfunhappy 6y ago> Not sure how that would effect kernalspace, since the kernal is sort of the thing that decides what time actually is. Yes, I'm imagining you'd need to be in a virtualized/emulated environment of some sort.
- londons_explore 6y agoThe reverse (speeding up time) is done pretty frequently to check software for bugs that might only occur after its been running for a few years. It finds things like "The daily check for updates leaves a few logfiles, and after 30 years there are enough logfiles that the disk is full". Normally you need to fake or mock all time related API's.
- quickthrower2 6y agoFor a unit test, you could reduce the loop counter to say 1024.
- caf 6y agoAs noted it used the 8254 PIT to measure clock time passing, so you could program the 8254 to run much slower.
- phire 6y agoThe original Mac does a calibration of the floppy drive motor during boot to measure jitter. If you are implementing an emulator, you must insert some jitter to the emulated floppy drive. Because if there is no jitter, the ROM's calibration code does a division by zero and crashes.
- Wowfunhappy 6y agoWhile perhaps not so great from a defensive programming perspective, Mac OS feels like a different case since it's only designed to run on specific hardware. Modern Mac OS also has all sorts of "bugs" that Hackintosh users need to patch or otherwise work around. Since we're doing something that was never intended, I don't really see these as flaws in the OS.
- kelnos 6y agoI would still consider them to be timebomb bugs, though. Even if you're developing for a restricted set of hardware, newer versions of that hardware could very easily violate some corner-cutting assumptions in the future. I would rather spend a little more time now to get something right and future-proof, rather than pass the problem onto future-me, who likely won't have the context anymore to find the issue quickly, or, worse, future-someone-else, who doesn't have the context at all.
- yjftsjthsd-h 6y agoYeah, over a long enough time window I think portability and correctness will always come back to bite you. Apple could've saved time by making Darwin only handle one processor nicely, but then the Intel transition and ARM additions (iOS is still Darwin, after all) would've hurt more. Windows coasted on x86 for a while, but now that they're targeting ARM I'll bet they're pretty glad that it was originally built to be portable. Code that only works on the exact system you need today might be good enough sometimes, but if you survive long enough you'll want it to be more flexible than all that. EDIT: I should add, this applies to applications, not just OSs. If you're an Android dev - will your app run on Android 15? Will it work on ChromeOS? Will it run on Fuchsia? If you're writing Windows software - will it run on ARM? If you're making webapps - does they work on Firefox? And maybe it's not worth the effort, especially if you don't plan to be selling the same software in 5 years, or maybe you think you can just deal with those things when you get there, but if you plan to still be in business in a decade then you should plan accordingly.
- ghewgill 6y agoThis is exactly the same timer loop problem as was found in Turbo Pascal around the same era: https://retrocomputing.stackexchange.com/q/12111 https://retrocomputing.stackexchange.com/q/12111
- RcouF1uZ4gsC 6y agoI think you could solve the problem by pushing the "turbo" button on the computer case that would reduce your cpu frequency to something like 8 mhz.
- unilynx 6y agoAll turbo buttons I remember specifically clocked down to 4.77 mhz - apparently the original 8088 frequency?
- torgoguys 6y agoIt depends. On later computers--around the time frame we're talking about where the Turbo Pascal CRT bug was showing up--the turbo button, where it still existed on computers of the day, often just enabled/disabled the L2 cache near the processor.
- einr 6y agoThe turbo button originates from Taiwanese "Turbo XT" clones that would run an 8088 or V20 at 8, 10, 12 or even 16 MHz with turbo engaged and 4.77 with it off. Later 386 and 486 systems implemented turbo logic in different ways. Some by reducing bus speed, some by disabling CPU caches, some by inserting wait states for memory access.
- anyfoo 6y agoMaybe initially, but there definitely were still 486s with Turbo buttons that would throttle the machine to some frequency much higher than 4.77MHz (or just disable the cache). I had one! And apart from that, CPU generations have vastly different speed profiles if you kept them at the same frequencies (which is mostly theoretical, clocking a 486 at 4.77MHz, while not necessarily impossible, might turn out to be quite a project on consumer hardware). Turbo buttons were always a shaky proposition. They might have worked okay-ish with the original AT to slow the machine down into a somewhat fitting range to play older games, but probably quickly devolved into some show-offy marketing ploy ("look how fast it goes if I press this!").
- mwcampbell 6y agoDo drivers or other kernel code still have this kind of delay loop in current operating systems, or is everything interrupt-driven now?
- garaetjjte 6y agoIf they need to wait in atomic context, they probably do. e.g. for linux: https://www.kernel.org/doc/Documentation/timers/timers-howto.txt https://www.kernel.org/doc/Documentation/timers/timers-howto... ATOMIC CONTEXT: You must use the delay family of functions. These functions use the jiffie estimation of clock speed and will busy wait for enough loop cycles to achieve the desired delay
- kalleboo 6y agoI thought that was the point of BogoMips https://en.wikipedia.org/wiki/BogoMips https://en.wikipedia.org/wiki/BogoMips
- lordnacho 6y agoI've written this kind of code myself, where you measure a time delta and divide something by the delta. It's always something that sticks out though, that you might divide by zero (especially if you did it in Java!). The article says it would have been picked up in code review, and I agree. But it just seems odd that it wasn't changed right there. Why not just write to loop so that it keeps looping as long as the divisor is below some number like 10ms? You also want to minimise the estimation error, which is easier to do if you divide by a slightly larger number. Consider a loop that takes between 1 and 2ms to finish, your estimate will be either x or 2x.
- qwerty456127 6y agoI have used Windows 98 SE on CPUs up to various Pentium 3s. There was a problem with big (above 512MB) RAM volumes but it was easy to solve. I was only forced to switch to Windows XP when I upgraded to Pentium M (Dothan) - besides the Safe Mode I could find no solution to run Windowes 98 on it. I would gladly return to Windows 98 now if my hardware and software supported it.
- Wowfunhappy 6y agoWhy do you prefer Windows 98 over XP?
- qwerty456127 6y agoIt was much more a clean-and-simple design. The less complexity and useless (to me) features an OS has - the more I like it. Of course I mean the way it works, not the way it looks. It also took so little RAM and HDD it would altogether fit in a humble corner of my today RAM - I don't really get it why does modern software need so much more.
- eropple 6y ago"Clean-and-simple design." OK. So you like an OS with no meaningful memory segmentation (you could hop into kernel mode by modifying a register), awful multiprocessing support, and absolutely no defense in depth against the truckloads of malware that are all over the Internet? That's certainly a take.
- graton 6y agoI have to admit I find this type of article about old computer/software quite interesting as recently I discovered a backup of mine that contained source code I wrote in 1993. I was writing assembly language back then. Using a really great library called Spontaneous Assembly. First version 2.0 and then 3.0. SpontaneousAssembly 3.0 added support for easily writing TSR (Terminate and Stay Resident) code. Back in the early 1990s I was in college and working in the computer lab. So I wrote various little DOS utilities to help us better manage the computers and the interaction with Novell Netware. Due to this reminiscing I have even purchased a few tech books from that time. MS-DOS Encyclopedia, Peter Norton's Programmers Guide to the IBM PC, and some others. I only wish I still had a copy of SpontaneousAssembly 3.0 as it would be fun to recompile some of my old code!
- codys 6y agoIt looks like there's a copy in the library of congress [1]. Unclear how one would go about making a copy. 1: https://www.worldcat.org/title/spontaneous-assembly-for-cc-assembly-language-library-for-80x86-based-ms-dos-systems/oclc/32314029 https://www.worldcat.org/title/spontaneous-assembly-for-cc-a...
- clan 6y agoFor those who got curious like me have a look at: http://300m.us/docs/computing/SA-3.0a/TOC.htm http://300m.us/docs/computing/SA-3.0a/TOC.htm I am not familiar with how libraries work in the US. Can anyone get a library card with Library of Congress? They have the floppy images: https://www.worldcat.org/title/spontaneous-assembly-for-cc-assembly-language-library-for-80x86-based-ms-dos-systems/oclc/32314029 https://www.worldcat.org/title/spontaneous-assembly-for-cc-a... EDIT: http://300m.us/docs/computing/ http://300m.us/docs/computing/ Has a link for purchase which 404 but to an existing site. Maybe Kevin is the friendly type?
- nikomen 6y agoAnyone can get a reader card at the Library of Congress if they have a photo id and are at least 16 years old. I'm not sure how you access computer files there, though. The reader card has to be obtained in person. With the Library of Congress closed to visitors because of COVID-19, I imagine it's not possible right now.
- korethr 6y agoHoly shit. I feel like this neatly explains why Windows 95 was an utter crash-fest on the computer I bought just before my freshman year of highschool. With an AMD K6-2 running at 350Mhz, it was the first computer I had that was all new components instead of the franken-sytems built from a dumpster-dive base and other dumpster-dived components grafted on. The shop I bought it from initially put 95 OSR2 on it. And it did like to crash. It wasn't until I started using Windows 98SE that I started to see anything resembling stability, and not need to re-install every other month. If only I had known about AMDK6UPD.EXE back then and been able to understand the reasons behind the crash and why the patch fixed things.
- dfox 6y agoI somehow cannot believe that nobody had mentioned the first significant instance of similar crash at least for the DOS days: Borland's CRT.TPx/conio.a which consistently caused division by zero on anything faster than Pentium MMX. At the time the wisdom was that anything over 200MHz is too fast, but in reality anything AMD with "Pentium Rating" over 200 was fast enough to cause consistent crashes and 266Mhz Pentium MMX was slow enough that it mostly worked (and anything i686 consistently crashes).
- miohtama 6y agoI mentioned :)
- miohtama 6y agoTurbo Pascal, known for its awesome one pass compiler, had the same issue https://retrocomputing.stackexchange.com/questions/12111/why-did-ms-dos-applications-built-using-turbo-pascal-fail-to-start-with-a-divisi https://retrocomputing.stackexchange.com/questions/12111/why...
- thaumasiotes 6y ago> Run 10000h (1,048,576) iterations of the LOOP instruction. If you wondered about this, 10000h appears to mean "100,000 hexadecimal". I assume it was intended to say 100000h.
- deleted 6y ago[deleted]
- thaumasiotes 6y ago> According to the Pentium Processor Family Developer’s Manual Volume 3: Architecture and Programming Manual (Intel order no. 241430), the LOOP instruction. The absolute best case when the branch is taken is 6 clock cycles. The Intel manual notes that “[t]he unconditional LOOP instruction takes longer to execute than a two-instruction sequence which decrements the count register and jumps if the count does not equal zero”. This makes me wonder about three-instruction sequences of increment / decrement / jump-if-nonzero, and one-instruction sequences of jump-if-nonzero. What's the point of having the unconditional LOOP instruction in the first place?
- saagarjha 6y agoCompatibility?
- tzs 6y agoBe happy that it only crashed. It could be worse. We once got a couple of high end motherboards for AMD processors, back in the Win98 era, and I tried to install Win95 on one of them. The box said that Win98 was required, but it couldn't hurt to try, right? Maybe there would not be drivers for some of the peripherals, but all I needed was the CD-ROM and hard disk to work. Install is going fine until it is time for it to reboot. That failed. It didn't even get to the BIOS initialization screen. It appeared to just be dead. Figuring we just got unlucky and got a defective motherboard or processor, I tried installing on the other one so I could get on with my work. That one died too. Eventually I found something about this on the motherboard maker's support site. The problem was with the device probing during install. What I'm about to say is not made up. As unbelievable as this might sound to people who grew up with more modern PCs, at one time they really did work as I'm about to describe. The early PC buses had no built-in way for the host to identify what cards were plugged into the expansion slots. Typically, an expansion card would have a set of jumpers or DIP switches that could chose between several sets of possible addresses for the card's registers to appear in I/O space. The user was expected to keep track of the settings of all cards they installed, and adjust the jumpers appropriately to avoid conflicts, and record the settings in a config file that the drivers would read to find out where their card was. Later buses, such as EISA and later PCI, provided ways for the host to find out what is there and how it is configured. But operating systems still needed to support the old bus, and they wanted to make this as user friendly as possible. So systems like Win95 would have a device probe during install that would try to identify what is on your old bus. They would do this by very carefully probing the I/O address space. For example, suppose you know that a particular network card if present has to be at one of 8 addresses, and you know that after power on or reset that certain bits will be set in its status register and certain bits will be clear. You can read those 8 possible addresses, looking for the right bit pattern. If you don't find it, that particular network card is not present. If you do find it, you can do more tests to confirm it. Some of those other tests might involve writing to the device registers, and seeing if it responds the way that network card should. This is obviously risky. What if it is not that network card, but rather a disk controller card that just happens to have a register that after reset has the same bit pattern you expect in the network card status register? The thing you write then to verify it is the network card might be the "FORMAT DISK" command to that disk controller. And so you had to be very careful with these probes. They had to be done in a safe order. You'd need to probe for that disk controller before you probed for that network card. Those new motherboards contained peripherals that Win95 did not know about, and so the Win95 probe procedure did not know how to avoid doing bad things to them. One of those peripherals was the built in interface for flashing the BIOS EEPROM. The Win95 device probe ended up overwriting the BIOS.