Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fd_perf(3H) — Pixar HSI 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mx(4)

fdperf(7)

FD_PERF(3H)  —  Pixar Programmer’s Manual — libfd

NAME

fd_perf− specify fast-disk filesystem library performance tradeoffs

SYNOPSIS

#include <fd.h>

fd_perf(v)
int v;

DESCRIPTION

Fd_perf allows the calling program to alter the tradeoff between performance and shared access made by the Fast-Disk filesystem management software.  It must be called prior to any other Fast-Disk filesystem request made by a process. 

The argument v specifies one of the following modes of behavior:

FDPERF_NORMAL (0)
This is the default mode of operation.  The calling process assumes it is sharing the Fast-Disk filesystem with other processes, and therefore minimizes the duration of periods of exclusive control over the Fast-Disk hardware.  Upon each libfd subroutine call, the libfd software must assume that the filesystem might have changed since the previous call, and it must therefore ignore any recollection of the state of the filesystem that it may have learned during the prior calls.  In this mode, the user trades speed for multi-process access. 

FDPERF_EXCLUSIVE (1)
The calling process takes exclusive control of the Fast-Disk filesystem, locking out all other competing processes until it exits.  A speed advantage is gained in this mode because libfd can maintain in-core copies of Fast-Disk directory and freelist blocks between libfd subroutine calls, reducing the amount of disk I/O.  In this mode, the user trades away multi-process access to obtain increased speed. 

FDPERF_ASSUMEIDLE (2)
This mode is a hybrid of the first two modes, in that it achieves the speed advantages of FDPERF_EXCLUSIVE while maintaining the multi-process accessibility of the disk hardware.  The “price” paid is that libfd does not guarantee a consistent-looking filesystem to the calling process, especially when other processes are changing the filesystem while the calling process is reading it.  To limit the risk taken in this mode, any process using FDPERF_ASSUMEIDLE is restricted to read-only access of the Fast-Disk filesystem.  In some applications, such as fdls(1), the conveniences offered in this mode are worth the relatively low risk of becoming confused by examining a possibly changing filesystem.

ENVIRONMENT VARIABLES

If fd_perf is not called, then libfd interprets the FDPERF environment variable as a decimal number representing v. If this variable is not defined, FDPERF_NORMAL is assumed.

RETURN VALUE

The value 0 is returned on success.  Otherwise, the value −1 is returned and errno is set to indicate the error. 

ERRORS

[EBUSY] Another libfd subroutine was called prior to calling fd_perf.

[EINVAL] The v argument was not one of the values described above. 

SEE ALSO

mx(4), fdperf(7)

Release β  —  Last change: 3/1/89

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026