TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Stephen Lindholm
from: Mike Bilow
date: 1995-05-21 22:02:38
subject: Curious

Stephen Lindholm wrote in a message to Rob Landley:

 SL> I'm curious about SMP:

 SL> Why the heck doesn't this smash all of the device drivers
 SL> which assume that they will have complete control of the
 SL> system without having something else run at the same time
 SL> except when they permit it (almost all of them?) to itty
 SL> bitty pieces?

 SL> Surely the other CPU's don't block while a device driver is
 SL> called! 

The DevHelp_AcquireSpinLock() call allows a driver to freeze all of the
other CPUs in the system in order to perform some sort of extremely
critical operation, using a handle created earlier with
DosCreateSpinlock().  The system requires that such "spin locks"
be released as quickly as possible after being acquired.

It is very rare that such a "spin lock" will be needed, since
device drivers are ordinarily written to be fully re-entrant anyway.  OS/2
makes sure that there are not multiple copies of a device driver running on
different CPUs at the same time, so the ordinary constraints of re-entrancy
usually suffice.
 
-- Mike


---
* Origin: N1BEE BBS +1 401 944 8498 V.34/V.FC/V.32bis/HST16.8 (1:323/107)
SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 323/107 150 3615/50 396/1 270/101 105/103 42 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™.