Re: [Exim] mbx locking

Top Page
Delete this message
Reply to this message
Author: Nigel Metheringham
Date:  
To: Ray Miller
CC: Philip Hazel, exim-users
Subject: Re: [Exim] mbx locking
I guess that on MBX mailboxes, the mailbox is locked for a "reasonable"
length of time for delivery/reading, so if you have a pile of processes
trying to delivery you may get a locking profile something like:-

UULLLLLLLLLLLLULLLLLLLLLLUULLLLLLLLLLLULLLLLLLLLLLUULLLLLLL

[where time runs across that line, L is locked, U is unlocked]

This means a process trying to get a lock on the box by doing

    while(not locked and not too many attempts)
        attempt non blocking lock
        if failed
            sleep
        endif
    endwhile


may have a pretty small chance of succeeding, where as an algorithm
that sets an alarm and then attempts a blocking lock may well get in.
Of course if the amount of time that the file needs to be locked to
handle the traffic approaches the real time available then real
problems occur....

I think we have a statistical problem at present. Other ways of
handling this might also include random exponential backoff (ie like
network protocols) since currently there may be the chance of getting
all the processes in lockstep :-(

    Nigel.
-- 
[ - Opinions expressed are personal and may not be shared by VData - ]
[ Nigel Metheringham                  Nigel.Metheringham@??? ]
[ Phone: +44 1423 850000                         Fax +44 1423 858866 ]