svc document

2
SVC Document: Defined at SYS1.PARMLIB(IEASVC00) Supervisor Call instruction (SVC) is an instruction used to cause an interrupt in order to perform a system call. It is similar to Master Mode Entry (MME) in the GE 600 series, INT, SYSENTER, and SYSCALL in x86 processors, and so on. IBM mainframes in the System/360 operate in either of two states: problem state and supervisor state. Problem state does not relate to difficulties, but to the state in which the computer is supposed to solve the user's problem, such as administration or text processing. In supervisor state, programs are able to use instructions that are unavailable in problem state, e.g., for I/O. The intended use of SVC is for the operating system to initialize the SVC new PSW to supervisor state, with an instruction address pointing to an SVC handler that will do housekeeping and analyze the SVC number from the SVC instruction. There are four standard types of SVCs in OS/360, known simply as Types 1,2, 3 and 4. Types 1 and 2 are always resident and are part of the nucleus. An example is SVC 10, used for both GETMAIN and FREEMAIN, which are the mechanisms to allocate an area of main storage and to subsequently free it up again. Types 3 and 4 are brought in as necessary. An example is SVC 19, OPEN, which is used to open a dataset and make it available for use by a user program. In addition, an installation can provide their own user-written resident SVCs. SVC Definition at Parmlib SVCPARM 235,REPLACE,TYPE(4),EPNAME(IGC0023E) /* RESERVED IMS TYPE 4 SVC SVCPARM 234,REPLACE,TYPE(2),EPNAME(IGC234) /* RESERVED IMS TYPE 2 SVC IMS only uses type 2 and type 4 SVC SVC Type 4 is kept at SYS3A.IS.LPALIB. SVC Type 2 is kept at SYS3.IS.NUCLEUS.

Upload: aman-singh

Post on 28-Mar-2015

159 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: SVC Document

SVC Document: Defined at SYS1.PARMLIB(IEASVC00)

Supervisor Call instruction (SVC) is an instruction used to cause an interrupt in order to perform a system call. It is similar to Master Mode Entry (MME) in the GE 600 series, INT, SYSENTER, and SYSCALL in x86 processors, and so on.

IBM mainframes in the System/360 operate in either of two states: problem state and supervisor state. 

Problem state does not relate to difficulties, but to the state in which the computer is supposed to solve the user's problem, such as administration or text processing.

In supervisor state, programs are able to use instructions that are unavailable in problem state, e.g., for I/O. The intended use of SVC is for the operating system to initialize the SVC new PSW to supervisor state, with an instruction address pointing to an SVC handler that will do housekeeping and analyze the SVC number from the SVC instruction.

There are four standard types of SVCs in OS/360, known simply as Types 1,2, 3 and 4.

Types 1 and 2 are always resident and are part of the nucleus. An example is SVC 10, used for both GETMAIN and FREEMAIN, which are the mechanisms to allocate an area of main storage and to subsequently free it up again. Types 3 and 4 are brought in as necessary. An example is SVC 19, OPEN, which is used to open a dataset and make it available for use by a user program. In addition, an installation can provide their own user-written resident SVCs.

SVC Definition at Parmlib

SVCPARM 235,REPLACE,TYPE(4),EPNAME(IGC0023E) /* RESERVED IMS TYPE 4 SVC

SVCPARM 234,REPLACE,TYPE(2),EPNAME(IGC234) /* RESERVED IMS TYPE 2 SVC

IMS only uses type 2 and type 4 SVC

SVC Type 4 is kept at SYS3A.IS.LPALIB.SVC Type 2 is kept at SYS3.IS.NUCLEUS. The default naming convention for routines for SVC types 1, 2, and 6 is IGCnnn, wherennn is the decimal number of the SVC routine.

The default naming convention for SVC routines for SVC types 3 and 4 is IGC00nnn, where nnn is the signed decimal number of the SVC routine. Here, a signed decimal is a number that ends in either of the following ways:

You do not need to specify the LOCAL lock for SVC type 1; the LOCAL lock is automatically obtained for SVC type 1.If you specify the CMS lock for SVC types 2, 3, or 4, you must also specify the LOCAL lock.You cannot specify a global spin lock for SVC types 3 or 4.You cannot specify locks for SVC type 6.