TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Peter Schuller
from: Denis Tonn
date: 1997-02-05 20:41:12
subject: Multiple threads accessi

Original from  Peter Schuller  to All on 02-02-1997
Original Subject: Multiple threads accessin

                         ---------------------------------------

PS> I'm currently developing a BBS system, and of course - multinode. This means 
PS> that there will be multiple threads or processes (depending on how I'll 
PS> implement it) be accessing the same files! Let's take the message-files 
PS> and file-files for instance. If 4 nodes wishes to read/write to the same 
PS> message/file-base (thus, the same file), how do I coordinate this? Semphores' 

 If multiprocess, have all open the message file as denynone. Then use
record locks to lock particular ranges when writing new messages to 
the file. Same thing for multithreads in the same process. 
 You might need to semaphore a routine that "assigns" a message number
and location in the file for any message, but record locks should work
fine for the actual write.


   Denis       

 All opinions are my very own, IBM has no claim upon them
. 
. 
.
--- Maximus/2 3.01
* Origin: T-Board - (604) 277-4574 (1:153/908)
SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407
SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1
@PATH: 153/908 8086 800 270/101 712/624 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™.