| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | DOS OS/2 Advice ?? |
`| Date: 10-14-96 Time: 10:16a Number: 936
|| From: DAVID NOON Refer:
|| To: LEE ARONER Board ID: GREY-BBS Reply:
||Subject: DOS OS/2 Advice ?? 2585: OS/2 Prog Status: Public
||-----------------------------------------------------------------------------
DN> On Saturday, 96/10/12, LEE ARONER wrote to JONATHAN DE BOYNE POLLARD
> about "DOS OS/2 Advice ??" as follows:
LA> I don't see it that way....what I want to do is relinquish the
LA> remainder of a slice, when I don't need *all* of it.....that's
LA> different from saying you have *no* usefull work to do...DV could
LA> do this, why not OS/2 ?
DN> Hi Lee,
DN> If your thread has useful work to do then why relinquish the
> timeslice? We have preemptive thread management and if a higher
> priority thread becomes ready, yours will be preempted at the end of
> its current timeslice. Simply adjust your thread's priority so that it
> doesn't steal CPU cycles from more important work.
Dave, I appreciate the advice, but this was concerning a DOS app.
What I'm looking for is an Int call that OS/2 will interprete as
a priority downgrade, without totally shutting the application
off.
DN> Alternatively, if your thread has run out of work to do but is
> expecting more then it should block on an event semaphore. When the
> new work arrives the submitting thread should post the event and your
> thread will resume. In the interim it will consume no CPU cycles at all,
> regardless of its priority.
DN> Simply releasing timeslices smacks of polling. However, if you want to
> do it you simply use the DosSleep() API for a time less than 1
> timeslice, which is typically 32 milliseconds under OS/2. However,
> this seems like a bad way to design an app for OS/2. Don't poll; use
> threads.
It's a DOS app, not an event-driven specialty OS app...it *has*
to poll for input at some point.
My app uses internal multi-tasking to compensate for being
portable. It knows when it's busy, and when it's wasting
processor time waiting for a keystroke.
This is a DOS app, because it's the closest thing there is right
now to a portable exe format....it'll run under any OS, while
still taking advantage of specific OS features. Now if I could
just get the *best* multitasker to treat it as an *intelligent*
exe, I'll be happy.
Got any ideas ? What I want is that secret Int call that OS/2
will treat as an instruction to take the rest of the slice
away...but don't put me so far to sleep that I can't wake up
again without keyboard intercession.
L.A.
-- SPEED 2.00 #2720: If I were in denial, I'd never admit it.
--- Platinum Xpress/Win/Wildcat5! v2.0GK
* Origin: Grey Matter : (206) 526-2400 (1:343/210)SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934 SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1 @PATH: 343/210 270/101 712/515 711/808 934 |
|
| 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™.