Interesting, thanks! So it generates an external interrupt. I always
thought that one was only for the external interrupt "key", but this
page indicates CPU timer and some kind of CP-to-CP communication too:
https://www.ibm.com/support/knowledgecenter/zosbasics/com.ibm.zos.zconcepts/zconc_interrupts.htm
Ok... now back to my weekend work, like changing the oil in my truck.
On 10/19/2019 3:54 PM, Charles Mills wrote:
Check out "CPU Timer" in the Principles of Operation.
Charles
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf
Of Charles Mills
Sent: Saturday, October 19, 2019 12:47 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Best way for a task to give up the CPU and let other tasks run?
Thanks!
I suppose some encryption algorithm for which there was no hardware assist
available might be a more practical real-world scenario.
Is there something in the dispatcher that is on a timer that ends up saying
this task has gotten enough CPU and it's time to move to the next TCB?
In my way imperfect understanding, yes. I believe there is a hardware feature now wherein
MVS can say "give me an interrupt when this CPU has run for nnn CPU
microseconds" or something similar.
If not, then most operating systems have a concept of the time slice: we will
let set a hardware timer for nnn real-time microseconds and when the timer goes
off, re-evaluate our scheduling algorithm.
Charles
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf
Of Tom Brennan
Sent: Saturday, October 19, 2019 12:37 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Best way for a task to give up the CPU and let other tasks run?
Great descriptions! I was thinking of the PI calculation myself because
that's a case where you're doing real work, but the loop could be coded
with no I/O and no SVC calls (which would give up control). Now here's
a case I thought about in the past: Assuming I'm running such a PI
calculation (non-supervisor, interrupts enabled), what is it that
eventually interrupts my running code? Of course there are previous I/O
completions from other tasks or CP's, but imagine (maybe on a
specialized system?) there's nothing much else going on. Is there
something in the dispatcher that is on a timer that ends up saying this
task has gotten enough CPU and it's time to move to the next TCB?
----------------------------------------------------------------------
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