Page 1 of 1

zOS Dispatcher

Posted: Tue Mar 11, 2014 12:47 pm
by Quasar Chunawala
I was just doing some general reading on the Internet about the evolution of the z/OS dispatcher, SRM(now WLM) amongst other things. What I gather is, in the old MVS/370, there were just two CPUs. As one TCB or SRB would access resources this would put the whole system in a WAIT mode. The dispatcher would keep looping and wait for the lock to open - Spinlocksis the term for it, I believe.

I have a bit of a lame question : wouldn't the TCB or SRB just access the reources that it needs? Not sure, why in the world would the whole system WAIT?

Re: zOS Dispatcher

Posted: Tue Mar 18, 2014 1:00 am
by Anuj Dhawan
I had been looking for the online reference which might refer about "... put the whole system on WAIT" but was not successful. If possible, could you please share the document or a link.

Re: zOS Dispatcher

Posted: Sat Jun 25, 2016 7:07 pm
by Gerhard_Adam
In a single CPU situation, then only one instruction stream can be processed at a time. So whatever that does will determine the behavior of the whole machine.

When there is more than one processor, the operating system provides a mechanism for serializing access to resources. This is required to ensure that more than one process doesn't attempt to update the same data at the same time. Therefore in the case of the dispatcher, the point is that technically the dispatcher code can be running simultaneously on more than one CPU. As a result, when critical fields are being updated, the Dispatch lock must be acquired. If another processor also wants this, then it will go into a spin-loop waiting fo the dispatch lock to be released.

This is NOT a wait condition, but is 100% CPU busy while this is occurring. It may appear like the system is "hung" because it may be disabled for interrupts.

I'm not sure about your statement regarding a TCB or SRB just accessing the resources that it needs. Once access to the CPU is granted, no one else can use it until the TCB or SRB ends or is interrupted. All computer systems operate in that fashion.