Programming °æ (¾«»ªÇø)
·¢ÐÅÈË: zpw (zhao), ÐÅÇø: Programming
±ê Ìâ: FAQ for VXD(Ö®Îå)
·¢ÐÅÕ¾: ×Ï ¶¡ Ïã (Tue Jul 28 14:13:17 1998), תÐÅ
Can I use Windows as a real-time operating system?
Can you say semi-real-time?” Microsoft Windows is not designed as a real
time operating system. In other words, there are no guarantees of real
time performance. Let me repeat that. There are NO GUARANTEES for real
time latency under any version of Microsoft Windows. If your application
requires absolutely guaranteed real-time response, otherwise a plane will
crash, a nuclear reactor will melt down, or a patient may die, then DO NOT
use Windows as a platform. On the other hand, if you can design you
application (hardware/software) to accommodate some delays, you will find
that in most cases, Windows can provide excellent average latencies.
For example, experiments run on a 486/66 system with no other programs
running suggest that a VxD can handle over 10,000 interrupts per second
without losing any of them. However, as soon as other software is loaded,
interrupts begin to be dropped.
Windows is an open system” in the sense that applications and drivers can
disable interrupts at will. If one device driver disables interrupts for a
long period of time, no interrupt servicing will be performed. While new
drivers tend to keep interrupts disabled for very short periods, older
drivers and applications sometimes poll hardware devices and keep
interrupts disabled for unpredictable amounts of time.
Of course, you can write a driver that disables interrupts and polls YOUR
hardware. The mouse and keyboard will not respond, and other device driver
developers will grumble and curse if your driver happens to running on a
system where THEY want to do real-time-like operations. However, this may
be an acceptable alternative for in-house projects, or on well controlled
systems.
The only real answer is to test your driver with a wide variety of software
and hardware installed and gather empirical evidence. If you have the
luxury to control the design of the hardware, build in buffering to
accommodate worst-case latency situations.
--
¡ù À´Ô´:£®×Ï ¶¡ Ïã bbs.hit.edu.cn£®[FROM: yaoyu.hit.edu.cn]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º3.789ºÁÃë