Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Using Dos for Real Time applications (Developers)

posted by Damien, 23.12.2012, 18:41

Hello everybody,

One of the reasons why I am using Dos is that I can make real-time programs. Indeed as it is a single task operating system, my program is not disturbed by some other processus that would take cpu time at any moment.
I just need to be aware of how much time do my elementary tasks take, and from this I can garantee the real-time aspect.

I wanted to check this or more precisely, to understand to what extent this is true.

So I made a small program that does very small loop, and which measures the time of each loop. Here is what I discovered.

Let's say my elemetary loop is about 20microseconds. And I loop for 1 minute.
Most of the loop are 19-20-21us long, which is fine.
Some others are between 20 and 30, which means that the computer does not exactly compute only my program, but makes some very tiny task. I consider this is not a problem, because it's about 10microsecs.
And finally I get a few loops that takes between 400 and 450 microsecs. In this test, it is precisely 60 loops because I noticed that it is one time per second.

So to sum up, when I run my program, every second there is "something" that takes about 400 usec to my CPU.

Do you have any idea of what is the reason of this? Maybe it is due to some interrupt depending of the computer clock, or anything else ...
Is this avoidable ? Is there a way I can see what is the origin of this "specific task" ?

Thanks for your advices.

Damien.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 186 users online (0 registered, 186 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum