>This leads me to reconsider my understanding about the process of getting >a spin lock. I used to think what SETLOCK does is just keeping on check >the lockword and running disabled. Then, what is the difference between a >spin loop and a disabled loop?
I am not sure I understand the question. Why do you care *how* the operating system *obtains* the lock for you? An excessive spin loop normally does not occur while *obtaining* a spin lock, but when doing the processing that that spin lock actually serializes. The normal process would be: 1. setlock obtain whatever-lock 2. do the processing you need to so 3. setlock release whatever lock A spin loop is something that occurs thousands of times per minute on every system. Only when someone holds the locks for too long without releasing them an excessive spin is detected (this was explained before). I believe you can also 'spin' on other things like waiting in a tight loop for a bit to be turned off. >So my guess is, what SETLOCK does is a 'timed disabled loop'. That is, >most of the time it'll loop disabled but not forever. It will enable the >processor regularly thus an excessive spin loop can be detected and >handled by system. Did I miss something here? Yes :-). A spin loop is always detected by *another* processor that wants to 'talk' to one that is running disabled. That 'talk' can be done by using the SIGP instruction, and according to protocol (which I believe is OCO) the spinning (looping) processor has to look out for SIGPs periodically *while doing what it is doing*. The processor does not 'enable' in the psw sense of an enabled psw - at that point every other interrupt could come in, too, which might be deadly. Please don't attempt to test the SIGP instruction in an authorized assembler program! You're guaranteed to bring the system down - I have seen an sadump where a sysprog attempted exactly that. IBM has a complete module around that sigp instruction that does all the protocol stuff. Your question about the rbs: TCPRBP is always the RB to look at in a dump because that one we were excuting under last. Depending on the IPCS command you use to look at the address space, it may be formatted right below the tcb (summary registers) or in 'creation order' (summary format). Personally, I prefer summ regi, because I can see at a glance both the psw, wlic and the registers (which are stored in the tcb). Regards, Barbara -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kanns mit allen: http://www.gmx.net/de/go/multimessenger ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html