View Single Post
  #78   Report Post  
w_tom
 
Posts: n/a
Default Why aren't computer clocks as accurate as cheap quartz watches?

Win 16 code on Windows 95 executes "cooperative
multitasking". The application program must volunteer to pass
CPU access to the next application. Furthermore Win16 code is
non reentrant.

Windows 95 could only execute Win32 code using a flag called
Win16Mutex so that Win32 code, designed for pre-emptive
multitasking environments, would not crash in the 'mostly'
Win16 environment of Windows 9x/ME.

To run Win16 applications in the preemptive multitasking
environment of NT, those Win16 applications would execute
under NTVDM. Therefore Win16 applications could execute in a
pre-emptive multitasking environment called Windows NT.

To be a true multitasking system, all threads must be
reentrant. This NT does. To be preemptive multitasking, the
OS rather than the application programs must determine which
code has CPU resources. This too is done by NT. Neither is
done in Windows 9x. Some still confuse this difference
between Windows 9x/ME and the Windows NT/2000/XP operating
systems.

NT, however is not a superior real-time pre-emptive
multitasking (MT) system. NT was not designed as an efficient
real time OS because response to interrupts can take a
millisecond. But this discussion is about preemptive MT.
Windows 9x/ME is not pre-emptive multitasking. It is
cooperative MT. A legacy of DOS and Win 3.1 upon which it was
constructed. NT was built from scratch in the earliest 19990s
to use Win32 code (code that is also reentrant) and to be
preemptive multitasking. XP being only the latest version of
the NT Operating System.

Some preemptive multitasking OSes take it to the next level
- real-time preemptive multitasking. NT can perform real time
operations - just not fast enough - microsecond response - as
some high performance systems require.

OS/2 did provide preemptive multitasking when Windows 95
could only do cooperative MT. However OS/2 has no useful
graphical interface. Therefore OS/2 ended up in embedded
applications such as ATMs - where the system must be more
reliable - therefore system required a preemptive MT OS.
Obviously Windows 9x/ME suffer from that reliability weakness.
But NT is preemptive MT and has a graphical interface. NT was
Microsoft's answer to OS/2 when IBM and Microsoft finally had
a parting of the ways in early 1990s.

BTW, the early OS/2 that was first demonstrated by IBM - one
task could literally lock out other tasks. Even worse, the
IBM people did not even understand what multitasking was as we
showed them one application locking out other tasks. When
first released, bugs in OS/2 caused its preemptive MT
abilities to not perform correctly. A legacy of operating
system reliability when complex systems are written in
assembly language. And just another reason why OS/2 was not a
profitable product for IBM. OS/2 biggest success was taking
the embedded computer market away from DOS.

wrote:
Sixteen-bit versions of Windows never did preemptive multitasking.
Thirty-two bit versions did and do, for 32-bit applications (but
not for 16-bit applications). Windows NT does it for all
applications,


No, windows NT does not pre-emptively multitask.

Win NT/2K/XP is better still, and are generally quite good
OS's, but the multitasking is still rather poor compared to several
other OS's on the market.


This is because it only multitasks, but it is not pre-emptive
multitasking. The kernel does not have complete control of each
application.

Not true. Multitasking on all the NT-based versions of Windows is
excellent.


It is very good, but it is not pre-emptive. OS/2, for one, uses
pre-emptive and it is so far ahead and superior to the way
windows works, folks would not believe it. The difference between
the two is beyond night and day.

The difference will prove to be in your definition. The original
definition has been absconded with by microsoft in order to make
it appear that their inferior implementation actually meets the
requirements, so if it is really important that you 'win' that's
okay with me.

Mark