About Windows 2000 and 98 Difference When Drive Realtime Graphics under MFC

Hello every one, I’m jongwook Jin and a research scientist works at VRRC KAIST Korea.

I wanna to build realtime graphics system upon OPEN-GL,(want to get endless drawing loops)
but I got a problems on a Win 2K. Windows 2K have the smart CPU scheduling mechanism that can avoid a process to have too much CPU time, so The application I wanna to build can’t go steady frame rate, just stop and go while there is no problem on the Windows 98.

I challenged this…

First, To avoid the CPU scheduling mechanism, I called thread/process priority system calls, but they stall the entire system if I set the highest priority, or they have no evident improvements on the Windows 2000 (again got the stall if the above the normal priority).

Second, I changed to use WM_TIMER, there still exists on the Window 2K.

There are many other application such like games, OpenGL’s GLUT, How can they compass the problem ?

I wanna know…

If you have time, visit my homepage…
There exist some of my interest.

vr.kaist.ac.kr/~jwjin

Have a good day and Best Regards…

[This message has been edited by jwjin (edited 09-13-2001).]

Hi !

The difference in the scheduling is not to big between W2K and W98, W2K needs more resources beacuse of the RING0 calls and a few other things like the message pipeline and so on.

There should not be any problem to implement this though unless you are rendering much more then the CPU can handle, are the two computers similar in CPU and memory ?

A timer should work fine unless you have other applications that bog down your computers (Anti virus software and things like that can be nasty), another solution is to try to use the application OnIdle() method.

Don’t change the priority, that will not do you any good as you found out yourself, but if your application is stalling the enitire system when you raise the priority this is an indication the the thread is never free to let other threads run, it has to much to do, try to change the time for the timer and see if that helps.

Mikael

Thanks a lot your reply, Mikael.

But I can surely say the difference of Windows 98 and Window 2000K is very big.

Windows 98 has no concept of time quota, but 2K has that. Even in 2K,first start up time works fine, Process has no stalls, but time goes, 2K stalls the application process.

With WM_TIMER, I can’t get full performance of CPU, and it will drop down the frame rate. It is the last thing I want to choice.
But I tried and got failure (things to be alike).

Two computer’s configuration is very different, Pentium II class PCs with Windows 98 and Pentium III class PC with Windows 2000, but My working S/W is under 2000.
and I played games in 2000 too, but they have no problem of the time-qutoa-over-stall

And… I guess directX (almost every game use) can handle this problem.
So I am searching directX API now.
So sorry with Mircrosoft. My researching time is consumed by them…

How can I fix or set my application up to keep go ahead?

Thanks a lot again and Best Regard.

Originally posted by mikael_aronsson:
[b]Hi !

The difference in the scheduling is not to big between W2K and W98, W2K needs more resources beacuse of the RING0 calls and a few other things like the message pipeline and so on.

There should not be any problem to implement this though unless you are rendering much more then the CPU can handle, are the two computers similar in CPU and memory ?

A timer should work fine unless you have other applications that bog down your computers (Anti virus software and things like that can be nasty), another solution is to try to use the application OnIdle() method.

Don’t change the priority, that will not do you any good as you found out yourself, but if your application is stalling the enitire system when you raise the priority this is an indication the the thread is never free to let other threads run, it has to much to do, try to change the time for the timer and see if that helps.

Mikael[/b]

Hello, Mikael, Nice to meet you,
and Thanks a lot.

I wrote the reply but web site missed it so I write this once again.

Windows 98 has no concept of time quota but
Windows 2000 has it, so 2000 O/S guess my process is overwork then It scheduled to wait and release (pre-emption)for others.

Um~ my same application runs under pentium II class PC with Windows 98 and pentium III class with Windows 2K.

Under 2K,
First execution time duration of My application works fine like under 98.
But time goes, It stalls and no more message keep go ahead a while.

I guess there exist a way like games under 2000K. I played games in 2000K and they have no problem like this.

Only solution is using DirectX?

Thanks a lot again and Best Regards…

Hello, mikael_aronsson

I checked Window 2000 with clear format and re-install the O/S.

Your comment is right. I was wrong.
Um, I gonna manage clear version of Window 2000.

Thanks a lot for ypur reply.

Hi,
You may want to check out my paper- Millisecond Timing on PCs and Macs, just published in BRMIC. paper and source code can be found at http://www.cs.dal.ca/~macinnwj/
I actually found that Win2K has issues with the multimedia timer (haven’t tested service pack 2 yet). I also found that setting realtime priority works very well, but you have to avoid all OS related functions, since your app now has higher priority than the OS.
Joe

Whoops,
Just noticed the ‘MFC’ in the title. I actually created my own custom window class. MFC uses the windows messaging system which would be over-ridden with REAL_TIME_PRIORITY_CLASS, so that’s most likely the problem.
Joe

Nice to meet you, Joe MacInnes.

Thanks a lot for your reply and
I checked your web page contains congnitive and human relative research,
If you study stereopsis (3D stereo - means seperation of visuals between two eyes),
please visit my home page, The 3D stereo could be simply implemented by PCs.

Um, I wanna build the graphical system to syncronized operation between PC arrays,
Sycronization needs communication calls in every frame. So To change REALTIME priority is not my options.

However, Thanks a lot for your reply.
and Best regards.