3 ms·
DOS is only "real time" if you don't do disk I/O. Disk I/O is synchronous. There's something to be said for using FreeDOS simply as a loader for a real-time co
by Animats 9y ago
DOS is only "real time" if you don't do disk I/O. Disk I/O is synchronous.
There's something to be said for using FreeDOS simply as a loader for a real-time control program. It's not doing anything in the background. There's no networking stack. There's no way to attack it without physical access.
- stonemetal 9y agoDisk I/O being synchronous doesn't disqualify it from being real time. Disk I/O not having a bounded execution time would make it not real time.
- dfox 9y agoFilesystem IO through DOS APIs does not have bounded execution time by design (it can even cause user interaction, ie. the infamous "Abort, Retry, Ignore?"). On the other hand the timing is pretty consistent in non-error situations. Also synchronous (and also often non-preemptible) disk/FS IO was for the long time the only way it was done. For example the reason that on Linux process that got stuck accessing NFS or removable drive that got removed was unkillable (in 'D' state) was to preserve illusion of such semantics to user processes (ie. that IO to filesystem and block devices will never fail with EINTR). And I would not be surprised if many deeply-embedded RTOSes do the same to this day.
- boznz 9y agoTrue, DOS and BIOS interrupt calls stopped your program until complete, this lag was however fairly consistent and in the order of a few milliseconds on newer machines so could be used in higher latency real time control. "Proper" DOS real-time control generally used assisting hardware to buffer/offload processing or did not use the INT calls using interrupt driven system to make it real real-time, all DOS programs could be "Bare-Metal" if you did not use any DOS/BIOS INT calls which were generally written in assembly and not interrupt friendly. Also having no network stack or USB stack is pretty limiting these days. I'm sure FreeDOS can implement these, there are definitely DOS drivers out there for older network cards to get TCP/IP up and running and there was always serial modems which we used extensively in "the old days" (pause while audience cringes!) Being cut-off from the outside world is of course security bliss but the PC still needed to be physically secure as there were no passwords/encryption and remote maintenance is not an option.
- ashleyn 9y agoI've searched a while for an IBM-compatible RTOS that gives your application direct access to the hardware. There are better alternatives than FreeDOS. A glaring omission is access to long mode. There's no DPMI for long mode. You can knock the PC into long mode, but DOS calls are no longer accessible in any fashion.