Bus Citizenship: Surviving Multi-Device/Multi-Process; Hp-Ib; Io_Lock And Io_ Unlock - HP 9000 Series 300 Tutorials Manual

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

Bus Citizenship:
Surviving Multi-Device/Multi-Process HP-IB
HP-UX provides a powerful environment for creative programming. As a
result, one or more users can create a large number of processes that may be
running simultaneously. At the same time, HP-IB provides the capability
of combining multiple devices on a single I/O channel or interface. As long
as only auto-addressed HP-IB interface files are used, problems are few and
infrequent. However, when processes that use DIL subroutines start accessing
raw-mode HP-IB interface files, a splendid opportunity arises for competing
processes to create bus addressing and access conflicts. If certain precautions
are not carefully maintained, performance quickly decays to chaos.
The Device I/O Library contains several subroutines that are provided
specifically for maintaining orderly HP-IB traffic and good I/O efficiency.
Correct use of these subroutines is especially important when using raw
interface files. They include:
• io_lock
and
io_unlock
to take exclusive control of the HP-IB channel
for the duration of a transfer,
• io_burst
to efficiently handle short transfers without consuming large
amounts of HP-UX kernel overhead,
• hpib_io
to structure a complete bus transfer including configuration
and control operations in a buffer then handle the transfer as a single
subroutine call through an interface file that is automatically locked at
the beginning and released at the end of the transfer.
These subroutines are discussed at length later in this chapter, but are treated
here from the point of view of overall bus applications efficiency as it pertains
to programming practice.
Controlling the HP-IB Interface
3-11

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents