about Windows 2000
-
Dear All We have one time critical program on windows 2000 service pack 5. Our Threads should be run in exactly predefined time slots. But in our program, I find that sometimes, Our threads blocks and doesnt work. We make our threads with very high Thread priority(25,26,27,28,29,30,31). It is not accepted for me that any program blocks my time critical program. Do you have any idea about this problem and how to overcome this. Regards Monhi
-
Dear All We have one time critical program on windows 2000 service pack 5. Our Threads should be run in exactly predefined time slots. But in our program, I find that sometimes, Our threads blocks and doesnt work. We make our threads with very high Thread priority(25,26,27,28,29,30,31). It is not accepted for me that any program blocks my time critical program. Do you have any idea about this problem and how to overcome this. Regards Monhi
Someone else can probably give a more definitive answer, but I believe in Win2000 hardware interupts always trump even the real time thread priorities. In other words, it ain't really real time. You may also be competing with other system processes that are running at the high priorities you have selected.
-
Dear All We have one time critical program on windows 2000 service pack 5. Our Threads should be run in exactly predefined time slots. But in our program, I find that sometimes, Our threads blocks and doesnt work. We make our threads with very high Thread priority(25,26,27,28,29,30,31). It is not accepted for me that any program blocks my time critical program. Do you have any idea about this problem and how to overcome this. Regards Monhi
In operating systems: 1- Hardware interrupts have the highest priorities and you can't disable them in win2000 because its multitasking and doing so harms the scheduling using the clock interrupt! 2- Process Managers and Reincarnation servers and memory manager have always the highest priorities so you cannot beat them!
To follow the path, Walk with the MASTER, See through the MASTER, Be the MASTER!
-
Dear All We have one time critical program on windows 2000 service pack 5. Our Threads should be run in exactly predefined time slots. But in our program, I find that sometimes, Our threads blocks and doesnt work. We make our threads with very high Thread priority(25,26,27,28,29,30,31). It is not accepted for me that any program blocks my time critical program. Do you have any idea about this problem and how to overcome this. Regards Monhi
Basically, what everyone is telling you is that you cannot do this in Windows. You're writing code that requires a Real Time operating system, and Windows isn't one of them.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Dear All We have one time critical program on windows 2000 service pack 5. Our Threads should be run in exactly predefined time slots. But in our program, I find that sometimes, Our threads blocks and doesnt work. We make our threads with very high Thread priority(25,26,27,28,29,30,31). It is not accepted for me that any program blocks my time critical program. Do you have any idea about this problem and how to overcome this. Regards Monhi
Interrupt servicing and Deferred Procedure Calls pre-empt ordinary threads in the Windows NT scheduling model. DPCs are a way for device drivers and other kernel-mode code to defer processing of device interrupts to a later time - the interrupt service routine (ISR) typically does enough to acknowledge the interrupt (stopping the device from interrupting) and schedules a DPC for later on to actually handle the I/O request. All DPCs for the current processor are processed before returning to user-mode. Typical Windows device drivers are not designed for real-time operation - their operations are not predictable in time. Video and sound drivers are typically particularly bad in hogging the buses and doing too much work in one go, rather than breaking a complex operation into a lot of small steps (allowing other work to happen). If you want to stick with the Windows family, you have a couple of options. You can get a real-time extension for desktop Windows such as RTX[^]. Or, you can build your own Windows CE[^] platform. Windows CE is designed to be real-time, as you can control scheduling of device interrupts versus user threads. This is because the interrupt model has an Interrupt Service Routine which is solely responsible for clearing an interrupt and setting an event object; that event object wakes up a regular Interrupt Service Thread which is scheduled against all the other threads in the system.
Stability. What an interesting concept. -- Chris Maunder