• Keine Ergebnisse gefunden

CONFIGURING THE BASIC I/O SYSTEM

Im Dokument 1/0 86 (Seite 189-200)

SET$DEFAULT$USEJ

CHAPTER 9. CONFIGURING THE BASIC I/O SYSTEM

~e Basic I/O System is a configurable layer of the iRMX 86 Operating System. It contains several options that you can adjust to meet your specific needs. To help you make configuration choices, Intel provides three kinds of information:

• A list of configurable options

• Detailed information .about the options

• Procedures to allow you to specify your choices

The balance of this chapter provides the first category of information.

To obtain the second and third categories of information, refer to the iRMX 86 CONFIGURATION GUIDE.

BASIC I/O SYSTEM CALLS

You can select the system calls that your application requires. The advantage in being able to do this is that you can reduce the amount of Basic I/O System code needed to support your application. Moreover, if you choose to omit certain combinations of system calls, you can exclude entire file drivers, such as the stream file driver.

INTEL I/O DEVICES

You must specify which Intel I/O devices (controllers) are part of your hardware configuration. The devices that you can specify are listed in the iRMX 86 CONFIGURATION GUIDE.

For each device that you select, you must specify a name, physical characteristics, and desired operating modes.

BUFFERS

For each device, you must specify the number of buffers that the Basic I/O System is to manage during I/O operations on that device.

TIMING FACILITIES

You must specify whether you want your system to include the timing facilities related to the SET$TIME and GET$TlME system calls.

CONFIGURING THE BASIC I/O SYSTEM

SERVICE TASK PRIORITIES

You must specify the priorities of the Basic I/O System tasks that attach devices and delete connections.

CREATION A FILE WITH AN EXISTING PATHNAME

Occasionally, a task will call A$CREATE$FILE, specifying a pathname that is identical to the pathname of a file that already exists. The Basic I/O System provides a configuration parameter (called NO CREATE FILE)

-

-that enables you to specify what should happen in this case.

If NO CREATE FILE is selected, the call to A$CREATE$FILE will return the exception code E$FEXIST, regardless of the value of the must$create parameter in the call.

If NO_CREATE_FILE is not selected, then what happens depends upon the value of the must$create parameter in the call to A$CREATE$FILE. If must$create is true (OFFH), then the Basic I/O System returns the

E$FEXIST exception code. If must$create is false (0), then the existing file is truncated or expanded, according to the size parameter in the call to A$CREATE$FlLE.

SYSTEM MANAGER ID

You must specify whether you want a system manager (user).

BASIC I/O SYSTEM IN ROM OR RAM

You must specify whether the Basic I/O System is to be in ROM or in RAM.

If you specify RAM, as you will during the initial testing phase of your development cycle, you will have to arrange to load the Basic I/O System into memory.

FACTORS THAT AFFECT BASIC I/O SYSTEM PERFORMANCE

The purpose of this section is to make you aware of the factors that have the greatest impact on the performance (speed) of the Basic I/O System.

Note that you determine some of these factors during software

configuration, but you determine other factors at other times. The factors are as follows:

• Device granularity, which is the smallest number of bytes that can be read from or written to a device in a single I/O

operation. If this value is selectable, you determine it either by jumpering hardware or by means of software, depending upon the device.

9-2

CONFIGURING THE BASIC I/O SYSTEM

• Volume granularity, which is the smallest number of contiguous bytes that can be allocated from a volume in a single

allocation. This value can vary from volume to volume and must be a multiple of the device granularity. You specify it when formatting the volume with the FORMAT command of the Human Interface or with the Files Utility.

• File granularity, which is the smallest number of bytes that can be allocated to a file in a single allocation. This value can vary from file to file and must be a multiple of the volume granularity. You specify each file's granularity when creating the file with the A$CREATE$FILE system call.

• The number of buffers for each device-unit. You specify this value when configuring the Basic I/O System.

• The number of bytes to be read or written. You specify this value in calls to A$READ and A$WRITE.

• The priority of tasks that the Basic I/O System supplies for the purpose of overseeing I/O operations. There is one such task for each device-unit; you specify the priority of each of these tasks when configuring the Basic I/O System.

