New from Ronco! The Time Slicer!

Dear Dr. GUI:

Can time slices be preempted on Windows NT? In other words, if a higher-priority thread becomes ready, will the lower-priority thread be preempted within a time slice, or after the time slice? Also, do you need to raise the thread's priority to real-time critical to do that? Can the user change how long a time slice is? Any other information on Windows NT and real time would be helpful.

A developer who sought your consultation at a conference

Dr. GUI replies:

This is a common question. However, before I answer it, I need to make the appropriate disclaimer. All of what I am about to say is subject to change. You should design your product in such a way that you can easily flow with the tide.

Okay, let's talk about the current situation. When a higher-priority thread becomes ready to run, the current thread is preempted. Time slices under Windows NT do not vary in length, except when a thread's priority is temporarily boosted to prevent priority inversion or starvation. There is a lot of information about multithreading on the Microsoft Development Library CD. Jeffrey M. Richter deals with it in his book Advanced Windows NT, while the Developer Network's Ruediger Asche has written seven articles on the topic for the Development Library. Also, keep your eyes open for Development Library content dealing with Windows NT interrupt response time and latency. We are acquiring more on this topic.