On 2019-10-22 12:09 PM, Mike Hochee wrote:
Define application program? COBOL batch or CICS transaction program?
Most legacy applications on z/OS don't implement concurrency.
Agreed, they don't implement concurrency, however they are often very heavily
reliant upon on it, as it is built into the database management and message
queuing systems they access (whether the programmer is aware of it or not). As
a result, workloads generally move right along.
Yep. And considering how difficult it is to do concurrency correctly
that's a good thing.
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf
Of David Crayford
Sent: Monday, October 21, 2019 11:16 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Best way for a task to give up the CPU and let other tasks run?
Caution! This message was sent from outside your organization.
On 2019-10-22 1:55 AM, Tony Harminc wrote:
On Sun, 20 Oct 2019 at 02:32, David Crayford <dcrayf...@gmail.com> wrote:
The only code I've seen that implements yield are synchronization
routines. Consider a spin-lock which is spinning on a CS instruction.
Why would any application program on z/OS implement and use a spin
lock?
Define application program? COBOL batch or CICS transaction program?
Most legacy applications on z/OS don't implement concurrency.
Porting modern code is another matter. You may find a lot of the new ported
code like Node.js (V8), libuv etc implement their own locks.
Why do the authors of such think they can do a better implementation
than the operating system?
Maybe using SETLOCK (which requires supervisor state, key 0) is an obstacle?
If you think you need a spin lock on z/OS, you should probably be
using transactional execution.
Yes, I agree. But it's quite tricky to grok and you need to crack open the
assembler!
There's an example of a lock-free queue using transactional execution in Zowe
https://github.com/zowe/zowe-common-c/blob/719251839033059fb3b507f26f6fbb58be57f188/c/collections.c#L1123
Tony H.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send
email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to
lists...@listserv.ua.edu with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN