If you're running authorized then you can get into Supervisor mode and 
serialize, but that still won't let you query an address space that is swapped 
out. For his purposes that may not matter, since if it is swapped out then it 
doesn't have a TCB on any CPU.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of 
Joel C. Ewing [[email protected]]
Sent: Sunday, May 16, 2021 11:17 AM
To: [email protected]
Subject: Re: Currently executing TCB in an address space

Definitely not true on a system with multiple CPs:  Even multiple TCBs
in the same address space can have an active processor at the same
time.  Easy to observe on a CICS address space with heavy DB2 usage
where processor utilization can substantially exceed 100% of one CP.   A
given TCB of course will at most have one CP assigned at any instant of
time.

A running program can reliably ask what its own TCB is, but asking by
any of several means whether other processors are associated with any
other TCB, in your address space or another, gets an answer that is only
correct at that exact different instant for each TCB and that may be
wrong by the time you plan to use that information.  By sampling you
could perhaps get a statistical estimate of percentage of total CP usage
by various TCBs (other than TCB of the sampling program, which will
always be found active 100% of the time).  There is no way to ask via
program instructions about true concurrent CP usage.

z/OS can measure CP usage by a TCB & Address Space to some extent by
measurements at start and end of CP dispatching (captured CPU time).
The Hardware can measure CP percentage active for each CP.  Not 100%
accurate but that's about as close as it gets.
    Joel C. Ewing

On 5/16/21 9:25 AM, Joseph Reichman wrote:
> At any nanosecond there is one
> I guess if you had program running authorized and wanted to know where in 
> address space X the code is running or in the general vicinity once you got 
> the TCB then TCB->RB then looked at RBOPSW
>
>
>
>> On May 16, 2021, at 10:17 AM, Jeremy Nicoll <[email protected]> 
>> wrote:
>>
>> On Sun, 16 May 2021, at 14:54, Joseph Reichman wrote:
>>> I was looking to find out in any given address space is there a way to know
>>> what TCB is currently executing
>> You're still wrongly assuming that there can only be one.
>>
>> Perhaps it would help if you explained why you need to know what is
>> executing where?
>>
>> --
>> Jeremy Nicoll - my opinions are my own.
>>

--
Joel C. Ewing

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to