You only get the CPU for a time slice, or until the next interrupt occurs, which is very often. After each interrupt, the highest priority piece of work is dispatched. If you are still at the top, you go next. If not, you wait until you are at the top of the dispatch chain.
Chris Blaicher Technical Architect Syncsort, Inc. -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Matt Hogstrom Sent: Friday, October 18, 2019 2:13 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Best way for a task to give up the CPU and let other tasks run? From a design perspective it would seem that your task is done and waiting for more work? Generally I’d think you’d want to wait and have someone post that work is ready or an stimer to wait for a period of time. z/OS is unlike many operating systems where it will pre-empt running work and so the need to yield is not really necessary. Matt Hogstrom PGP key 0F143BC1 > On Oct 18, 2019, at 14:02, Tony Harminc <t...@harminc.net> wrote: > > On Thu, 17 Oct 2019 at 08:54, Thomas David Rivers <riv...@dignus.com> wrote: > >> Does anyone happen to know the best way for a running task to give up >> running and let another task run? > >> Sorta like "I'm done for the moment if something else would like to run". > > This sounds so wrong right from the start. Or rather, sounds like > something that you might do if you were running on a thermostat or the > controller for a microwave or something, i.e. some environment where > there aren't OS services to manage all this. > > I'm very curious about what has led you to believe you need to do > this. Has the work to be done somehow changed in importance? If so, > how would you discover this fact on the fly? Can you give a > real-world example of why you'd want to yield to someone else, rather > than have the Powers That Be manage CPU resources for you? > > If you *do* somehow discover that your work has become less important, > you might consider calling WLM to tell *it* that this is the case, > i.e. by changing the service class the work is in. > > 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