Re: Should COBOL be lockedUP for good?...



> I think I'd drive the locking more actively than waiting for
> system-supplied timeouts.

That seems to be primarily a Windows deficiency, or at least a
deficiency of Fat Client using shared files. MS-DOS based systems were
even worse as there seemed to be no timeout at all.

Unix had no record locking mechanism until Xenix was added so compiler
systems built their own locking (or used C-ISAM's).

I mainly used DRI multiuser systems for many years, starting with MP/M
II and MF CIS Cobol + FileShare the Level II and Cobol/2 on
Concurrent-DOS. These gave OS level record locks that were reliable and
released immediately if the process stopped or crashed.

Before I moved to Linux I tested to ensure that automatic unlocking
occurred reliably and quickly. Running a small number of systems on
Windows (granted it was long ago) had demonstrated that if a client
machine is switched off or rebooted, or the 'close' tag clicked, while
it held a lock invaribly resulted in eventually having to reboot the
whole network (well at least the file server).

I don't think that 'Timeouts' are sensible. There may be good reasons
why I would want to lock a record for some hours, there are certainly
good reasons why I want all locks released immediately if the client
dies.

> Anyway, why go to all that trouble when an RDBMS will handle it all
properly?

You raise a good point. What exactly does happen on Windows if I do a
'SELECT .. FOR UPDATE' and obtain a lock and then turn simply pull the
network cable from my client machine ?

Would it remain locked awaiting my next instruction ? Would it be
polling the client machine to see if I was still there ? or would it
..... timeout ?

.



Relevant Pages

  • Re: Speed with Fujitsu Cobol
    ... Thanks a lot for the suggestions, however the same application run in a system with the Windows 2003 Server has a completely different reply. ... I do not use OPEN WITH LOCK or LOCK MODE ... that the client is not just 'reading a record', ... index and transferring multiple blocks of data across the network so ...
    (comp.lang.cobol)
  • Re: pthread_mutex_trylock vs. pthread_mutex_lock
    ... collect ownership info and put in timeouts to expose ... likely to own the lock. ... question to put in instrumentation that will routinely report ... the current time is less overhead ...
    (comp.programming.threads)
  • Re: How to deal with References that point to "dead" servants
    ... Assuming timeouts are not possible, the approach I mention below might ... then on the client ... in your servants which "call back" on an object every N seconds. ...
    (comp.object.corba)
  • Re: Welche Socket Komponente/ Klasse eignet sich gut für Timeouts?
    ... je nach windows interna. ... HANDLE xEvent; ... WSAWaitForMultipleEvents ... Welche Socket Komponente eignet sich gut für Timeouts? ...
    (microsoft.public.de.vc)
  • Re: New "timeout" api, to replace callout
    ... only ever grab the specified lock when it calls the timeout function. ... My plan is to use non-blocking grabs of the timeouts lock to get ...
    (freebsd-arch)