TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Stephen Lindholm
from: Rob Landley
date: 1995-05-24 01:50:24
subject: Curious

> I'm curious about SMP:
> 
> Why the heck doesn't this smash all of the device drivers which assume that
> they will have complete control of the system without having something else
> run at the same time except when they permit it (almost all of them?) to
> itty bitty pieces?
> 
> Surely the other CPU's don't block while a device driver is called!

No, but all tasks that access that device go through that device driver. 
Since the device driver's used to having multiple requests come in from
various different threads anyway (hey, the OS will swap out of a thread
that's in the middle of a device driver just as easily as anything else. 
That's what "re-entrant" means.), the device driver already knows
how to deal with that.  Either it has a mutex semaphore controlling access
to it, or it has a buffer and has its own thread for actual access to the
hardware.

Basically TRUE multitasking and SMP have approximately the same
considerations.  Between any two cpu instructions the OS could swap out of
your process and swap back in, so if you want to protect your sequence from
other processes, you have to use semaphores.

Rob
 
--- Xblat
* Origin: The Conversation Pit, Marlton NJ 609-985-7553 OS/2 V34 (1:266/30)
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: 266/30 40 100 505 3615/50 396/1 270/101 105/103 42 712/515 711/808 809
@PATH: 711/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™.