4 ms·
Interrupt latency. On dos you own the machine down to bare metal for better or worse, usually worse, but software only slows things down. I suspect if you stu
by VLM 5y ago
Interrupt latency.
On dos you own the machine down to bare metal for better or worse, usually worse, but software only slows things down.
I suspect if you stuck a protocol analyzer on it you'll find one of three situations:
Someone did simplistic polling instead of a windowing protocol so increased latency makes the overall system unusably slow. 0.1 ms vs 10 ms per handshake is not noticeable to humans but if your scada sequentially polls 10000 parameters thats the difference between a poll taking 1 second or about two minutes...
The other scenario is keep alive signaling where the computer needs to assure the CNC machine that its still alive and sane every 10 ms or the controller initiates an emergency shutdown. Can't have a giant lathe or printing press running off wild not under active computer control. So windows wants to multitask and do who knows what for 50 ms, and the scada shuts down.
The final situation is they're doing something "weird" at the hardware level like signaling over the control pins instead of over the serial ports. Like toggling the RS-232 DSR pin turns on the milling machine motor for 10 ms instead of sending a serial RX/TX power command every 10 ms. Windows opinion of DSR, IIRC, is DSR means the serial port driver registered in windows and is not available to end users. Been a long time since I've had to deal with that so I might misremember.
- boznz 5y agoDOS and BIOS had some pretty crappy interrupt calls for Serial port access and as DOS was single threaded and you could hang the PC if not careful. In timing critical cases you were safer accessing the serial controller directly.. Of course strictly verboten under any real OS and one of the reasons a lot of older timing critical software was problematic to move to windows or other hardware.
- deadlyllama 5y agoNot just timing critical stuff. BIOS calls for serial were slow, character at a time. If you wanted to fill a buffer and keep processing you wrote your own interrupt driven serial code or used a good library. No serious software on DOS would use the BIOS serial code. This sort of thing was just normal. No multitasking so you had full control of the hardware. Third party libraries or custom code for serial, sound, graphics, often keyboard. Drop into assembly for extra speed. DOS was basically a library for filesystem access, process creation and limited memory management! I still have 1.193180Mhz burned in my brain...
- ksec 5y ago>This sort of thing was just normal. No multitasking so you had full control of the hardware. Third party libraries or custom code for serial, sound, graphics, often keyboard. Drop into assembly for extra speed. DOS was basically a library for filesystem access, process creation and limited memory management! I sometimes think if we will one day cycle back to that model. It was at least an era where I thought I had some understand of computer. Now I seriously dont. But it works.
- ahefner 5y agoIs there a reason you believe FreeDOS interrupt latency would be inferior to MS-DOS? (I can certainly imagine virtual 8086 mode / emm386-style shenanigans, varying with configuration and what's loaded in your config.sys, but this is all very hypothetical, and the most straightforwardly hypothetical position of all is that one bare-bones 16-bit DOS should be exactly the same as another in this regard, not necessarily being in the loop at all.)
- krylon 5y agoIt wouldn't necessarily have to be worse, just different. Might have been better, actually, or less deterministic. Unfortunately, I did not have the time to investigate the problem further. It was the one aspect of being a helpdesk monkey I seriously disliked.
- throwawaylinux 5y agoDoes FreeDOS not run in privileged mode like DOS?
- krylon 5y agoFWIW, the automation people suspected the problem was timing-related, so you're probably right. I was just sad that FreeDOS did not work, but installing MS-DOS from floppy disks was fair compensation. 3.5" Floppy disks! We had an USB floppy drive lying around, but actually finding 3 floppy disks was quite the challenge. (-: