event scheduler

I'm working on a program that controls a machine in which the program tells the machine to do tasks.  Sometimes the tasks will need to happen close to the same time and we are using threads to do that.  I want to know how windows xp's event scheduler handles the task and what tasks a barebones xp with just our software on it will run.  I'm trying to get an idea of timing because if xp starts some task that won't let our program run for a long period of time then we might have issues and might have to change OS's maybe to a real time OS.  Can anyone give me some input to the matter or a link where I can find it.  So far I have done some testing get times between sending and receiving communications and at first glances it looks fine but are there things or windows events that I'm missing that might cause problems.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

http://support.microsoft.com/kb/148404/en-us ("High-Precision Timing Under Windows, Windows NT, & Windows 95") sums that up pretty nicely:


The multithreaded environments of Windows NT and Windows 95 employ CPU scheduling techniques to improve processor utilization and smooth multitasking. The portions of code, called threads, within the system are organized into queues and assigned priorities. Threads of code required by the operating system are assigned high priorities. The thread scheduler allows a thread a predetermined amount of execution time (quantum). Then it evicts the thread from the processor until all threads at the specific priority level have been serviced. The process continues at the next, lower, priority level. The timer-servicing thread, like applications, is subject to CPU scheduling and eviction regardless of the thread priority. Given that the number of threads ready for execution changes frequently, the period between timer thread executions can vary dramatically.

For example, say five time-critical threads are ready for execution, and the quantum is q milliseconds. If the timer thread is fifth, four threads execute before the timer thread is executed; q milliseconds x 4. This means that if q is 25 milliseconds, 100 milliseconds will have elapsed before the fifth thread is executed. Boosting the priority of the thread that created the timer risks introducing instability in the system by starving the time-sensitive, system-critical threads.


The same applies to XP also. So, if you don's have anything else running on the machine, you should be on the safe side unless you need timing intervals that are way below 10ms.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Deepu AbrahamR & D Engineering ManagerCommented:
I don't think you will face any problem unless your application and any scheduled application uses a common resource like a file.

simple example: try to open file which is currenlty getting scanned by the any virus scanners.It will take a little while since the virus scannersare holding those files.Make sure you don't have any dependencies like these.Other wise windows is multithreaded/multitasking OS.

Best regards,
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.