Search Options
Skip to main content (Press Enter).
Sign in
Skip auxiliary navigation (Press Enter).
Skip main navigation (Press Enter).
Toggle navigation
Search Options
Home
Forums
All Forums
My Forums
IBM i
IBM zSystems
MultiValue
Uniface
Browse
Help/FAQs
All Discussion Posts
Blog Posts
Announcements
Digital Disrupted Podcast
Getting Started
Join the Forum
Rocket U2 | UniVerse & UniData
View Only
Sub-Forum Home
Threads
3.1K
Members
653
Back to {0}
uv / LOCK / waiters
Thread closed by the administrator, not accepting new replies.
Add a tag
x
User Tags may not contain the following characters: @ # $ & :
PARTNER
Manu Fernandes
posted 06-02-2022 07:58
hi everybody,
question how to known the LOCK waiters : --
a/ session1 set a task synchronization lock with LOCK 9
b/ session2 will set a task synchronization lock with LOCK 9 without PROMPT NO.WAIT nor ELSE on basic. (yes bad coding but legacy :-)
then session2 is suspended until session1 UNLOCK 9
So, for admin point of view, is there a method to list 'LOCK ' waiters ?
like ...
session2 wait for lock 9 owned by session1
actually, my solution is to perform PORT.STATUS PORT 2 + VLIST current program + check if adress line is the command is LOCK ...
any idea ?
many thanks
manu
Dale Kelley
posted 06-03-2022 07:39
Hey Manu,
I decided those held LOCK's could be defeated. Don't know if you could do with legacy code but I wrote a subroutine to update every file, it LOCKs the record, checks to insure that the record matches the original saved read, writes it and unLOCKs. I only call it if the user has changed the record. Legacy code can make that a difficult process, just a suggestion.
Dale
ROCKETEER
Neil Morris
posted 06-03-2022 10:46
Hi Manu,
I'm only aware of being able to obtain the owner of the LOCK via the LIST.LOCKS command. I don't think currently there is any specific command to find waiters. Beyond changing the code, your approach of using PORT.STATUS and VLIST seems reasonable.
Thanks,
Neil
ROCKETEER
Jonathan Smith
posted 06-06-2022 05:31
Manu,
In UniData there is a LIST.QUEUE command which shows not only the read waiters for the semaphore locks used by the 'LOCK' command but also lists the READU / READL and filelock waiters as well. Starting at UniVerse 12 the internal lock structure used in UniVerse was changed to used the UniData model as UniData has a fairer.better and more efficient internal locking mechanism. Internally we are discussing a proposal of adding the LIST.QUEUE command functionality as an enhancement to UniVerse 12. For reference starting at UniVerse 12 the engineering interface commands where also added that allow you to see the read waiters and semaphore LOCKs simply.
For anyone interested I do have a presentation I did internally on the UniData and UniVerse 12 lock structures and tools that I can make avaialable. Please remember the information applies to UniData and UniVerse 12 onwards only.
Thanks,
Jonathan
ROCKETEER
Jonathan Smith
posted 06-06-2022 05:36
I have tried to attach the presentation to this link but the add attachment does not seem to be working at the moment. If anyone is interested in the presentation let me know and I'll find a way of getting it shared.
PARTNER
Manu Fernandes
posted 06-06-2022 11:55
hi
Jonathan
yes, please publish your presentation.
thanks
manu
Copyright 2022. All rights reserved.
Powered by Higher Logic