On Thu, 24 Jan 2002, Shlomi Fish wrote:
> Actually, I checked it and now it is working. The problem I encountered > was that several readers seem to starve the writers. Especially thesecond > writer out of two. show us the code, and state the architecture it's running on (kernel version, glibc version? 32 bit files or 64 bit files?) - perhaps its a kernel misshap, and perhaps its something in your code. don't be too quick to judge that the problem is not yours. > Should I port my FCFS RWLock to the Linux kernel? why? did you read the code of the locks that are currently there? your lock will have hard time competing with them, if you don't re-write it in assembly ;) > > please clear this up again and more. > > I hope I did. It seems flock() is thread-enabled, so one may choose to use > it. But like I said, there seems to be a starvation problem. I suppose one > can write a more elaborate lock by putting the arbitration in a dedicated > process, and letting it inform the other processes and threads of the time > their priviliges were granted by some IPC mechanism. this is quite an overkill, unless you wish to slow down your system because its running too fast. or unless the resource processing itself takes a rather long time, in which this complicated locking would not ad much to it. -- guy "For world domination - press 1, or dial 0, and please hold, for the creator." -- nob o. dy ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
