TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: David Noon
from: Tobias Ernst
date: 1998-12-28 11:32:12
subject: Timeslice release

Hallo David!

[int 28]

 DN> Better yet, this is the one timeslice release interrupt that has 
 DN> worked consistently inside a VDM under Warp 4. The perenniel favourite, 
 DN> INT 2FH/AX=1680H, which is nominally the DPMI timeslice release, has been 
 DN> a nightmare under Warp 4.

You are right that Int 28 was never broken, in contrast to the DPMI
timeslice. So if Int 28 suffices, it should be used.

On the other hand, Int 28 is not always sufficient. As long as you do
something trivial like

while (1)
{
        timeslice();
}

the code will never impose any visible load on the CPU no matter if
timeslice() is implemented as Int 28 or DPMI timeslice. But if you have a
long loop like

while (1)
{
        check_if_any_bytes_are_pending_at_the_com_port();
        scan_some_directories_for_semaphore_files();
        check_if_the_user_has_pressed_any_key();
        do_some_other_stuff();
        timeslice();
}


, a sort of loop which is often found in DOS fido mailer software, and if
timeslice() is implemented as INT 28, the program will hog 100% of the CPU.
You could then continue to add multiple calls to timeslice() between the
single procedure calls, or even inside those procedures, but the result
will be that if you manage to get the CPU load down wiht this method, the
program will not respond fast enough to receive all bytes from the COM:
port.

For time critical DOS software, therefore, using the DPMI time slice is
often the only way to go. It often (not always) yields both lower CPU rates
and better response time.

And luckily, on those Warp releases where the DPMI time slice does not
work, you can apply the kernel patch which can be found at 

wwwcip.rus.uni-stuttgart.de/~phy27258/mdosbug.html

Other subject:

 DN> 

Is this a joke or do you mean this serious? I would be interested in having
PL/I or a compiler derived from that for use at home (I have been working
at an IBM side where they used a special purpose language that has been
derived from PL/I, and I liked it), but the IBM PL/I compiler for OS/2 is
simply too expensive :-|, and they don't seem to offer reduced educational
prices.

Viele Gruesse,
Tobias

--- Msged/BSD TE 05
* Origin: Running FreeBSD 2.2.8 (2:2476/418)
SEEN-BY: 396/1 632/0 371 633/260 262 267 270 371 635/444 506 728 639/252
SEEN-BY: 670/218
@PATH: 2476/418 480 2410/200 2432/200 2433/1200 225 270/101 396/1 633/260
@PATH: 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.