| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Dos Programming - Os/2 S |
Hi Bob!
Antwort auf eine Message von Bob Liles an Michael Douglass:
MD>> Ok, even when I do sense OS/2, how can I make my program release time
MD>> slices while sitting in an input loop?
Should be avoided if possible. Rather use interrupt- or event-driven techniques.
MD>> I have a loop that checks for keyboard and mouse input, I would
like to allow the release of
MD>> OS/2 time slices for OS/2 users.
BL> I don't know anything about C or C++ programming, but in assembly you
BL> do that by pushing a double word "0" onto the stack and doing a far
BL> call to DosSleep.
AFAIK there is/was a little bug (?). DosSleep (0L) won't release a complete
timeslice, but DosSleep (1L) will. I'm not very sure about this, but after
a few tests, I got very different results from those two calls. You'll have
to try, which one fits better for the input loop.
I've used this for some measuring purposes, actually I tried to gather
knowledge about OS/2s thread switching. Although my results are not very
exact, I think the thread switching time is below 60 micro seconds on a
486/66.
When measuring 64 Threads usind DosSleep(1L), the CPU load raises to 17%.
When doing the same with DosSleep(0L) to "pre-empt" the current
thread voluntarily, the CPU load raises to 100%.
Has anyone suggestions on how to measure this thread or process switching
time more exactly ?
__
|_) Internet: Haller{at}ti-nov1.fbe.fh-weingarten.de
cu/2.1 |atrick Fidonet: 2:246/2320.18 ZebraNet: 7:7000/7998
--- FleetStreet 0.88wb
* Origin: Zebra / Uplink / Bodensee Bitbeisser Crew ! (2:246/2320.18)SEEN-BY: 54/54 620/243 632/348 640/820 690/660 711/409 413 430 807 808 809 SEEN-BY: 711/934 712/353 623 713/888 800/1 2442/0 @PATH: 246/2320 2300 2200 2426/2000 24/24 396/1 3615/50 229/2 @PATH: 2442/0 711/409 54/54 711/808 809 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™.