Article View: comp.os.msdos.programmer
Article #5863Re: Ms-Dos Source
From: DJ Delorie
Date: Fri, 19 Apr 1991 18:34
Date: Fri, 19 Apr 1991 18:34
36 lines
2212 bytes
2212 bytes
> > What > >type of computer are you trying to multitask? Anything below a '386 > >doesn't allow multitasking anyway. It would be nearly impossible to make > >DOS capable of multitasking anyway. > > > You don't need an 80386 to multi-task. In fact, you don't need a chip > designed for multi-tasking to multi-task. True preemptive tasking can > be done (slowly) on an 8086. Although MS DOS doesn't inherently > support multi-tasking, there are things which can be done to make it > multi-task as well. Side note (ie: no flames, please): The 80386 is the first chip to support "true" multitasking. This means that it actually has a task register, task management opcodes and hardware, and each process thinks it's the only one. When the CPU needs to handle exceptions (interrupts, system calls, faults), the hardware *automatically* saves the ENTIRE state of the CPU and current task in that task's Task State Segment and loads the ENTIRE state of the new task to run. This is normally done with no software interaction at all. This is true multitasking. On lesser processors, "simulated" multitasking is used. There is only one processor state, and when you want to run a different task, the currently executing task must, in it's own context, manually reload all of the registers, stack, etc, and become the new task. Interrupts and exceptions are always serviced in the context of the running program. One might argue that the same thing is happening in both cases. It is. The difference is that for the 386, it happens automatically, and for lesser processors it must be done in software. DJ dj@ctron.com
Technical Details
Message-ID:
<1434@balrog.ctron.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!ccncsu!purdue!news.cs.indiana.edu!mips!spool.mu.edu!samsung!balrog!ctron.comReferences:
<1753@sjfc.UUCP> <91107.143308IO92203@MAINE.BITNET> <1991Apr19.150904.6241@netcom.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!ccncsu!purdue!news.cs.indiana.edu!mips!spool.mu.edu!samsung!balrog!ctron.com From: dj@ctron.com (DJ Delorie) Newsgroups: comp.os.msdos.programmer Subject: Re: Ms-Dos Source Message-ID: <1434@balrog.ctron.com> Date: 19 Apr 91 18:34:04 GMT References: <1753@sjfc.UUCP> <91107.143308IO92203@MAINE.BITNET> <1991Apr19.150904.6241@netcom.COM> Sender: news@balrog.ctron.com Reply-To: dj@ctron.com Organization: None whatsoever Lines: 36