Message-ID: <390D7DD9.F55A5EF6@mtu-net.ru> Date: Mon, 01 May 2000 16:51:37 +0400 From: "Alexei A. Frounze" X-Mailer: Mozilla 4.72 [en] (Win95; I) X-Accept-Language: en,ru MIME-Version: 1.0 To: Eli Zaretskii Cc: djgpp AT delorie DOT com Subject: Re: 3rd Try: Maybe an asm problem? (Problems linking) References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Recipient: eliz AT is DOT elta DOT co DOT il Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: > On Mon, 1 May 2000, Alexei A. Frounze wrote: > > But what for? DOS is not a multitasking OS. Windows does all the task/thread > > switches itself. So what is it needed for? > > __dpmi_yield is not for task switching, it's for releasing the current > time slice allotted by Windows (or any other multi-tasking scheduler). Just some kind of a synonym. :) > When an interactive program waits for the user to type something and has > nothing else to do, it generally should call __dpmi_yield to relinquish > the CPU to other programs that might be waiting for the CPU. Without > this call, Windows will not preempt the CPU before its time slice > expires, and the system might behave is if it is very busy, even though > the program just waits for input. Do you bother about that while you're programming? I.e. do you write a custom keyboard read function that calls that thing? Or maybe we all develop applications for background that should work and be invisible? I dboubt. :) How about old DOS programs? Are you sure all they release timeslice? I bet most of programmers don't bother about that because it's not a thing to worry too much about. It is just a way to help sheduler make a decision, although it doesn't need any help in general. Usually all the time is given to a current (current for the user) task and most of users don't expect/need something else. bye. Alexei A. Frounze ----------------------------------------- Homepage: http://alexfru.chat.ru Mirror: http://members.xoom.com/alexfru