Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
PUT_FILE_OPEN_(2) OSS System Calls Reference Manual
• Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
General Considerations
File numbers File numbers are unique within a process. The lowest file number is 0 (zero) and
is reserved for $RECEIVE; the remaining file numbers start at 1. The lowest
available file number is always assigned, except in the case of backup opens.
When a file is closed, its file number becomes available for a subsequent file
open to use.
Maximum number of open files
The maximum number of files in the system that can be open at any given time
depends on the space available for control blocks: access control blocks
(ACBs), file control blocks (FCBs), and open control blocks (OCBs). The
amount of space available for control blocks is limited primarily by the physical
memory size of the system. The maximum amount of space for ACBs is deter-
mined by the size of the process file segment (PFS). See the description of the
pfs-size parameter for the PROCESS_CREATE_ procedure in the Guardian Pro-
cedure Calls Reference Manual.
Multiple opens by the same process
If a given file is opened more than once by the same process, a unique file
number is returned for each open. These file numbers provide logically separate
accesses to the same file; each file number has its own ACB, its own file posi-
tion, and its own last error value. If a nowait I/O operation haS begun and a
second nowait operation is started (using a second file number for the same file),
the I/O requests:
• Are independent
• Might arrive in either order at the destination
• Might complete in either order
Multiple opens on a given file can create a deadlock. Locks are granted on an
open file (that is, file number) basis. Therefore, if a process opens the same file
multiple times, a lock of one file number excludes access to the file through other
file numbers. The process is suspended forever if the default locking mode is in
effect and a deadlock occurs.
Limit on number of concurrent opens
There is a limit on the total number of concurrent opens permitted on a file. This
determination includes opens by all processes. The specific limit for a file
depends on the file’s device type:
Disk files Cannot exceed 32,767 opens per disk.
Process Defined by the process (see the discussion of controlling openers
in the Guardian Programmer’s Guide).
$0 Unlimited opens.
$0.#ZSPI 128 concurrent opens permitted.
$OSP Ten times the number of subdevices (up to a maximum of 830
opens).
5−204 Hewlett-Packard Company 527186-023