Guy Macon on Real-Time Operating Systems

>Guy Mac>> >>Henrik Carlqvist wrote: >> >>>A process with a real time priority will keep the >>>CPU until it gives away the CPU by its own will or until >>>another process with a higher real time priority needs >>>the CPU. All processes with normal priorities will work >>>as before with preemptive multitasking, but the normal >>>processes will only get any CPU if it isn't needed by >>>any real time process. >>> >>>Such real time processes can hang the entire machine >>>if they get stuck in an infinite loop. Unless the >>>computer has more CPUs than working real time processes >>>there will be no CPU left to handle mouse movements, >>>terminals or ssh daemons. Because of this you will >>>need root privileges to set those priorities. >> >> The above is an excellent description of what happens when a non >> real-time OS is handed a process that is labeled "real time" >> and told not to interrupt it. If the process finishes quickly >> and isn't much of a resource hog, this can be an effective >> strategy, but as you pointed out, if it hangs you are hosed. >> A Real-Time Operating System is designed to avoid such problems, >> and will meet the deadlines on all processes. > >This all strangely sounds like DOS ;-|

In what way?

DOS is (unless you count TSTs) is a single-tasking program loader with a rudimentary API. It not only fails to "meet the deadlines on all processes", it only runs one process. DOS can do a fine job of controlling real-time embedded systems, but the application has to do all the functions that are normally handled by an RTOS (real-time operating system). For many real-time embedded systems a simple loop does everything needed, and a RTOS is overkill, but if you need multi-threading, DOS is no longer appropriate.

QNX, on the other hand, is a RTOS and, with careful software design, will meet all deadlines on all processes. And, now that the Linux Kernel has real-time capabilities, the same is possible using Linux.

References:

formatting link
formatting link
formatting link
formatting link
formatting link

--
Gooogle foood: Guy Macon guymacon.com Guy Macon 
Guy Macon www.guymacon.com Guy Macon  Guy Macon
www.guymacon.com Guy Macon   Guy Macon guymacon
Guy Macon  Guy Macon www.guymacon.com Guy Macon
Reply to
Guy Macon
Loading thread data ...

DOS can be used for multithreading, however it is up to you to do all of the housekeeping. There used to be preemptive multitaskers for DOS: Desqview and the venerable Windows 3.xx.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

What was sad was that the original developer of DOS (I forget the name, but it wasn't Bill G.) had it designed for multitasking but Microsoft stripped it out.

Reply to
Ed Prochak

Tim Paterson

Reply to
notbob

Don't forget OS/2, which was the most successful of them all. We'll never forget the look on the face of a former Boss, who fancied himself an msdos "expert" when he first realized that we had 5 instances of Wordperfect 5.1 loaded into OS/2 2.11, on an old 486. (not that this was really multitasking, but it was funny, nonetheless).

cordially, as always,

rm

Reply to
Roger Manyard

In alt.os.linux.slackware Ed Prochak trolled:

And why do you think it was "stripped out?" The fact that nobody was able to put it back should give you a clue why.

Desqview, as somebody else mentioned, was really fussy, and a major pain in the ass. Windows 3.1 was ok, but as we stated in an earlier post, OS/2 was the most successful dos multitasker.

cordially, as always,

rm

Reply to
Roger Manyard

About the nearest that you can get to Real Time in DOS, is a state machine. DOS has no provisions for doing real time without hacking the guts out of the 91 tcik/5 second clock thingy, to start with and then add a schedular and task manager on top of that. etc., etc.

--
humjohn AT aerosurf DOT net
Reply to
HJohnson

Dave Thompson at Seattle Computers (Seattle Computing?)

--
humjohn AT aerosurf DOT net
Reply to
HJohnson

Then you're not "using DOS for multitasking" are you? You're using DOS to load an OS kernel which you're using for multitasking.

--
Grant Edwards                   grante             Yow! I have a TINY BOWL in
                                  at               my HEAD
                               visi.com
Reply to
Grant Edwards

"Guy Macon" illuminated the devils arse on Fri, 13 Jul 2007 16:48:06

+0000 by typing:

This newsgroup really is great for inducing sleep to the insomniacs,

How would it feel if I suggested that you just got a grip....quite literally?

--
Moog

"Some mornings it just doesn't seem worth it to gnaw through the
leather straps."
Reply to
Moog

I meant using the functionality provided by DOS in a multithreaded environment. DOS is not reentrant by itself however you can switch the static data areas manually.

Today this junk is only of historical interest.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

FreeDOS, on the other hand, is under active development. There are ways to get it (or OpenDOS) to multitask, but I still maintain that no DOS is appropriate for anything more complex than simple round-robin multitasking.

--
Guy Macon
Reply to
Guy Macon

Still running Desqview-X for some apps and have run Windows 3.1 under Desqview-X when its favourite pass-time was to crash to BSOD. Ditched the Windows 3.1 ages ago but kept Desqview-X as the platform for running my IBMCAD (A DOS application) and other Forth programming tools that are still very very useful to me. Looking for a Linux based CAD (which is as easy and efficient as IBMCAD. AutoCAD-alikes don't really do it for me) at which point I will be able to lose the old 486 on which Desqview-X runs.

In my embedded systems I roll my own RTOS using Forth as the basis. My systems are not so complex that they need too much effort in that direction though.

--
********************************************************************
Paul E. Bennett ....................
Forth based HIDECS Consultancy .....
Mob: +44 (0)7811-639972
Tel: +44 (0)1235-811095
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************
Reply to
Paul E. Bennett

Interesting. I used to use IBMCAD... it was quite decent, in a slightly off-centre kind of way. (ISTR it was on special offer for a while. I never did find out what the connection to IBM was... if any.) Nowadays I use TurboCAD Deluxe under Windows. It's ok; does the job.

I mostly use a cooperative multitasker (yes, a round-robin state machine-based approach) on bare-metal projects. Where the project dictates PC-class hardware, I would still tend to use DOS (with the same multitasker), and effectively take over all the system services. As I've said elsewhere, I'm a fan of cooperative multitasking and synchronous programming.

I did buy the Desqview SDK at one point, maybe late 80s/early 90s, with a view to using that... it was kinda fun, but I decided to stick with cooperative multitasking. I've done many large/complex projects that way. I like not having timing bugs ;).

Steve

formatting link

Reply to
Steve at fivetrees

I run my own RTOS developed as the C++ library with the convenience and portability in mind. It provides the API which is independent from the underlying hardware and the language extensions specific to compiler. Preemptive multitasking allows programming in a linear code. It is easier to debug and maintain it.

Likewise.

Vladimir Vassilevsky

formatting link

Reply to
Vladimir Vassilevsky

In alt.os.linux.slackware Guy Macon trolled:

Did you really say this? Are you nuts?

cordially, as always,

rm

Reply to
Roger Manyard
[%X]

The IBM connection was that it was developed by the IBM guys at Boulder, Collorado) before IBM went through that huge break-up. It was developed as part of their facilities management tools and could do a lot of really cool stuff with the ability to overlay maps and extrude 2D to 3D with very little effort.

I always found it much quicker to do things in IBM CAD than AutoCAD even when AutoCAD was the required final format.

--
********************************************************************
Paul E. Bennett ....................
Forth based HIDECS Consultancy .....
Mob: +44 (0)7811-639972
Tel: +44 (0)1235-811095
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************
Reply to
Paul E. Bennett

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.