Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!usc!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!rutgers!mcnc!rti!bcw From: bcw@rti.rti.org (Bruce Wright) Newsgroups: comp.sys.ibm.pc Subject: Re: Why use MS-window ? Summary: Windows and multitasking Message-ID: <3867@rtifs1.UUCP> Date: 28 May 90 02:49:17 GMT References: <10699@medusa.cs.purdue.edu> <46500092@uxa.cso.uiuc.edu> Organization: Research Triangle Institute, RTP, NC Lines: 79 In article <46500092@uxa.cso.uiuc.edu>, bak10413@uxa.cso.uiuc.edu writes: > > /* Written 6:14 am May 24, 1990 by wjin@cs.purdue.EDU in uxa.cso.uiuc.edu:comp.sys.ibm.pc */ > /* ---------- "Why use MS-window ?" ---------- */ > According to the discussions, windows for 88/86/286 machines cannot do > muti-tasking. Then my question is why use windows if multi-tasking is > impossible ? Anyway you start one job and wait until it is done. > Maybe you can hold a process like an editor, and do something in other window, > wait util it is finished and get back to the editor. > Is this all reason why they use ms-window ? > ------ > W. Jin > /* End of text from uxa.cso.uiuc.edu:comp.sys.ibm.pc */ > > I didn't read the discussions to which you refer, but I imagine you misinter- > preted them. MS-Windows does do multitasking on any machine, which is the > primary reason for using it. In fact, I'm using it right now to run > CrossTalk XVI to access the net, [...] > -Brent Brent is right that Windows can do multitasking (on _all_ machines), but reading the previous article I get the impression that Mr. Jin is asking something a bit different (sorry if I misinterpret what's being asked). In Windows for 8086/8088/80286 machines, Windows uses _non-pre-emptive_ multitasking. This means that programs run until they relinquish the CPU. Windows can run (many) ordinary DOS programs in this mode, but if they don't relinquish the CPU then other programs won't get any. Normally, programs written for Windows are pretty careful about not taking over the entire system; programs written for MS-DOS are often not so careful, though these tend to be compute-intensive tasks and not the "typical" PC program (word/text processing, spreadsheet, database, communications, -- or even compilers, though some of them hit the CPU pretty hard from time to time). Programs written for Windows _can_ do significant computation, but must make special system calls to relinquish the CPU every once in a while. If you want a demonstration of this, open up a COMMAND.COM window on Windows (my impression is that on Windows 3.0 this would require running Windows in "real" mode on a 286), and when you get the C> prompt do a DIR on a large directory. Then switch to another window - the directory will continue to be listed in the background while you use the other program. Other ordinary DOS programs can be used similarly, though they may require customization in the .PIF or WIN.INI files. Then try a program that goes into an infinite loop, like: C>debug loop.com -a nnnn:0100 jmp 100 nnnn:0102 -r cx CX 0000 :2 -w -q Try running this program from your COMMAND.COM window or from the Windows MS-DOS Executive (But not when you have anything important running!!). You will now find that Windows is locked up - the mouse pointer will move around the screen but Windows ignores the mouse buttons and the keyboard (actually it sees them but queues the events to programs that never deal with them because they never get the CPU). Windows for 80386 and 80486 machines can do _pre-emptive_ multitasking, so that even misbehaved DOS programs that go into infinite loops or otherwise hog the CPU can't take over the machine. In Windows 3.0 (say the trade rags, my order is in but I haven't seen it yet), the DOS programs can be run in virtual 8086 machines so that even illegal memory references will rarely (if ever) crash the machine. The biggest problem with Windows is that it's slower than running in text mode (although it's not as slow as you might think). If all you're doing is text, and you never need the multitasking features, it may not be for you. But I'd try out the new Windows 3.0 before deciding that - from everything I've seen about it, it sounds like a really nice product. Bruce C. Wright