z/OS UNIX System Services File System Interface Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Sharing files

z/OS UNIX System Services File System Interface Reference
SA23-2285-00

The LFS manages user access to the vnodes. For programs that use the open() or socket() function, the LFS allocates file descriptors and manages sharing between processes and threads within a process. For VFS server programs, the LFS allocates vnode tokens, which behave somewhat like file descriptors. All programs, of any type, share the same file hierarchy.

The PFS is not aware of who is using a file or how it is being shared. To the PFS, there is only a vnode-inode pairing, and all file references come through that structure. In effect, the PFS has only one user: the LFS.

The PFS does not generally maintain any state information that would associate a sequence of calls. Successive calls to the PFS may relate to different end users, so every call is self-contained and does not depend on any information saved by the PFS from a previous call.

Files become shared when different end users open the same file, and when additional references to descriptors are created through the fork() and dup() functions.

Because the LFS maintains reference counts in its structures, it knows how many references to a given vnode are active and how many threads are currently making a call to the PFS with each reference. The PFS does not, therefore, have to be aware of how many users are accessing a given vnode-inode pair. The LFS ensures that all activity has ended and that the vnode-inode pair is no longer in use before it invokes vn_inactive to disassociate the vnode and inode.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014