TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Paul Edwards
from: Peter Fitzsimmons
date: 1996-02-04 03:48:08
subject: pdpclib

PF> What will happen if two or more threads use the 
PF> same 'FILE *' at the same 
PF> time?

 PE> Presumably what they deserve.


; I know what you mean -- but what about stdout/err/in -- surely
you have to let multiple threads use those; and if they use
global/static/alloc underneath,  those things better be thread safe.


PE> I was using a 7 meg file.

PF> So?

 PE> So you want me to run a 7 meg disk cache with HPFS?  The maximum
 PE> is 2 meg.  Or are you saying that reading from an HPFS disk is
 PE> faster than reading from memory?  I'd like to see that hard
 PE> disk!

Try it -- you might be surprised (I am not saying you WILL be;  I'm not
sure myself -- but I do know that vdisk.sys has "sleep"'s in it
on purpose,  so as not to impact system performance,  or break latency
guidelines).

I once did a test for a non-believer (This was under OS/2 1.3 with hpfs). 
I copied everything necessary to make a program that consisted of a dozen
or so C files.  I copied the compiler, header files, make files --
everything to a ram disk,  then to a hpfs partition.  HPFS beat the pants
off the ramdisk,  even when the HPFS cache was slightly smaller than the
sum of all the files involved.


--- 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™.