• The amount of time between updates performed by the fixed update and timeout update features. You specify these time intervals when configuring the Basic I/O System. These two kinds of updating are explained in Chapter 8, in the description of the A$UPDATE system call.

For best results with these factors, you should begin by using your best judgment. Then, using the resulting performance figures as a base, you can experiment by changing a few (perhaps only one) factors at a time.

Obtaining the optimum combination of these factors is vital to the

performance of any application of which I/O operations are a major part.

Consequently, you would be wise to do some experimenting.

APPENDIX A. iRMX~ 86 DATA TYPES

The following are the data types that are recognized by the iRMX 86 Operating System:

BYTE

WORD

INTEGER

OFFSET

SELECTOR

POINTER

STRING

TOKEN

An unsigned, 8-bit, binary number.

An unsigned, 16-bit, binary number.

An unsigned, 32-bit, binary number.

A signed, 16-bit, binary number that is stored in two's complement form.

An unsigned, 16-bit binary number whose value represents the distance from the base of an 8086 segment.

An unsigned, 16-bit binary number whose value represents the base of an 8086 segment.

Two adjacent WORDs containing the base of an 8086 segment and an offset, in the order: offset followed by base.

A sequence of consecutive BYTEs. The first byte contains the number of bytes that follow it in the string.

An unsigned, 16-bit, binary number that you must declare to be literally a WORD or a SELECTOR.

I

I

I

APPENDIX B. iRMXlll 86 TYPE CODES

Each iRMX 86 object type is known within the iRMX 86 System by means of a numeric code. For each code, there is a mnemonic name that can be

substituted for the code. The following lists the types with their codes and associated mnemonics.

OBJECT TYPE INTERNAL MNEMONIC NUMERIC CODE

Job T$JOB OOIH

Task T$TASK 002H

Mailbox T$MAILBOX 003H

Semaphore T$SEMAPHORE 004H

Segment T$SEGMENT 006H

User T$NUM$USER IOOH

Connection T$CONNECTION laIR

APPENDIX C. I/O RESULT SEGMENT

Certain asynchronous I/O system calls return a data structure called an I/O result segment to the mailbox specified by the "resp$mbox"

parameter. The following system calls can return such a segment:

A$ATTACH$FILE A$CLOSE

A$CREATE$FILE A$DELETE$FILE A$READ

A$SEEK A$TRUNCATE A$WRITE

A$CHANGE$ACCESS A$CREATE$DlRECTORY A$DELETE$CONNECTION A$OPEN

A$RENAME$FILE A$SPECIAL A$UPDATE

Three of these system calls (A$ATTACH$FILE, A$CREATE$DlRECTORY, and

A$CREATE$FILE) can return either a connection or an I/O result segment to the mailbox. Your application task can determine which type of object has been returned by making a GET$TYPE system call before trying to examine the object.

Before waiting at the response mailbox to receive the I/O result segment, your application task should examine the condition code returned in the word pointed to by the "except$ptr" parameter. If this code is "E$OK",

the task can wait at the mailbox. However, if the code is not "E$OK", an exceptional condition exists and nothing is sent to the mailbox.

Immediately after receiving the I/O result segment, the task should examine the status field. This field contains an "E$OK" if the system call was completed successfully or an exceptional-condition code if an error occurred. The result segment also contains the actual number of bytes read or written, if appropriate.

STRUCTURE OF I/O RESULT SEGMENT

The I/O result segment is structured as follows:

DECLARE iors STRUCTURE ( status

unit$status actual

WORD, WORD, WORD) ;

where: call; Appendix D lists these asynchronous condition codes.

contains, in the low-order four bits,

device-dependent error code information that is meaningful only if status = E$IO; the codes, their

I/O RESULT SEGMENT

iSBC® 215 CONTROLLER

Under certain circumstances, the iSBC 215 Winchester disk controller places information in the high twelve bits of this word. If the low four

WINCHESTER DISK CONTROLLER HARDWARE REFERENCE MANUAL.

If the error is IO$SOFT (low four bits =IH), the next hex digit position can be 0,1, or 2. That is, the value in the low byte of unit$status will be 01H, I1H, or 21H. The upper byte of the unit$status word will indicate the exact meaning of the error condition. The meanings are listed here.

low byte

Im Dokument 1/0 86 (Seite 189-200)