TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Coridon Henshaw
from: Peter Fitzsimmons
date: 1996-01-24 00:19:20
subject: Multithreaded directory sweeps

CH> I have a program that needs to gather the names and 
 CH> statistics of all files on any number of drives.  
 CH> Would there be any advantage
 CH> in making the scanning subsystem multithreaded?

Yes -- particularly if the drives are on separate disk controllers;OS/2 can
get all the non-pio ones busy at the same time.   Additionally,later
generation scsi controllers/devices can have multiple outstanding requests.

If the hardware does not support any of these advanced features,  you won't
be hurting performance by having more than one thread pounding away.

One problem to consider (regardless of hardware):  If a physical disk is
partitioned into logical drives,  accessing more than one drive letter on
it at the same time may cause more seeking then if they were done in turn.

You can use the physical disk ioctls to figure out where the partitions
really lie,  or let the user tell you some how (this might be
desirable,since a remote drive can't be inspected with an ioctl).

 CH> In any case, how can I find out which physical disk a 
 CH> partition is located on and the disk subsystem type?

Use the category 9 ioctls (physical disk access) to read the partition
table and figure it out yourself.  This is the only way I can think of
without writing an *.FLT (a device driver) that inspects the os2dasd.dmd
drive chain.

The source code for os2dasd.dmd is on the DDK cdrom, and is enjoyable
reading for the very curious.


--- Maximus/2 3.00
* Origin: Sol 3 * Toronto * V.32 * (905)858-8488 (1:259/414)
SEEN-BY: 50/99 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: 259/414 400 99 250/99 3615/50 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™.