TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mike Bilow
from: Mario Semo
date: 1996-03-05 13:54:28
subject: mutex semaphores

Hello Mike,

On Mar 01 15:28 96, Mike Bilow of 1:323/107 wrote:

 MS>> I'm interested in semaphores which are avail in the next
 MS>> 10microSecs.  

 MB> This can never happen.  If your process is not actually 

simple wrong. 

// query old prior if you want
DosSetPriority(timecritical,0) // not really required. just in case.
DosAsyncTimer(10ms, hev)
DosWaitEventSem(hev)
DosSetPriority(old prior)

comes within 10ms. 

 MB> Even a fairly fast system would be hard pressed to handle a 
 MB> hardware IRQ within 10 us, although this is probably quite 

I'm doing 57.6 KB comminication with a controlling system (of a large
chemical industry process) and they (its on one my customers systems)
emulate a 'token ring' based on loop'ed async connection. When the token is
on my machine, i have 11ms to react - else the token is going to the next
machine - and i have no problems with this one. i'm neary never missing the
token. 

running on at least 75MHZ systems with 32MB mem only the machine is even
not really busy doing all this stuff. pulse is near 0. 

on the other hand, running on only 33MHZ system, it is also working, but
pulse is at 100%. 

 MB> time, I think that the most optimistic possible response 
 MB> under OS/2 is probably around 5-6 us.

thats sounds correct. The above code with DosAsyncTimer response in about
7.3ms in 95% of all testcases. 

PS: DosSleep of course will never return in <= 31ms. even not in
TimeCrtitcalThreads. 

 WARPED!, Mario

--- Msgedsq/2 2.2e
* Origin: LC/32 Development Team-Vienna-Austria (2:310/14.11)
SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 310/14 1 24/999 2/777 396/1 270/101 712/515 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™.