0% found this document useful (0 votes)
12 views

OpenVMS Runtime Library

The OpenVMS Runtime library contains general-purpose procedures that perform operations like file I/O and string manipulation. It is organized into modules like LIB$, MTH$, and STR$ and supports languages like FORTRAN, COBOL, and PASCAL. System services provide process and resource control and communication between processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

OpenVMS Runtime Library

The OpenVMS Runtime library contains general-purpose procedures that perform operations like file I/O and string manipulation. It is organized into modules like LIB$, MTH$, and STR$ and supports languages like FORTRAN, COBOL, and PASCAL. System services provide process and resource control and communication between processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 19

OpenVMS Runtime library

 Set of language independent procedures used


by application programs.

Features
 These RTL procedures perform a wide range of
general-utility operations.
 Results returned are same irrespective of which
language calls them.
 Uses record management services for file I/O.
 Library procedures can be updated without
revising programs that call shared modules.
Organization of the RTL
 LIB$ - General purpose procedures
 MTH$ - Mathematics procedures
 SMG$ - Screen management procedures
 STR$ - String manipulation procedures
 OTS$ - language independent procedures
 BAS$ - BASIC specific support procedures
 COB$ - COBOL specific support procedures
 FOR$ - FORTRAN specific support procedures
 PAS$ - PASCAL specific support procedures
 PLI$ - PL/I specific support procedures
 RPG$ - RPG specific support procedures
LIB$ some commands
 LIB$GETJPI
– The Get Job/Process Information routine provides a simplified interface to the
$GETJPI system service. It provides accounting, status, and identification
information about a specified process.
– LIB$GETJPI obtains only one item of information in a single call.

 LIB$SPAWN
– The Spawn Subprocess routine requests the command language interpreter (CLI)
of the calling process to spawn a subprocess for executing CLI commands.
LIB$SPAWN provides the same function as the DCL command SPAWN.

 LIB$CONVERT_DATE_STRING
– The Convert Date String to Quadword routine converts an absolute date string
into an OpenVMS internal format date-time quadword. That is, given an input
date/time string of a specified format, LIB$CONVERT_DATE_STRING converts
this string to an OpenVMS internal format time.
SYS$GETJPI vs LIB$GETJPI
The differences among these procedures are as follows:

 SYS$GETJPI operates asynchronously.


 SYS$GETJPIW and LIB$GETJPI operate synchronously.
 SYS$GETJPI and SYS$GETJPIW can obtain one or more pieces of
information about a process or kernel thread in a single call.
 LIB$GETJPI can obtain only one piece of information about a process or
kernel thread in a single call.
 SYS$GETJPI and SYS$GETJPIW can specify an AST to execute at the
completion of the routine.
 SYS$GETJPI and SYS$GETJPIW can use an I/O status block (IOSB) to test
for completion of the routine.
 LIB$GETJPI can return some items either as strings or as numbers. It is
often the easiest to call from a high-level language because the caller is not
required to construct an item list.

 Example: In document 
LIB$SPAWN,
LIB$CONVERT_DATE_STRING
 The Spawn Subprocess routine requests the
command language interpreter (CLI) of the
calling process to spawn a subprocess for
executing CLI commands. LIB$SPAWN provides
the same function as the DCL command SPAWN
 There are some issues with this RTL call, it is
advised to use the SYS$CREPRC instead

 LIB$CONVERT_DATE_STRING document 
OpenVMS System Services
 Control resources available to processes
 Provides for communication between
processes
 Perform basic operating system functions
(I/O co-ordination)
Grouping of System services
 Security – Provides mechanisms to enhance and control system
security
 Event-Flag – clear, set, read event flags can place a process in wait
state pending the setting of these flags
 AST – Asynchronous System Traps, these are provided so a process
can control the handling of these interrupts
 Logical names – Logical name services provide a generalized
technique for maintaining and accessing character string logical
name and equivalence name pairs
 I/O – To provide for input and output operations directly at the
device driver level
 Process-control – Create, delete and control execution of processes
 Timer and Time conversion – Timer services schedule program
events for a particular time of the day. Time conversion routines
allow you to obtain and format binary time values for use with timer
services
Grouping of System services
 Condition handling – Handlers that receive control when
hardware or software exception occurs
 Memory management – Give you control over an
application program’s virtual address space.
– Allow an image to increase/decrease the amount of virtual
memory available
– Control the paging and swapping of virtual memory
– Create and access files that contain shareable code and data
 Lock management – Makes it possible for co-operating
processes to synchronize access to shared resources.
Security System services
 Provides the system manager or
application programmer with security-
based resources of the VMS OS
– Create and maintain a rights database
– Create and translate access-control entries
– Modify a process-rights list
– Check access protection
– Provide a security-erase pattern for disks
– Control access to magnetic tapes
Event-flag system services
 Programs can use event flags to perform a
variety of signaling functions.
 Each event flag has a unique decimal number,
event-flag arguments in system-service calls
refer to these numbers
 Groups of event flags are manipulated by
organizing them into event-flag clusters, each
cluster is made up of 32 flags

– Example: If you specify event flag 1 in a call to the


$QIO system service then event flag number 1 is set
when the I/O completes
AST (Asynchronous System Trap)
 Allow a process to request that it is interrupted when a particular
event occurs
 The trap provides a transfer of control to a user-specified procedure
that handles the event
 The system services that use the AST mechanism accept the
address of the AST service routine as an argument
– Declare AST ($DCLAST)
– Enqueue Lock Request ($ENQ)
– Get Device/Volume Information ($GETDVI)
– Get Job/Process Information ($GETJPI)
– Get System Wide information ($GETSYI)
– Queue I/O Request ($QIO)
– Set Timer ($SETIMR)
– Set power recovery AST ($SETPRA)
– Update section file on disk ($UPDSEC)
Logical name service
 This service provides a technique for
manipulating and substituting character string
names.
 Logical names are commonly used to specify
devices or files for input or output operations
 Logical names can be used to communicate
information between processes by creating a
logical name in a logical name table that is
accessible by another process
I/O System service
 Provides for basic input/output services
available to the application developer
 VAX Record Management Services (RMS)
provides a set of routines for general
purpose, device independent functions
such as data storage, retrieval and
modification
 I/O services permit you to use the I/O
resources of the OS directly
Process control service
 When you login, the system creates a process
for the execution of program images.
 Creation of another process to execute an image
by issuing the RUN or SPAWN command
– Create sub processes and detached processes
– Control the execution of a process
– Facilitate control and communication between
processes
– Control the hibernation or suspension of a process
– Control image-exit and exit handlers
– Control process deletion
VMS Timer and Time conversion
 To schedule, convert or cancel event
– Schedule the setting of an event flag or the queuing of an AST
for the current process, or cancel a pending request that has not
yet been honored
– Schedule a wake-up request for a hibernating process, or cancel
a pending wake-up request that has not yet been honored
 Obtain the current date and time in ASCII String
 Convert an ASCII string into the system time format
 Convert a system-time value into an ASCII string
 Convert the time from system format into integer values
Condition handling services
 Condition handler is a procedure given
control by the OS when an exception
occurs
 An exception is an event, detected by the
hardware or software and that interrupts
the execution of an image
– Examples are arithmetic overflow and
reserved opcode or operand faults
Memory management
 Control the relationship between physical
memory to a processes virtual address
space
 These activities are transparent to the
user as well as the programs
Lock management
 This allows synchronization and access to
shared resources
 Accomplished by providing a common data
area in which processes can lock a
specified resource by name
 It provides a queuing mechanism that
allows processes with in a queue to access
a particular resource when it is available

You might also like