Micheal:

Agreed, issuing the SVC 35 causes control to be passed to the SVC routine. But there is not a task switch, as the SVC runs under the same TCB as the program that issued it. So the dispatcher is not involved.

The SVRB is added to the request block (RB) stack of the TCB under which the issuing program runs. The SVRB is there to save the registers and other status of the issuer so that the issuer regains its original status on return from the SVC routine.

The need to save a caller's registers is not an indication that the dispatcher is involved.

The dispatcher gets involved when the currently executing program in a tasks's RB stack enters a wait state, is suspended, or anything else occurs that causes it to become unable to continue. An interrupt that causes higher priority work to become ready ro run (dispatchable) will also wrest control from a lower priority task (preemptive dispatching), but a program cannot prevent that from happening unless it can somehow mask off all interrupts.

Mike Myers
Mentor Services Corp.

On 9/12/2010 2:55 AM, michealbutz wrote:
I was under the misunderstanding that any interrupt WAIT or in this SVC 35 the 
dispatcher
gives up control to another task after all what is the propose of a SVRB but to 
save the
registers of the Current task

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Gerhard
Postpischil
Sent: Sunday, September 12, 2010 2:15 AM
To: [email protected]
Subject: Re: Issuing WTOR SVC In Multitask Environment

On 9/12/2010 1:42 AM, michealbutz wrote:
         WTOR   'WAIT AND DON'T GIVE CONTROL TO ANOTHER TASK.',REPLY,1,RESPECB
So instead of doing a WAIT ECB=RESPECB AFTER THE WTOR
             HARDLOOP     DS   0H
                          TM   RESBECB,X'40'
                          BNO  HARDLOOP
All that does is to run up your CPU time, but does not keep the
dispatcher from letting other tasks run. If you want to run
without letting other tasks get control, you need an SMC
enqueue, and run as an authorized task, and even then that makes
sense in only in rare circumstances.

I think you may be better served by stating what you wish to
accomplish, rather than trying to force an answer.

Gerhard Postpischil
Bradford, VT

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to